The find -> all button does nothing
Maputnik version: main Browser: Firefox OS: Windows
Description of the bug: When using "all" in the JSON editor's find/replace, nothing happens. Note: this is not about "replace all".
Steps to reproduce the behavior:
- Open the OSM Liberty style from the gallery
- Open the JSON editor
- Press
Ctrl-Fto open find/replace - Type "park" in the find field
- Press "all" (not "replace all")
- Nothing happens
Screenshots:
While I agree this is hard to see, the "all" button highlights the line and not just the word of every match. This behavior is the default behavior of codemirror, which is the component we are using for showing code in maputnik. I'm not sure it's worth fighting with it to remove it to be honest...
Can the highlighting be improved so the button will do something (visible)?
Probably, but this is the default dark mode for code mirror, it might be worth opening a bug there so that the fix will be automatically propagated to this repo, which uses as much of the defaults as possible (in previous version it had a lot of overrides which made it almost impossible to upgrade to latest version, so I removed most of them). The following is the relevant package: @codemirror/theme-one-dark The relevant repo for this kind of issues is here I believe: https://github.com/codemirror/dev/issues
Here's the relevant code that initializes code mirror: https://github.com/maplibre/maputnik/blob/3ed93fbf8960fbc4cbefa71c9c333f038960cece/src/libs/codemirror-editor-factory.ts#L158