Fix/bounds field source editor#1851
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #1851 +/- ##
===========================================
- Coverage 71.57% 46.45% -25.13%
===========================================
Files 102 3 -99
Lines 7037 127 -6910
Branches 2123 35 -2088
===========================================
- Hits 5037 59 -4978
+ Misses 1998 55 -1943
- Partials 2 13 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Please revert filename changes in this PR as they are not relevant to this change. |
This reverts commit 4f0bf5d.
for more information, see https://pre-commit.ci
|
give me some time |
|
Let's focus on this PR next. |
|
Please review the updated changes here: https://maputnik-bounds-field-source-editor.netlify.app/ |
|
There are still some open comments. Can you address those first please? |

Fix: Add bounds field to source editor UI
Closes #1037
Problem
Raster and vector sources support the optional
boundsparameter in the MapLibre style specification: a 4-value array[west, south, east, north]that defines the geographic bounding box of a source. Although Maputnik correctly reads and applies this value from JSON, it was never shown in the source editor UI. That meant users had to switch to the raw Code Editor to view or edit bounds.Fix
Added a
boundsinput field to both source editor types inModalSourcesTypeEditor.tsx, following the same pattern used forminzoomandmaxzoom:boundsis not present in the JSON, the inputs stay empty[-180, -85.051129, 180, 85.051129]TileURLSourceEditorandTileJSONSourceEditorScreenshot
Files changed
ModalSourcesTypeEditor.tsxboundstoTileURLSourceEditorPropsand rendered aFieldArrayaftermaxzoomModalSourcesTypeEditor.tsxboundstoTileJSONSourceEditorPropsand rendered aFieldArrayafter the URL fieldTesting
boundsset — all four values appear correctly in the source editorbounds— fields remain empty and the UI does not crashnpm run lintpassesnpm run buildpasses