dbt-labs / docs.getdbt.com

The code behind docs.getdbt.com
https://docs.getdbt.com/
Apache License 2.0
113 stars 861 forks source link

Updates query param handling on /guides #5712

Closed john-rock closed 4 days ago

john-rock commented 4 days ago

What are you changing in this pull request and why?

Asana Task This PR allows additional query params to be used on the /guides page. Additional query params are required for activating Mutiny preview mode. Currently we can not activate Mutiny previews on this route.

Slack thread with Mutiny support for more context.

Old Behavior

Only tags and level were allowed as query params. Any additional query param would be removed. Access https://docs.getdbt.com/guides?mutiny=1 and see the mutiny param get automatically removed on page load.

New Behavior

Additional query params can be used while keeping the tags and level params only available to be filtered on.

Testing Steps

  1. Access https://docs-getdbt-com-git-fix-params-on-guides-dbt-labs.vercel.app/guides?mutiny=1 and confirm mutiny param does not get removed.
  2. Confirm filtering by URL param still works https://docs-getdbt-com-git-fix-params-on-guides-dbt-labs.vercel.app/guides?mutiny=1&tags=Best+practices and that the mutiny param does not get applied as a filter.
vercel[bot] commented 4 days ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs-getdbt-com ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 3:14pm