Skip to content
Snippets Groups Projects
Unverified Commit 01a06c97 authored by Anton Kulyk's avatar Anton Kulyk Committed by GitHub
Browse files

Add slugs to URLs to make them friendlier (#15989)

* Install slugify

* Add utils to slugify and parse entity URLs

* Add `<Entity.Link />` component

Basically just a `<Entity.Name />`,
but wrapped inside `<Link />`

* Add slugs to `/browse/:databaseId` URLs

* Use constant for "Saved Questions" database ID

* Fix "Saved Questions" not displayed in breadcrumbs

* Fix opening browse page for "Saved Questions"

* Add slugs to `/collection/:id` URLs

* Fix personal collection page slug

* Remove `describe.only`

* Remove unnecessary type coercion

* Fix typo

* Fix collections not highlighted in the sidebar

* Add slug to collection `/archive` URL

* Add slug to collection `/edit` URL

* Add slug to collection `/permissions` URL

* Use slug in `getInitialCollectionId` selector

* Explicitly pass root ID to `Urls.collection`

* Pass prop to EntityLink's Link component

* Fix DashboardMoveToast collection link

* Allow overwriting EntityLink's Link component

* Fix links in QueryBuilder's search

* Fix collection link in search results

* Fix navigating to collection after question archived

* Fix navigating to collection from pulse edit

* Slugify users' personal collection URLs

* Test slugified collection URLs are opened correctly

* Add slugs to `/dashboard/:id` URLs

* Fix dashboard URLs at admin public sharing page

* Fix opening dashboards from main page

* Fix navigation to saved automatic dashboard

* Fix dashboard moving

* Fix dashboard history

* Fix closing dashboard editing modal

* Fix dashboard details form is empty

Reproduced if opening the form via URL
(`/dashboard/:id/details`)

Works correctly if the details modal is opened from a dropdown menu

* Fix dashboard copy form crash

Reproduced if opening the form via URL (`/dashboard/:id/copy`)

* Fix copying dashboard

* Fix closing dashboard copy modal

* Fix navigation once dashboard is created

* Replace hardcoded "root" id with a constant

* Assert pathnames instead of URLs

* Fix duplicate modal not closing automatically

* Fix URLs on Activity page

* Fix navigating to dashboard question is added to

* Fix archiving dashboard

* `dashboardId` —> `slug`

* Add slugs to `/question/:id` URLs

* Fix links to questions on Activity page

* Switch questions to slugified URLs

* Remove not used import

* Update pathname assertion

* Fix collection URL builder fails receiving `null`

* Ensure question URL builder returns valid URL

* Update pathname assertions

* Update pathname assertions

* Update pathname assertions

* Update pathname assertion

* Update pathname assertion

* Add question URL builder unit tests

* Fix collection URL builder

* Fix `null` collection ID when building URL

* Fix repro test issue reference

* Move URLs tests into onboarding folder

* Enable #15256 repro test

* Fix slugs for edge cases
parent daa805f3
No related branches found
No related tags found
No related merge requests found
Showing
with 107 additions and 74 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment