Fixes#950.
`icon-padding` is the only property with the `padding` type, which takes
one to four numbers. The editor rendered it as a fixed four-box
`InputArray`, so:
- an unset or single-value padding showed one number and three empty
boxes, which is the "extra empty fields" from the last comment on the
issue;
- `InputArray` only calls `onChange` once every box is filled, so typing
one, two or three values never reached the style.
Now `padding` shares the `numberArray` case and uses
`InputDynamicArray`, the same add/remove list as
`hillshade-illumination-direction`. `InputDynamicArray` gets an optional
`maxLength`, which hides "Add value" once there are four padding values.
Nothing else passes `maxLength`, so the other array fields don't change.
An unset `icon-padding` now shows one empty box, like other unset number
arrays, instead of the default `2` as a placeholder.
| Before | After |
|---|---|
|

|

|
Both screenshots show the `icon-padding` field of a new symbol layer in
Chromium.
**Performance:** none. It's the component other array properties already
use, and only `icon-padding` renders it here.
## 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: two e2e tests in
`layers-list.spec.ts`. "should save a single icon-padding value" fails
on `main`, and fails when I change the expected `[5]` to `[7]`. "should
not offer a fifth icon-padding value" fails without the `maxLength` cap.
- [x] Add an entry to `CHANGELOG.md` under the `## main` section.
Tested locally: `npm run lint` clean, `npx tsc --noEmit` clean, `npx
vitest run` (55 passed), `npx playwright test e2e/layers-list.spec.ts`
(44 passed), and the full `npx playwright test` before adding the cap
(everything passes; with 4 workers 19 tests in the modal, history and
accessibility specs timed out on my machine, and all 19 pass when rerun
with `--workers=1`).
Assisted-By: Claude Opus 5.5 (Claude Code). It helped write the fix, the
tests and this description. I've reviewed and tested the change and can
answer questions about it.
## 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
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.
Keeps the repo clean, same as several other of our repos
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This is a rough start on adding react-i18next. I'll be working on adding
more translatable strings and translations in the coming days. I'm going
to need to wrap class components in HOCs, so let me know if there's
something I should be fixing before doing that. I'm thinking now to keep
the exported class names exactly the same, and rename the existing
classes by prefixing an `I` (for internal). For example:
```
export default class AppToolbar ...
```
becomes
```
class IAppToolbar ...
const AppToolbar = withTranslation()(IAppToolbar);
export default AppToolbar;
```
I'll be able to contribute Japanese strings (I've talked to a couple
people on my team and they'll be happy to help as well), so that's the
language I decided to go with in this PR.
Closes#746
---------
Co-authored-by: Ko Nagase <nagase@georepublic.co.jp>
Co-authored-by: Harel M <harel.mazor@gmail.com>
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.