Fix debug modal options missing for the mbgljs renderer (#2293)

Fixes #1548

The Debug modal only listed the map options for `mlgljs`, so an `mbgljs`
style got an empty "Options". It now checks `renderer !== "ol"`, as
suggested in the issue, which is how `App.tsx` picks the map anyway.

## 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.

Added an e2e case with a small `mbgljs` fixture.

## Video

Debug modal for an `mbgljs` style on this branch:


https://github.com/user-attachments/assets/41a7bc71-85cf-44ae-a56e-91af7fbb3904

Fix written with Claude Code; video is an automated browser run of this
branch recorded by User Stories Bot.
This commit is contained in:
shkomg
2026-11-03 08:16:19 +02:00
committed by GitHub
parent 22af313516
commit 3f3ca9a13b
5 changed files with 23 additions and 1 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ class ModalDebugInternal extends React.Component<ModalDebugInternalProps> {
>
<section className="maputnik-modal-section maputnik-modal-shortcuts">
<h1>{t("Options")}</h1>
{this.props.renderer === "mlgljs" &&
{this.props.renderer !== "ol" &&
<>
<ul>
{Object.entries(this.props.maplibreGlDebugOptions!).filter((entry): entry is [string, boolean] => typeof entry[1] === "boolean").map(([key, val]) => {