Repository navigation
Give the catalog and charts views their own routes - #10
Merged
Merged
Conversation
Catalog and charts were two tabs toggled by local state, so neither view
had a URL of its own: no shareable link, no back/forward between them.
Add /u/{login}/charts, /u/{login}/all/charts, and
/u/{login}/orgs/{org}/charts next to the catalog routes. The handler
passes the active view as an Inertia prop and the tabs become links, so
each view now maps to a route.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Catalog and charts were tabs toggled by local Svelte state, so neither view had its own URL (no shareable link, no back/forward).
Routes
/u/{login}/u/{login}/charts/u/{login}/all/u/{login}/all/charts/u/{login}/orgs/{org}/u/{login}/orgs/{org}/chartsChanges
HomeHandlerpasses the activeviewas an Inertia prop; the charts variants reuse the same loaders (no duplicate fetch).viewlocal state is gone.Verification
go test ./...→ ok (new tests for the default view and the three charts routes)npm run test:fe→ 42 passedvite build→ ok