Skip to content

refactor(places): Embed Taxonomy Explorer from web-tools - #596

Merged
Warren Ehrenfried (warrenehrenfried) merged 5 commits into
mainfrom
warrenehrenfried-embed-relocated-taxonomy-explorer
Nov 5, 2026
Merged

Warren Ehrenfried (warrenehrenfried) merged 5 commits into
mainfrom
warrenehrenfried-embed-relocated-taxonomy-explorer

Conversation

@warrenehrenfried

@warrenehrenfried Warren Ehrenfried (warrenehrenfried) commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Pull Request

Closes #538

The Taxonomy Explorer added in #504 is moving to OvertureMaps/web-tools. With this PR, the docs site embeds the tool instead of hosting it.

What changes

  • docs/guides/places/taxonomy-explorer.mdx: keeps the page, its sidebar entry, the intro, and the link to Places Taxonomy. The <TaxonomyBrowser> component is replaced by <TaxonomyExplorerEmbed />, an iframe with an accessible title. Its height is clamp(600px, 80vh, 900px). Below the embed:

    • an "open the Taxonomy Explorer in a new tab" link as a fallback
    • a Downloads section linking to the three CSVs on web-tools

    Both use plain Markdown links so the URLs survive the llms-full.txt export.

  • New src/components/TaxonomyExplorerEmbed.jsx (+ CSS module). The embed's URL and theme param are in taxonomyExplorerEmbed.utils.js. The page passes the docs color mode as ?theme=light|dark. The iframe renders after hydration so it loads once with the correct theme, and toggling the docs theme reloads it with the new value.

  • The /guides/places/taxonomy-browser → /guides/places/taxonomy-explorer/ redirect is unchanged and still works.

