Skip to content

feat(chart): add ChoroplethMap#610

Open
AnmolSaini16 wants to merge 2 commits into
cloudflare:mainfrom
AnmolSaini16:feat/choropleth-map
Open

feat(chart): add ChoroplethMap#610
AnmolSaini16 wants to merge 2 commits into
cloudflare:mainfrom
AnmolSaini16:feat/choropleth-map

Conversation

@AnmolSaini16

@AnmolSaini16 AnmolSaini16 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Adds ChoroplethMap, a GeoJSON region choropleth chart component with Kumo light/dark map colors, tooltip formatting, optional legend, hover/click callbacks, roam controls, docs, demos, exports, and a changeset.

Reviews

  • bonk has reviewed the change
  • automated review not possible because: GitHub review automation is not available from this environment

Tests

  • Tests included/updated
  • Automated tests not possible - manual testing has been completed as follows: ran pnpm --filter @cloudflare/kumo-docs-astro typecheck with 0 errors; existing warnings/hints remain unrelated
  • Additional testing not necessary because:

@AnmolSaini16

AnmolSaini16 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

/bonk please review

1 similar comment
@stritt

stritt commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

/bonk please review

@pkg-pr-new

pkg-pr-new Bot commented Jun 30, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@cloudflare/kumo@610

commit: 595cbdf

@github-actions

Copy link
Copy Markdown
Contributor

Docs Preview

View docs preview

Commit: 595cbdf

@ask-bonk ask-bonk Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR! The ChoroplethMap implementation is well-structured — clean viewport preservation, consistent event handling with BubbleMap, and nice Kumo color integration.

A few things to address before merging:

  1. BubbleMap default change is undocumented. Switching the default from → changes the default interaction behavior for existing consumers. If this is intentional it should be called out in the changeset.
  2. Missing ChoroplethMap PropsTable in docs. The API Reference section should include a PropsTable for the new component too.
  3. Test page consistency. The ChoroplethMap test section is missing a descriptive paragraph like the other sections have.

See inline comments for details.

zoom?: number;
/** Enable drag-to-pan and scroll-to-zoom. Default: `true`. */
/** Enable drag-to-pan and scroll-to-zoom. Default: `false`. */
roam?: boolean;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The BubbleMap default changed from to but the changeset () only mentions the viewport-preservation fix. Existing consumers who omit the prop will lose drag-to-pan/scroll-to-zoom on upgrade.

Please either revert the default to (the fix already solves the reset issue) or update the changeset to document this breaking interaction change.

<ComponentSection>
<Heading level={2}>API Reference</Heading>
<Heading level={3} class="mb-2 mt-4 text-lg">BubbleMap</Heading>
<PropsTable component="BubbleMap" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add a PropsTable for as well.


<section class="space-y-4">
<div>
<h2 class="text-xl font-semibold text-kumo-default">ChoroplethMapBasicDemo</h2>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For consistency with the other test sections, consider adding a description paragraph.

@github-actions

Copy link
Copy Markdown
Contributor
Visual Regression Report — 26 changed, 15 unchanged

26 screenshot(s) with visual changes:

Button / Variant: Primary

468 px (0.46%) changed

Before After Diff
Before After Diff

Button / Sizes

1,091 px (1.07%) changed

Before After Diff
Before After Diff

Button / Icon Only

268 px (0.26%) changed

Before After Diff
Before After Diff

Button / Loading State

14 px (0.01%) changed

Before After Diff
Before After Diff

Button / Link as Button

