Skip to content

Fix trimming issues in BitMap (#12444)#12473

Open
msynk wants to merge 1 commit into
bitfoundation:developfrom
msynk:12444-blazorui-map-trimming-issues
Open

Fix trimming issues in BitMap (#12444)#12473
msynk wants to merge 1 commit into
bitfoundation:developfrom
msynk:12444-blazorui-map-trimming-issues

Conversation

@msynk

@msynk msynk commented Jun 18, 2026

Copy link
Copy Markdown
Member

closes #12444

Summary by CodeRabbit

  • Refactor
    • Optimized internal data format handling for map components.

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 9644f177-4fd6-4fc4-a260-faa5b1d681c8

📥 Commits

Reviewing files that changed from the base of the PR and between ae3395f and e727a84.

📒 Files selected for processing (2)
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMap.razor.cs
  • src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMapProviderBase.cs

Walkthrough

In BitMap.razor.cs and BitMapProviderBase.cs, all anonymous object literals used for building managed-to-JS interop payloads are replaced with explicit Dictionary<string, object?> instances. The affected methods are ToMarkerPayload, ToTileOverlayPayload, ToLatLngArray, ToStylePayload, and GetCommonOptions. No public API signatures change.

Changes

BitMap JS Interop Payload Serialization

Layer / File(s) Summary
Payload methods: anonymous objects → Dictionary<string, object?>
src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMap.razor.cs, src/BlazorUI/Bit.BlazorUI.Extras/Components/Map/BitMapProviderBase.cs
ToMarkerPayload, ToTileOverlayPayload, ToLatLngArray, and ToStylePayload in BitMap.razor.cs now construct payloads using Dictionary<string, object?> with explicit string keys instead of anonymous object instances. In BitMapProviderBase.cs, GetCommonOptions does the same for the "center" coordinate and the "southWest"/"northEast" bounds values.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐇 Anonymous objects once hid in the map,
Trimmer and AOT gave them a slap.
Now dictionaries march with their keys in a row,
"lat", "lng", and "color" — explicit they go!
The map renders fine in Release at last,
A bunny hops free of the AOT blast. 🗺️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix trimming issues in BitMap' directly addresses the main objective to resolve AOT and trimming problems preventing the BitMap component from rendering in Release configuration.
Linked Issues check ✅ Passed The code changes convert anonymous objects to Dictionary<string, object?> payloads in BitMap serialization, which addresses AOT/trimming compatibility by using explicit type-safe serialization instead of reflection-dependent anonymous objects.
Out of Scope Changes check ✅ Passed All changes are focused on BitMap component serialization methods directly addressing the AOT and trimming issues; no unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The BitMap component has issues with AOT and trimming

2 participants