Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[material-ui][Autocomplete] Fix adornments misaligned RTL #45330

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

solomonalem
Copy link

@solomonalem solomonalem commented Feb 17, 2025

Closes: 45193

Local Demo

  • Used createTheme to create thertldirection to test it locally
  • The changes will not change existing (ltr) implementation
Screenshot 2025-02-16 at 11 23 53 PM

@solomonalem
Copy link
Author

@DiegoAndai this is for #45193

@zannager zannager added the component: autocomplete This is the name of the generic UI component, not the React module! label Feb 17, 2025
@zannager zannager requested a review from DiegoAndai February 17, 2025 12:21
@DiegoAndai DiegoAndai added the package: material-ui Specific to @mui/material label Feb 18, 2025
@mui-bot
Copy link

mui-bot commented Feb 18, 2025

Netlify deploy preview

https://deploy-preview-45330--material-ui.netlify.app/

@material-ui/core: parsed: +0.07% , gzip: +0.02%
Autocomplete: parsed: +0.25% , gzip: +0.06%
Chip: parsed: +0.40% , gzip: +0.08%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 2903c11

Copy link
Member

@DiegoAndai DiegoAndai left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @solomonalem, thanks for working on this!

  1. On the deploy preview (link), the adornments still look misaligned. Do you know why?

    Screenshot 2025-02-18 at 16 36 28
  2. May I ask you to add a test for this? It should be included in the regression tests, here's an example for the Button component: /~https://github.com/mui/material-ui/blob/master/test/regressions/fixtures/Button/MultilineButton.js (you will have to create folder for the Chip component)

@solomonalem
Copy link
Author

@DiegoAndai

  1. How did you implement RTL? Which option did you use—createTheme or including it in index.html? I'm asking because the component expects the direction to come from the theme. If you've applied RTL differently, we can account for those cases as well.

  2. I'll take care of that.

@DiegoAndai
Copy link
Member

DiegoAndai commented Feb 26, 2025

Hey @solomonalem!

  1. The link I shared uses the docs' RTL implementation, which is defined here. It set's the direction on createTheme (reference) as well as the body's dir (reference)

You can test this locally by running pnpm docs:dev and visiting localhost:3000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Chip] Adornments are misaligned when using RTL partially
5 participants