1,083 px (1.07%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Actions

363 px (0.36%) changed

Before After Diff
Before After Diff

Dialog / Dialog Basic

404 px (0.4%) changed

Before After Diff
Before After Diff

Dialog / Dialog Sizes

2,303 px (2.27%) changed

Before After Diff
Before After Diff

Dialog / Dialog Alert

1,324 px (1.3%) changed

Before After Diff
Before After Diff

Dialog / Custom Max Width

954 px (0.94%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Select

480 px (0.47%) changed

Before After Diff
Before After Diff

Dialog / Dialog With Dropdown

500 px (0.49%) changed

Before After Diff
Before After Diff

Dialog (Open)

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Basic

859 px (0.85%) changed

Before After Diff
Before After Diff

Select / Select Sizes

3,195 px (1.72%) changed

Before After Diff
Before After Diff

Select / Select Without Label

723 px (0.71%) changed

Before After Diff
Before After Diff

Select / Select With Error

1,730 px (1.46%) changed

Before After Diff
Before After Diff

Select / Select Placeholder

1,234 px (1.22%) changed

Before After Diff
Before After Diff

Select / Select With Tooltip

1,062 px (1.05%) changed

Before After Diff
Before After Diff

Select / Select Custom Rendering

973 px (0.96%) changed

Before After Diff
Before After Diff

Select / Select Loading

0 px (0%) changed

Before After Diff
Before After Diff

Select / Select Disabled Items

793 px (0.78%) changed

Before After Diff
Before After Diff

Select / Select Grouped

813 px (0.8%) changed

Before After Diff
Before After Diff

Select / Select Grouped With Disabled

1,478 px (1.46%) changed

Before After Diff
Before After Diff

Select / Select Long List

2,196 px (1.85%) changed

Before After Diff
Before After Diff

Select (Open)

0 px (0%) changed

Before After Diff
Before After Diff
15 screenshot(s) unchanged
  • Button / Basic
  • Button / Variant: Secondary
  • Button / Variant: Ghost
  • Button / Variant: Destructive
  • Button / Variant: Outline
  • Button / Variant: Secondary Destructive
  • Button / With Icon
  • Button / Disabled State
  • Button / Title
  • Dialog / Dialog Confirmation
  • Dialog / Dialog With Combobox
  • Select / Select With Description
  • Select / Select Multiple
  • Select / Select Complex
  • Select / Select Disabled Options

Generated by Kumo Visual Regression

@ask-bonk

ask-bonk Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Follow-up: my earlier review comments lost some backticks due to escaping issues. Here is the same feedback with proper formatting:

  1. BubbleMap roam default change is undocumented
    In Maps.tsx, the BubbleMap roam default changed from true to false. The tame-maps-walk.md changeset only mentions the viewport-preservation fix, but existing consumers who omit the roam prop will lose drag-to-pan/scroll-to-zoom on upgrade. Please either revert the default to true (the appliedGeoRef fix already solves the reset issue) or update the changeset to document this breaking interaction change.

  2. Missing ChoroplethMap PropsTable in docs
    In maps.astro, the API Reference section should include a PropsTable for the new component too. Add this after the BubbleMap PropsTable:

    <Heading level={3} class="mb-2 mt-4 text-lg">ChoroplethMap</Heading>
    <PropsTable component="ChoroplethMap" />
  3. Test page consistency
    In map.astro, the ChoroplethMap test section is missing a descriptive paragraph like the other sections have. Consider adding something like:

    <p class="text-kumo-subtle">
      Choropleth map shading regions by value with continuous colour scaling.
    </p>

Otherwise the implementation looks solid. Nice work!

@ask-bonk

ask-bonk Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Review submitted on PR #610.

Summary of feedback:

  1. BubbleMap roam default change is undocumented — the default switched from true to false but the changeset only mentions the viewport-preservation fix. Existing consumers who don’t set roam explicitly will lose pan/zoom on upgrade. The author should either revert the default or update the changeset.
  2. Missing PropsTable for ChoroplethMap in the docs page’s API Reference section.
  3. Test page consistency — the ChoroplethMap test section lacks a descriptive paragraph like the other sections.

The batch review was posted successfully (with inline comments on the relevant lines), and a follow-up top-level comment clarifies the properly formatted feedback.

github run

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.

2 participants