feat: allow merging StyleImport configs #3619
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added optional
merge
property toStyleImport
that allows merging an import config with the existing style import config, instead of full override.Defaults to
false
when not defined, to stay in line with current behaviour ofStyleImport
.I haven't tested this on the example app and/or added an example, since I'm on some strict deadlines. Would love to get some help getting this PR over the finish line.
Checklist
CONTRIBUTING.md
yarn generate
in the root folder/example
app./example
)Screenshot OR Video
Tested this both on iOS & Android, but for simplicity I only added iOS demo video's here.
Test explained: the map style has both POI not showing & light mode dusk.
merge
unsetExpected: full override, so 'POI showing' falls back to default (
true
).Screen.Recording.2024-09-11.at.10.24.53.mov
merge: false
Expected: full override, so 'POI showing' falls back to default (
true
).Screen.Recording.2024-09-11.at.10.26.52.mov
merge: true
Expected: merging style, so 'POI showing' stays as defined in the style (
false
).Screen.Recording.2024-09-11.at.10.27.26.mov
Component to test with