-
-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🔨 rename map projection to region #4707
Conversation
2f2756d
to
bec94e2
Compare
d793cc4
to
d3bcd1f
Compare
5477a56
to
93014a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR renames properties, variables, and functions related to map projection to instead use the terminology "region" throughout the codebase.
- Renames mapConfig property from "projection" to "region"
- Updates tests, migration scripts, and UI components to use "region"
- Removes the MapProjectionMenu in favor of the new MapRegionDropdown
Reviewed Changes
Copilot reviewed 29 out of 32 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/@ourworldindata/grapher/src/mapCharts/MapConfig.test.ts | Updated tests to use "region" instead of "projection" |
packages/@ourworldindata/grapher/src/mapCharts/MapChartConstants.ts | Renamed interface property and adjusted constants |
packages/@ourworldindata/grapher/src/mapCharts/MapChart.tsx | Updated methods and computed getters to use "region" |
packages/@ourworldindata/grapher/src/mapCharts/GeoFeatures.ts | Renamed cache and helper functions from Projection to Region |
packages/@ourworldindata/grapher/src/mapCharts/ChoroplethMap.tsx | Updated references to use region-based helpers and UI IDs |
packages/@ourworldindata/grapher/src/index.ts | Updated exports to reflect the new region nomenclature |
packages/@ourworldindata/grapher/src/core/GrapherUrl.ts | Adjusted mapping of query parameters from projection to region |
packages/@ourworldindata/grapher/src/core/GrapherConstants.ts | Updated configuration flags and removed projection menu flag |
packages/@ourworldindata/grapher/src/core/Grapher.tsx | Updated map config assignments and observables to "region" |
packages/@ourworldindata/grapher/src/controls/controlsRow/ControlsRow.tsx | Replaced projection menu with region dropdown |
packages/@ourworldindata/grapher/src/controls/MapRegionDropdown.tsx | New dropdown component for selecting map regions |
db/migration/1743006325845-RenameMapProjectionToRegion.ts | Migration script updating JSON keys in DB from projection to region |
adminSiteClient/GrapherConfigGridEditor.tsx | Updated field mappings and schema URL |
adminSiteClient/EditorMapTab.tsx | Updated editor functions and SelectField options to use region |
adminShared/SqlFilterSExpression.test.ts | Updated filter expressions to reflect the new region nomenclature |
.github/workflows/check-default-grapher-config.yml | Added step to enable corepack in the workflow |
Files not reviewed (3)
- devTools/schemaProcessor/columns.json: Language not supported
- packages/@ourworldindata/grapher/src/controls/MapRegionDropdown.scss: Language not supported
- packages/@ourworldindata/grapher/src/core/grapher.scss: Language not supported
Comments suppressed due to low confidence (3)
packages/@ourworldindata/grapher/src/mapCharts/GeoFeatures.ts:19
- [nitpick] Consider renaming 'geoPathsForProjectionOf' to 'geoPathsForRegion' to better reflect the new nomenclature consistently.
const geoPathsForProjectionOf = (regionName: MapRegionName): string[] => {
packages/@ourworldindata/grapher/src/mapCharts/GeoFeatures.ts:39
- [nitpick] Consider renaming 'geoBoundsForProjectionOf' to 'geoBoundsForRegion' to align with the updated terminology.
export const geoBoundsForProjectionOf = (
packages/@ourworldindata/grapher/src/mapCharts/GeoFeatures.ts:67
- [nitpick] Consider renaming 'renderFeaturesForProjectionOf' to 'renderFeaturesForRegion' for clearer and more consistent naming.
export const renderFeaturesForProjectionOf = (
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, this really was a lot more work in a lot more places than I initially thought it would be. Thank you!
update shell
🔨 rename MapProjectionMenu rename projection to region
d3bcd1f
to
7eb091c
Compare
defb88f
to
8b971ee
Compare
Renames
map.projection
tomap.region
in configs and elsewhere.This is part 2 of 3 in a stack made with GitButler: