-
-
Notifications
You must be signed in to change notification settings - Fork 256
Fix cultural numeric symbol issues in BlazorUI components (#11934) #11935
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 cultural numeric symbol issues in BlazorUI components (#11934) #11935
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThese changes address culture-invariant string formatting for CSS styling in BlazorUI components, replacing culture-dependent interpolated strings with Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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
🧹 Nitpick comments (7)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cs (7)
257-260: Stylistic refactoring: expression-bodied to block-bodied.This change is purely stylistic and doesn't address the cultural numeric symbol issue. While not incorrect, it's tangential to the PR objective.
434-439: Stylistic refactoring: expression-bodied to block-bodied.This change is purely stylistic and doesn't address the cultural numeric symbol issue. While not incorrect, it's tangential to the PR objective.
441-446: Stylistic refactoring: expression-bodied to block-bodied.This change is purely stylistic and doesn't address the cultural numeric symbol issue. While not incorrect, it's tangential to the PR objective.
470-473: Stylistic refactoring: expression-bodied to block-bodied.This change is purely stylistic and doesn't address the cultural numeric symbol issue. While not incorrect, it's tangential to the PR objective.
523-526: Stylistic refactoring: expression-bodied to block-bodied.This change is purely stylistic and doesn't address the cultural numeric symbol issue. While not incorrect, it's tangential to the PR objective.
685-689: Good refactoring: extracted duplicate AM/PM hour conversion logic.The
GetAmPmHourshelper correctly converts 24-hour format to 12-hour display format, ensuring that hour 0 and hour 12 both display as 12 (midnight and noon). This eliminates code duplication.
475-478: Stylistic refactoring with improved maintainability.The change to block-bodied syntax combined with the use of the new
GetAmPmHourshelper reduces code duplication and improves maintainability. While not directly addressing the cultural numeric symbol issue, this is a beneficial refactoring.
📜 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 (4)
src/BlazorUI/Bit.BlazorUI.Extras/Components/NavPanel/BitNavPanel.razor.cssrc/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cssrc/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor.cssrc/BlazorUI/Bit.BlazorUI/Components/Utilities/PullToRefresh/BitPullToRefresh.razor.cs
🧰 Additional context used
🧬 Code graph analysis (1)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cs (4)
src/BlazorUI/Bit.BlazorUI/Components/Inputs/TimePicker/BitTimePicker.razor.cs (17)
Task(295-295)Task(340-351)Task(388-396)Task(398-406)Task(408-416)Task(418-423)Task(425-447)Task(449-456)Task(458-468)Task(475-480)Task(482-489)Task(491-503)Task(518-523)Task(525-530)Task(532-557)Task(559-584)IsAm(511-516)src/BlazorUI/Bit.BlazorUI/Extensions/StringExtensions.cs (1)
HasValue(5-10)src/BlazorUI/Bit.BlazorUI/Components/Inputs/DatePicker/BitDatePicker.razor.cs (1)
IsAm(1257-1262)src/BlazorUI/Bit.BlazorUI/Components/Inputs/DateRangePicker/BitDateRangePicker.razor.cs (1)
IsAm(1573-1578)
⏰ 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 (5)
src/BlazorUI/Bit.BlazorUI/Components/Utilities/PullToRefresh/BitPullToRefresh.razor.cs (2)
176-194: LGTM! Culture-invariant CSS formatting applied correctly.The use of
FormattableString.Invariantensures that decimal values are formatted with '.' as the decimal separator regardless of the current culture, preventing CSS breakage in cultures that use ',' (e.g., fa-IR).
218-236: LGTM! Culture-invariant CSS formatting applied correctly.The use of
FormattableString.Invariantensures that decimal values in the CSS transform and dimensions are formatted with '.' as the decimal separator, preventing CSS breakage in cultures with different numeric symbols.src/BlazorUI/Bit.BlazorUI/Components/Notifications/Persona/BitPersona.razor.cs (1)
276-288: LGTM! Culture-invariant CSS formatting applied correctly.The use of
FormattableString.Invariantfor both the intermediatepositionstring and the final return value ensures that all double values are formatted with '.' as the decimal separator, preventing CSS breakage in cultures with different numeric symbols.src/BlazorUI/Bit.BlazorUI.Extras/Components/NavPanel/BitNavPanel.razor.cs (1)
389-397: LGTM! Culture-invariant CSS formatting applied correctly.The use of
FormattableString.Invariantensures that thediffXPaneldecimal value is formatted with '.' as the decimal separator in the CSS transform, preventing issues in cultures that use ',' for decimals.src/BlazorUI/Bit.BlazorUI/Components/Inputs/CircularTimePicker/BitCircularTimePicker.razor.cs (1)
677-683: LGTM! Culture-invariant CSS formatting applied correctly.The use of
FormattableString.Invariantensures that the double values (x and y coordinates) are formatted with '.' as the decimal separator in the CSS transform, preventing issues in cultures that use ',' for decimals. Making this a static method is also appropriate since it doesn't depend on instance state.
closes #11934
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.