Removed (added in #504, now dead)

  • src/components/taxonomyBrowser.jsx, src/components/taxonomyViz.jsx, src/css/taxonomyBrowser.css
  • src/components/__tests__/taxonomyBrowser.test.jsx, src/__mocks__/docusaurus-useBaseUrl.js, and the matching @docusaurus/useBaseUrl alias in vitest.config.mjs
  • d3-hierarchy and d3-shape (plus transitive d3-path) from package.json / package-lock.json. Nothing else uses them.
  • static/taxonomy/2026-09-23.0/taxonomy.json. web-tools hosts the taxonomy data now, for the 2026-10-21.0 release.

The three September CSVs in static/taxonomy/2026-09-23.0/ stay. External projects download them from docs.overturemaps.org/taxonomy/2026-09-23.0/, including OvertureMaestro, which also falls back to listing static/taxonomy on main.

I kept the eslint.config.mjs change from #504 (linting .mjs with the React config) because it isn't specific to the taxonomy tool.

Contract with web-tools

Agreed in the review of OvertureMaps/web-tools#1:

No other files in the repo (blog posts, index.mdx, taxonomy.mdx) linked to /taxonomy/2026-09-23.0/ or the removed components.

Validation

  • npx vitest run: passed (5 files passed, 1 skipped; 122 tests passed, 7 skipped). Includes new unit tests for the embed URL helper.
  • npx eslint .: passed (0 errors; 3 warnings, none in changed files)
  • npx markdownlint docs/guides/places/taxonomy-explorer.mdx: passed
  • npx prettier --check on new/changed source files: passed
  • npm run build: passed. build/taxonomy/2026-09-23.0/ contains only the three CSVs, llms-full.txt includes the fallback and download URLs, and the redirect page is still generated.
  • I served the build locally and loaded /guides/places/taxonomy-browser. It redirected to /guides/places/taxonomy-explorer/, and the iframe rendered with src=…/taxonomy-explorer/?theme=light. After toggling dark mode, src changed to ?theme=dark.

Replace the in-repo TaxonomyBrowser component with an iframe embed of
the Taxonomy Explorer published from OvertureMaps/web-tools, and remove
the component, its tests, CSS, test mocks, d3 dependencies, and the
static taxonomy data that moved with it.

Closes #538

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Warren Ehrenfried <warrenehrenfried@gmail.com>
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

🗺️ Overture Docs preview is live!

🌍 Preview site https://staging.overturemaps.org/docs/pr/596/index.html
🕐 Updated Nov 05, 2026 20:14 UTC
📝 Commit 7e609c3

Note

♻️ This preview updates automatically with each push to this PR.

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

✅MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Max errors Warnings Elapsed time
✅ JAVASCRIPT eslint 32 0 0 11.96s
✅ MARKDOWN markdownlint 286 0 0 0.28s
✅ SQL sqlfluff 79 0 0 3.5s

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@10.1.0 --custom-flavor-setup --custom-flavor-linters JAVASCRIPT_ES,MARKDOWN_MARKDOWNLINT,SQL_SQLFLUFF

MegaLinter is provided by OX Security
Show us your support by starring ⭐ the repository

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Warren Ehrenfried <warrenehrenfried@gmail.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Warren Ehrenfried <warrenehrenfried@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Removing the local tool requires coordination with the still-open OvertureMaps/web-tools#1 and verification that its production deployment permits cross-origin framing and serves the explorer and all three CSVs.

No open issues 🎉

What changed in this PR

Moves the Places Taxonomy Explorer out of the docs codebase and embeds the version hosted by OvertureMaps/web-tools, addressing #538 while retaining the existing documentation page.

Changes:

  • Adds a theme-aware iframe, shared URL helpers, and helper tests.
  • Provides a new-tab fallback and CSV links for the October release.
  • Removes the local visualization, associated styles and tests, and unused D3 dependencies.

Deployment depends on the web-tools explorer and its downloads becoming available, as noted in the PR description.

File Description
vitest.config.mjs Removes the obsolete Docusaurus mock alias.
static/​taxonomy/​2026-09-23.0/​basic_categories.csv Removes the locally hosted September CSV.
src/​css/​taxonomyBrowser.css Removes local visualization styles.
src/​components/​taxonomyViz.jsx Removes the local sunburst visualization.
src/​components/​taxonomyExplorerEmbed.utils.js Centralizes explorer URLs and theme parameters.
src/​components/​TaxonomyExplorerEmbed.module.css Defines iframe sizing and placeholder styles.
src/​components/​TaxonomyExplorerEmbed.jsx Adds the theme-aware, hydration-gated embed.
src/​components/​taxonomyBrowser.jsx Removes the local taxonomy browser.
src/​components/​__tests__/​taxonomyExplorerEmbed.utils.test.js Tests theme URL generation.
src/​components/​__tests__/​taxonomyBrowser.test.jsx Removes tests for the retired implementation.
src/​__mocks__/​docusaurus-useBaseUrl.js Removes the unused test mock.
package.json Removes direct D3 dependencies.
package-lock.json Removes corresponding D3 dependency entries.
docs/​guides/​places/​taxonomy-explorer.mdx Uses the embed and adds fallback and download links.

Review effort: Balanced

@lowlydba John McCall (lowlydba) left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sweet! Explorer seems to embed and load fine for me on Chrome on the branch deploy 🚀

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alex and Claude Conspired to review this PR
Two findings:
One must-fix (removing the September CSVs breaks external code that downloads them) and one should-fix (the LLM export drops this page's URLs). Details are inline.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Taxonomy Explorer packed its bags for web-tools. Smooth move, Warren!

Corgi Moving GIF

OvertureMaestro and other external projects download these CSVs from
docs.overturemaps.org/taxonomy/2026-09-23.0/, and OvertureMaestro falls
back to listing static/taxonomy on main. Deleting them would break both.
taxonomy.json stays removed because only the old explorer used it.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Warren Ehrenfried <warrenehrenfried@gmail.com>
docusaurus-plugin-llms strips imports, so the JSX links lost their URLs
in llms-full.txt. Plain Markdown links keep them, still open in a new
tab, and remove the duplicated release version in TAXONOMY_DOWNLOADS_URL.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Signed-off-by: Warren Ehrenfried <warrenehrenfried@gmail.com>
@warrenehrenfried

Copy link
Copy Markdown
Contributor Author

John McCall (@lowlydba) thanks for iframe idea! Glad we could keep the explorer without the overhead to the docs page 💯

@warrenehrenfried
Warren Ehrenfried (warrenehrenfried) merged commit 98e4dc6 into main Nov 5, 2026
17 checks passed
@warrenehrenfried
Warren Ehrenfried (warrenehrenfried) deleted the warrenehrenfried-embed-relocated-taxonomy-explorer branch November 5, 2026 20:17

This branch was successfully deployed

1 active deployment
staging — 7e609c32 Deployed Nov 5, 2026 by warrenehrenfried via Cleanup #222
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Relocate taxonomy explorer from docs repo

4 participants