You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[@mantine/nprogress] NavigationProgress: Mirror glow direction in RTL - #9452
NavigationProgress positions its glow at the leading edge in RTL, but keeps the LTR rotation. Mirror the glow rotation with the existing where-rtl mixin so its tilt follows the direction of progress. LTR styling is unchanged.
Verified the public, built component in Chrome for LTR and RTL at 60% progress. Before the change the RTL tilt assertion fails; afterward both directions pass with the same bar width and ARIA value. Also passed 158 related Progress tests, all package builds, full typecheck, full stylelint, scoped nprogress oxlint and CSS formatting.
The change at 875c8da986195fcc8eaf5342ba5ed6c6899c025f fixes the original RTL screenshot, but it reverses the glow on a bar that explicitly uses LTR inside an RTL page.
To reproduce in Chrome: set <html dir="rtl">, render <NavigationProgress dir="ltr" />, and call nprogress.set(60). The bar correctly fills from the left, so its glow should be brightest at the moving right tip. On the base (af8823eb), it is. On this PR, the section still computes to direction: ltr with the pseudo-element inset 1px from the right, but the tilt changes from +4deg to -4deg. The bright end moves back inside the bar. I saw the same result with the default portal and with withinPortal={false}.
The where-rtl rule matches the RTL document even when the bar overrides it. Could the rotation follow the section's own direction instead, for example by matching :dir(rtl) on the section before ::before?
Thanks for the repro, @rtivital. I confirmed the wrong tilt on 875c8da9 with both the default portal and withinPortal={false}. The revision selects RTL on the progress section before ::before, so the glow follows the section’s own dir.
The new Storybook regression checks the LTR bar inside an RTL container. It fails on the current PR head and passes with the fix. I also checked eight direction and portal combinations in Chrome against the built packages, including both portal modes of your repro. All eight pass. Published in 07915076.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #9450
NavigationProgress positions its glow at the leading edge in RTL, but keeps the LTR rotation. Mirror the glow rotation with the existing
where-rtlmixin so its tilt follows the direction of progress. LTR styling is unchanged.Verified the public, built component in Chrome for LTR and RTL at 60% progress. Before the change the RTL tilt assertion fails; afterward both directions pass with the same bar width and ARIA value. Also passed 158 related Progress tests, all package builds, full typecheck, full stylelint, scoped nprogress oxlint and CSS formatting.