Skip to content

refactor(components/MaintainersMap): drop 'paint' bounds that always match the host - #1626

Merged
sukvvon merged 1 commit into
mainfrom
refactor/maintainers-map-paint-bounds
Nov 23, 2026
Merged

sukvvon merged 1 commit into
mainfrom
refactor/maintainers-map-paint-bounds

Conversation

@sukvvon

@sukvvon sukvvon commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Summary

Since #1572 made the globe surface an absolute inset-0 child of a host with no padding or border, MaintainersMap's paintWidth, paintHeight and paintTop always equal width, height and 0. This drops those fields and uses the host bounds directly. It also removes the ResizeObserver on the surface, which only duplicated the host observer, and the data-globe-surface attribute, whose CSS selector was removed in #1572.

Rendering and interaction are unchanged. The old code read the same box twice with integer clientWidth, which could differ by up to 1px from subpixel snapping; it now uses the host measurement only.

Verification

Measured the homepage globe locally on main and on this branch with the same steps (pause, reset, zoom to max and min, open a profile):

1280px 500px
Drawing area 1190 × 1190 500 × 625
Sphere bbox [26, 26, 1137, 1137] [-35, 28, 570, 570]
Visible profiles 63 65
Zoom in / out clicks to limit 1 / 2 0 / 2
Profile popover opens —

Both branches produced identical values. Resizing across the 640px breakpoint redraws the globe at the new size, and there are no console errors.

Summary by CodeRabbit

  • Bug Fixes
    • Improved the globe map’s sizing when its display area changes, including on mobile.
    • Map pins are now clipped and positioned within the visible map area.

@sukvvon sukvvon self-assigned this Nov 23, 2026
@changeset-bot

changeset-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 47f277a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

MaintainersMap now sizes its projection and drawing surface from the host element. Mobile pin clipping uses host bounds, and the resize observer watches the host rather than the surface.

Changes: Maintainers map sizing

Layer / File(s) Summary
Host bounds and resize observation
src/components/MaintainersMap.tsx
GlobeBounds no longer stores painted-surface dimensions or offset. Bounds updates use host dimensions, and the resize observer watches the host.
Pin clipping and globe drawing
src/components/MaintainersMap.tsx
Mobile pin clipping uses host bounds. Drawing and scale adjustment use host dimensions, and the surface no longer has the data-globe-surface attribute.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Refactor

Possibly related PRs

Suggested reviewers: tkdodo, manudeli

Merge Risk: Minimal · up to 47f27

This refactor makes the maintainers map use the host element's measured size directly. Rendering and interaction are intended to stay the same, and no concrete risk was found, so it looks safe to merge.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the refactor of MaintainersMap and the removal of paint bounds that match the host. The raw summary confirms the change: sizing now uses host bounds, paint dimensions and the vertical …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the refactor of MaintainersMap and the removal of paint bounds that match the host. The raw summary confirms the change: sizing now uses host bounds, paint dimensions and the vertical offset are removed, and updateBounds observes the host. The title is specific and accurate, and it is concise. The title does not mention the removal of the surface ResizeObserver or the data-globe-surface attribute, but the title does not need to cover every detail.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 7631600e-3a03-4325-a195-44579df93052
Commits

Reviewing files that changed from the base of the PR and between 77e721b and 47f277a.

Files selected for processing: 1

  • src/components/MaintainersMap.tsx

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 1 remain after this review.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 47f277a Commit Preview URL

Branch Preview URL
Nov 23 2026, 02:36 PM

@github-actions

Copy link
Copy Markdown
Asset Main PR merge build Change
JavaScript 19580.04 KiB 19579.82 KiB 🟢 -0.22 KiB (-0.00%)
JavaScript (gzip) 6444.21 KiB 6443.62 KiB 🟢 -0.59 KiB (-0.01%)
CSS 823.62 KiB 823.62 KiB 0.00 KiB (0.00%)
CSS (gzip) 126.08 KiB 126.08 KiB 0.00 KiB (0.00%)
Page Main (gzip) PR merge build (gzip) Change
/ 595.13 KiB 595.10 KiB 🟢 -0.03 KiB (-0.01%)
/libraries 537.98 KiB 537.96 KiB 🟢 -0.02 KiB (-0.00%)
/start/latest 562.79 KiB 562.75 KiB 🟢 -0.04 KiB (-0.01%)
/router/latest 563.10 KiB 563.05 KiB 🟢 -0.05 KiB (-0.01%)
/query/latest 561.53 KiB 561.50 KiB 🟢 -0.03 KiB (-0.01%)
/table/latest 594.35 KiB 594.31 KiB 🟢 -0.04 KiB (-0.01%)
/charts/latest 643.63 KiB 643.61 KiB 🟢 -0.02 KiB (-0.00%)
/ai/latest 588.48 KiB 588.43 KiB 🟢 -0.05 KiB (-0.01%)
Docs article 549.04 KiB 549.02 KiB 🟢 -0.03 KiB (-0.00%)
Framework docs article 549.05 KiB 549.02 KiB 🟢 -0.03 KiB (-0.00%)
/blog 542.20 KiB 542.17 KiB 🟢 -0.02 KiB (-0.00%)
/maintainers 541.29 KiB 541.27 KiB 🟢 -0.02 KiB (-0.00%)
/showcase 539.24 KiB 539.22 KiB 🟢 -0.01 KiB (-0.00%)
/chat 537.71 KiB 537.69 KiB 🟢 -0.01 KiB (-0.00%)
/chat/c/:conversationId 538.43 KiB 538.41 KiB 🟢 -0.02 KiB (-0.00%)

Page sizes sum the JS and CSS in the TanStack Start manifest for each route and its layouts. Shared files count once per page.

Compared with main at 77e721b. Gzip sizes are summed per file. Build run

@sukvvon
sukvvon merged commit 908059c into main Nov 23, 2026
11 checks passed
@sukvvon
sukvvon deleted the refactor/maintainers-map-paint-bounds branch November 23, 2026 14:50
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.

1 participant