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

feat(components): improve RTL support #2433

Merged
merged 24 commits into from
Oct 28, 2024

Conversation

Malik-Jouda
Copy link
Contributor

@Malik-Jouda Malik-Jouda commented Oct 21, 2024

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@Malik-Jouda Malik-Jouda changed the title feat(Switch): handleswitch in RTL mode chore: improve RTL support Oct 21, 2024
@@ -17,40 +17,40 @@ export default (options: Required<ModuleOptions>) => ({
size: {
xs: {
base: 'px-2 py-1 text-xs gap-1',
leading: 'pl-2',
trailing: 'pr-2',
leading: '!ps-2',
Copy link
Member

Choose a reason for hiding this comment

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

Why add ! important class here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Screen.Recording.2024-10-22.at.2.16.53.PM.mov

Copy link
Member

Choose a reason for hiding this comment

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

Changing the class in the chrome devtools won't work, the ps-9 class doesn't exist since it isn't defined anywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

screen-recording-2024-10-23-at-92255-am_npHC5fsW.mp4

Copy link
Contributor Author

@Malik-Jouda Malik-Jouda Oct 23, 2024

Choose a reason for hiding this comment

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

in version 4.0.0-alpha.28, the ps-10 is not applied as expected because px-5 takes precedence, while in version 3.4.13, ps-10 works correctly.

Copy link
Member

Choose a reason for hiding this comment

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

This is an issue with Tailwind then, can't merge this with important values it will prevent override.

Copy link
Contributor Author

@Malik-Jouda Malik-Jouda Oct 24, 2024

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

Awesome! Let's wait for the new release then :) Thanks for taking care of the issue on tailwindcss!

@benjamincanac benjamincanac changed the title chore: improve RTL support feat(components): improve RTL support Oct 22, 2024
@benjamincanac
Copy link
Member

Are you planning on improving other components or only the Input and Switch had issues?

@benjamincanac benjamincanac changed the title feat(components): improve RTL support fix(components): improve RTL support Oct 22, 2024
@benjamincanac benjamincanac added the v3 #1289 label Oct 22, 2024
@Malik-Jouda
Copy link
Contributor Author

Are you planning on improving other components or only the Input and Switch had issues?

Yes,I have a plan to complete

@benjamincanac benjamincanac marked this pull request as draft October 22, 2024 17:18
@Malik-Jouda
Copy link
Contributor Author

@benjamincanac
Copy link
Member

@Malik-Jouda What about it?

@Malik-Jouda
Copy link
Contributor Author

Malik-Jouda commented Oct 23, 2024

What about it?

Suggest adding an example of how to implement multi-directional support.

@Malik-Jouda Malik-Jouda marked this pull request as ready for review October 23, 2024 18:26
Copy link

pkg-pr-new bot commented Oct 24, 2024

pnpm add https://pkg.pr.new/@nuxt/ui@2433

commit: f5c6d1f

@benjamincanac
Copy link
Member

@Malik-Jouda I've merged v3 with Tailwind CSS v4.0.0-alpha.30 so you can now try to remove the ! important marks.

@benjamincanac benjamincanac changed the title fix(components): improve RTL support feat(components): improve RTL support Oct 25, 2024
@benjamincanac
Copy link
Member

@Malik-Jouda Is this good to merge or should I wait?

@Malik-Jouda
Copy link
Contributor Author

Malik-Jouda commented Oct 25, 2024

I suggest adding a switch between LTR and RTL.

Screenshot 2024-10-25 at 6 35 24β€―PM

@Malik-Jouda
Copy link
Contributor Author

Malik-Jouda commented Oct 25, 2024

Is this good to merge or should I wait?

Yes βœ…

@benjamincanac
Copy link
Member

@Malik-Jouda Sorry I introduced a conflict in my latest commit, can you have a look? 😬

@benjamincanac benjamincanac merged commit 94c4918 into nuxt:v3 Oct 28, 2024
2 checks passed
@Malik-Jouda Malik-Jouda deleted the improve-rtl-support branch October 28, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3 #1289
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants