fix(NavigationMenu): improve RTL support for viewport and indicator#6164
Conversation
|
I think the ideal way is to reiterate over RekaUI and enhance RTL support in general, or may be in NuxtUI through adding rtl like in this case? |
📝 WalkthroughWalkthroughThe navigation menu theme file was modified to adjust viewport and indicator/arrow CSS classes: transition utilities now include right-side transitions, z-index tokens changed from bracketed to numeric forms, indicator positioning normalized to left-0, and arrow z-index reduced. RTL support was added for vertical Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip You can make CodeRabbit's review stricter and more nitpicky using the `assertive` profile, if that's what you prefer.Change the |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/theme/navigation-menu.ts`:
- Around line 79-81: The new variant entry for the navigation menu under the
viewport key has mixed quote styles and trailing commas causing lint failures;
update the viewport string to use the project's preferred single-quote style and
remove the trailing comma(s) so the object entry matches surrounding entries
(look for the viewport property in src/theme/navigation-menu.ts and adjust its
value string and punctuation to eliminate the double quotes and trailing comma).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: f36ce952-a521-402f-bd4e-f29a665ad399
📒 Files selected for processing (1)
src/theme/navigation-menu.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/theme/navigation-menu.ts`:
- Around line 79-80: The viewport utility string in src/theme/navigation-menu.ts
was expanded to include RTL classes ('rtl:[left:auto]' and
'rtl:[right:calc(100%-var(--reka-navigation-menu-viewport-left)-var(--reka-navigation-menu-viewport-width))]'),
so update the Jest/Vue snapshot tests to reflect that change: regenerate the
snapshots at test/components/__snapshots__/NavigationMenu.spec.ts.snap and
test/components/__snapshots__/NavigationMenu-vue.spec.ts.snap (the "with content
orientation vertical" test around line 221) so the viewport element includes the
new RTL class tokens; run the tests to refresh the snapshots and commit the
updated .snap files.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1f5d46a9-1c11-4c11-bb45-bd31f3821862
📒 Files selected for processing (1)
src/theme/navigation-menu.ts
commit: |
🔗 Linked issue
Resolves #6162
❓ Type of change
📚 Description
vertical mode in content orientation lacked rtl support so I added it by mirroring the position of the viewport in case of rtl: class