Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,12 @@ ModelManifest.xml
# Rider
.idea

#kiro
.kiro

#cursor
.cursor

profile.arm.json

# bit
Expand Down
20 changes: 20 additions & 0 deletions src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMap.razor
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@namespace Bit.BlazorUI
@inherits BitComponentBase
@typeparam TMapProvider where TMapProvider : class, IBitMapProvider, new()

<div @ref="RootElement"
@attributes="HtmlAttributes"
id="@_Id"
style="@StyleBuilder.Value"
class="@ClassBuilder.Value"
dir="@Dir?.ToString().ToLower()">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Use culture-invariant casing for dir serialization.

Line 10 should avoid culture-sensitive lowercasing to prevent locale-specific output drift in attribute values.

🔧 Proposed fix
-     dir="`@Dir`?.ToString().ToLower()">
+     dir="`@Dir`?.ToString().ToLowerInvariant()">
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMap.razor` at line 10, The
dir attribute is being serialized with Dir?.ToString().ToLower(), which is
culture-sensitive; change the serialization to use culture-invariant casing
instead (e.g., call ToLowerInvariant() or use
ToString(CultureInfo.InvariantCulture) plus ToLowerInvariant) for the dir
attribute in BitMap.razor so output does not vary by locale; update the
expression that renders dir (the Dir?.ToString().ToLower() call) to use
invariant casing methods.

<div @ref="_mapElement"
class="bit-map-canvas"
tabindex="0"
role="region"
aria-label="@(AriaLabel ?? "Map")"></div>
@if (ChildContent is not null)
{
<div class="bit-map-overlay">@ChildContent</div>
}
</div>
Loading
Loading