Skip to content

Support rtl in floating.tsx #1109

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

Merged
merged 5 commits into from
Jul 8, 2025
Merged

Conversation

omerman
Copy link
Contributor

@omerman omerman commented Jun 14, 2025

What is it?

  • Feature / enhancement
  • Bug
  • Docs / tests
  • Other

Why is it needed?

Support RTL layouts for all the floating elements, tooltips/popovers/dropdown etc..
image

Checklist:

  • My code follows the developer guidelines of this project
  • I have performed a self-review of my own code
  • I have ran pnpm change and documented my changes
  • I have add necessary docs (if needed)
  • Added new tests to cover the fix / functionality

Copy link

changeset-bot bot commented Jun 14, 2025

🦋 Changeset detected

Latest commit: 8b88984

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@qwik-ui/headless Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 14, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

top: `${y}px`,
transform: context.transform,
});
}

if (resolvedData.middlewareData.arrow && context.arrowRef?.value) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didnt yet add rtl support for the arrow but it doesnt seem to be working as expected with arrows at the given moment or at least didnt see a working example, so I ignored it atm.

@omerman
Copy link
Contributor Author

omerman commented Jun 14, 2025

I have read the CLA Document and I hereby sign the CLA

Copy link

pkg-pr-new bot commented Jul 7, 2025

Open in StackBlitz

npm i https://pkg.pr.new/qwikifiers/qwik-ui@1109
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/headless@1109
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/styled@1109
npm i https://pkg.pr.new/qwikifiers/qwik-ui/@qwik-ui/utils@1109

commit: 8b88984

@maiieul
Copy link
Contributor

maiieul commented Jul 7, 2025

Hey @omerman thanks for the PR. How do you recommend setting up rtl with Qwik? If I add dir="rtl" directly on the body tag, your approach doesn't work.
image

@omerman
Copy link
Contributor Author

omerman commented Jul 7, 2025

Hey @omerman thanks for the PR. How do you recommend setting up rtl with Qwik? If I add dir="rtl" directly on the body tag, your approach doesn't work. image

image

I added the dir: rtl directly to the html tag (containerAttributes) and then it works well

@omerman omerman force-pushed the fix/floating-rtl branch from bc50f0b to 8b88984 Compare July 7, 2025 20:40
@maiieul
Copy link
Contributor

maiieul commented Jul 8, 2025

Have you been able to make it work on Qwik UI too? Even with dir="rtl" on the html, I still get the wrong positioning.
image

@omerman
Copy link
Contributor Author

omerman commented Jul 8, 2025

image image image Yes 😅

@maiieul maiieul merged commit 0b2f551 into qwikifiers:main Jul 8, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants