-
-
Notifications
You must be signed in to change notification settings - Fork 260
Fix saturation picker issue with culture in BitColorPicker (#11763) #11923
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
Fix saturation picker issue with culture in BitColorPicker (#11763) #11923
Conversation
WalkthroughThe change modifies the saturation thumb's inline style binding in the ColorPicker component to use culture-invariant string formatting via Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro Knowledge base: Disabled due to 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (1)
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/ColorPicker/BitColorPicker.razor (1)
50-50: Fix culture-invariant formatting for the alpha value.The alpha value on lines 62-63 is output directly without culture-invariant formatting. In locales using comma as a decimal separator (e.g., de-DE, fr-FR), this produces invalid values like "0,5" instead of "0.5" in HTML attributes.
Use
FormattableString.Invariant()for@_color.A:value="@FormattableString.Invariant($"{_color.A:F2}")" aria-valuenow="@FormattableString.Invariant($"{_color.A:F2}")" aria-valuetext="@FormattableString.Invariant($"{_color.A:F2}")"Lines 50 and 71 already use culture-invariant formatting through their respective
RgbandRgbaproperties.
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Knowledge base: Disabled due to Reviews -> Disable Knowledge Base setting
📒 Files selected for processing (1)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/ColorPicker/BitColorPicker.razor
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build Bit.BlazorUI
🔇 Additional comments (1)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/ColorPicker/BitColorPicker.razor (1)
25-25: Excellent fix for the culture-specific formatting issue.Using
FormattableString.Invariant()ensures that numeric CSS values (pixel positions) are formatted with invariant culture, preventing invalid CSS like"top:12,5px"in locales that use comma as the decimal separator. This directly resolves the saturation picker selection issue reported in #11763.
closes #11763
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.