## Description
The sprite picker added in #2359 only replaced the input for
`icon-image`. Maputnik already treats `background-pattern`,
`fill-pattern`, `line-pattern`, `fill-extrusion-pattern`, and
`icon-image` as sprite-backed properties through the shared
`iconProperties` list. The other four properties still rendered the
text-only autocomplete, so their dropdowns could not preview the sprite
atlas even though they use the same sprite catalog in the style spec.
This change routes every property in `iconProperties` through
`InputSprite`. Non-sprite string fields continue to use `InputString`,
and free-form values, search, keyboard selection, and expression editing
keep the behavior introduced in #2359. Having one special case for
`icon-image` and another branch for the remaining sprite properties was
redundant and left the UI inconsistent.
This is a follow-up to #2359 and completes the sprite-preview behavior
related to #1294 for all sprite-backed style properties.
## Visuals
No new visual treatment is introduced. Before this change, the four
pattern fields displayed the text-only autocomplete; after this change
they display the same thumbnail/search/keyboard picker already shown for
`icon-image` in #2359.
## Verification
- Added Playwright coverage for `background-pattern`, `fill-pattern`,
`line-pattern`, and `fill-extrusion-pattern`. Each case opens the
picker, verifies rendered atlas thumbnails, selects a sprite, and
asserts the persisted style value.
- `npm run lint`
- `npm run build`
- `npm run test-unit -- --run` (55 tests passed)
- `npm run test -- e2e/sprite-picker.spec.ts --workers=1` (19 tests
passed)
- Confirmed the new assertion fails when the expected option count is
deliberately mutated, then restored the assertion.
- Local `.npmrc` changes were not included in the commit.
## Launch Checklist
- [x] Briefly describe the changes in this PR.
- [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
- [x] Write tests for all new functionality.
- [x] Add an entry to `CHANGELOG.md` under the `## main` section.
Co-authored-by: FantasticSPM <asd507172@gmail.com>
## Description
Add a dedicated sprite autocomplete for literal `icon-image` values.
Each searchable option shows its thumbnail and name, and selection keeps
the original sprite ID in the style. Keyboard selection and free-form
text remain available; expressions continue to use the existing
expression editor. Pattern fields keep their existing inputs.
The preview uses atlas bounds and pixel ratios. SDF sprites are decoded
into neutral black silhouettes using MapLibre's distance-field contour,
rather than displaying the distance bitmap. This is a catalog preview,
not a rendering of the layer's data/zoom-dependent paint or halos.
Sprite arrays retain MapLibre namespaces, and URL query parameters
remain after the JSON/PNG extension.
Metadata responses from a previous style are ignored after the sprite
source changes. Missing atlas images leave the names usable. The menu
opens above the field when there is not enough space below it.
Fixes#1294. Implements the scope proposed in the issue and welcomed by
CommanderStorm; follows #1792's request for a separate sprite input with
images in the option rows. No new dependencies or changes to the generic
`InputAutocomplete` component.
## Visuals
| Before | After |
| --- | --- |
| 
| 
|
SDF preview beside the actual MapLibre render of the selected fixture:

[Isolated screenshots and
provenance](https://github.com/jjohnnystwsss/maputnik/tree/d368f3509fbb7c308ecdce6c97701af982bff14c)
(not part of the feature diff).
## Verification
- Five new pure-logic tests cover URL handling, metadata
namespaces/bounds, empty sources and SDF alpha conversion; all 55 unit
tests pass.
- Fifteen new driver-based browser cases cover actual option pixels,
search, mouse/keyboard selection, viewport placement, persisted style
values, expression editing, sprite replacement/removal, namespaces,
broken images and delayed old responses.
- On the untouched base, the thumbnail assertion fails while all four
text options are present.
- Deliberately changing the expected thumbnail color fails; disabling
the stale-response guard also fails. Both mutations were reverted.
- Full official `npm test -- --workers 2`: all 199 cases pass (184
existing + 15 new). Lint, SCSS lint and type-checked production build:
passed.
Small sprite fixtures were authored for this change and carry the
repository's MIT license. No external tile, sprite or paid service is
required by the new cases.
Codex assisted with the design, implementation and tests; the preview
and actual map output were inspected locally.
## Launch Checklist
- [x] Briefly describe the changes in this PR.
- [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
- [x] Write tests for all new functionality.
- [x] Add an entry to `CHANGELOG.md` under the `## main` section.
Co-authored-by: Codex <noreply@openai.com>
## Launch Checklist
See title,
Also removed some "_" from some file names.
This is a pure refactoring, no logic changes.
- [x] Briefly describe the changes in this PR.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
## Launch Checklist
This PR adds back the error panel which was under the map for some
reason.
It also highlights problematic layers in the layers list (which already
worked).
It also highlights the field that has an error related to it.
It fixes the error types throughout the code.
Before:
<img width="1141" height="665" alt="image"
src="https://github.com/user-attachments/assets/c0593d6c-8f14-41b3-8a51-bc359446656d"
/>
After:
<img width="1141" height="665" alt="image"
src="https://github.com/user-attachments/assets/1ffeebb7-31ea-4ed5-97f4-fc5f907a6aea"
/>
- [x] Briefly describe the changes in this PR.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
- [x] Write tests for all new functionality.
- [x] Add an entry to `CHANGELOG.md` under the `## main` section.
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
## Launch Checklist
I've created a folder for modals and moved them all inside.
I removed the icons which were small files with no real benefit and
moved the icons to where they were used.
I fixed an issue with the close button position in modal.
I've added missing translation to "Links" in debug modal.
Before:
<img width="610" height="81" alt="image"
src="https://github.com/user-attachments/assets/dd7520f6-9634-4ff1-a83d-99ceae7c9144"
/>
After:
<img width="610" height="81" alt="image"
src="https://github.com/user-attachments/assets/fe3a2ccf-6c09-42ab-bf6f-dd30d3c68e13"
/>
- [x] Briefly describe the changes in this PR.
- [x] Include before/after visuals or gifs if this PR includes visual
changes.
- [ ] Add an entry to `CHANGELOG.md` under the `## main` section.
Fixes#870
- #870
This regression bug was introduced as part of the refactoring of
typescript.
Here:
- #848
I've added tests to cover the scenario so that it won't happen again,
hopefully.
Adds lint to CI and fixes errors.
I'm not sure I'm fully proud of all the solutions there.
But there's no lint issues and the lint is being checked as part of the
CI.
---------
Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com>
In this PR I have changed some of the jsx files to tsx file.
I'm starting off with the "leafs" so that migration of the rest will be
easier, hopefully.
What I'm basically doing is taking a jsx file, copy paste it into:
https://mskelton.dev/ratchet
And after that I'm fixing the types as needed.
It's not a very long process.
Hopefully more PRs will follow and this will be over soon.
I don't plan to migrate the storybook as I generally don't understand
why is it useful, I'll open an issue to see if anyone thinks
differently.