Skip to content

Conversation

@ev-sc
Copy link
Member

@ev-sc ev-sc commented Jan 25, 2026

Fixes MAP-1463

This pull request refactors and improves the code for displaying area information in the map view. The main change is the extraction of the area list/table rendering logic from AreaInfo.tsx into a new, reusable component, which simplifies AreaInfo.tsx and promotes code reuse. Additionally, utility functions are moved to a shared location, and unused code is cleaned up in both AreaInfo.tsx and AreaPopup.tsx.

Component extraction and code reuse:

  • Extracted the area list/table rendering logic from AreaInfo.tsx into a new AreasList component (BoundaryHoverInfo/AreasList.tsx), making the code more modular and reusable. ([src/app/map/[id]/components/BoundaryHoverInfo/AreasList.tsxR1-R227](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-f3fda1a4960861a049a7e5e60ddf990c9f72181fab0a80f7dc6db4a1245e3084R1-R227))
  • Moved the getDisplayValue utility function to a shared location for use by multiple components. ([src/app/map/[id]/components/BoundaryHoverInfo/AreasList.tsxR1-R227](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-f3fda1a4960861a049a7e5e60ddf990c9f72181fab0a80f7dc6db4a1245e3084R1-R227))

Code cleanup and simplification:

  • Removed the now-redundant area list/table rendering code and related helper functions from AreaInfo.tsx, streamlining the component. ([src/app/map/[id]/components/AreaInfo.tsxL1-L378](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-d01351cb40cf43dce9f61a2741b5a669bb5f646dade48df3f8f1371512717521L1-L378))
  • Removed unused helper functions and imports from AreaPopup.tsx, further simplifying the file. ([src/app/map/[id]/components/AreaPopup.tsxL1-L181](https://github.com/commonknowledge/ts-mapped/pull/288/files#diff-57a3a7fe13a7644788b11395f48b41cef7fa055730e35402130434db6cab9a4bL1-L181))

@linear
Copy link

linear bot commented Jan 25, 2026

@ev-sc ev-sc merged commit 8297f66 into main Jan 25, 2026
1 check passed
@ev-sc ev-sc deleted the fix/map-1463 branch January 25, 2026 18:29
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