Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document a Philosophy for our URL routing scheme #33007

Closed
tgolen opened this issue Dec 13, 2023 · 3 comments
Closed

Document a Philosophy for our URL routing scheme #33007

tgolen opened this issue Dec 13, 2023 · 3 comments
Assignees

Comments

@tgolen
Copy link
Contributor

tgolen commented Dec 13, 2023

Coming from this thread in #generalists room.

Problem

The routes used in the App are added based on individual best guesses on what patterns to follow when adding new routes. This lack of cohesion leads to difficulty when we want to plan for large-scale navigation changes (such as switching to a three-pane layout where different panes use different URLs).

Solution

Try to write down what our current philosophy is on URL routing.

@tgolen
Copy link
Contributor Author

tgolen commented Dec 13, 2023

Analysis

Here are all the routes that currently exist: https://docs.google.com/spreadsheets/d/1GC5WqzmOXhwYpQgC9DCtoAzrQ2OcULi-YsNlfFWzQQ0/edit?usp=sharing

They fall into a couple of general buckets.

  • Routes based on page (eg. /settings, /teachersunite)
  • Routes based on action usually followed by an object (eg. /new/task, /create/split, /send, /sign-in-with-saml)
  • Routes based on object (eg. /r, /workspace, /bank-account)

Then there are quite a few extra things put into the URL path:

  • domains
  • report IDs
  • transaction IDs
  • report action IDs
  • policy IDs
  • step indexes

Then there are also some query parameters:

  • backTo
  • login
  • policyID
  • country
  • currency

Some routes use optional params. Examples:

  • r/:reportID? - can be either:
    • /r - load the last accessed report or concierge
    • /r/<reportID> - load a specific report
  • bank-account/:stepToOpen?

Some routes are prepended with / while others aren't.

@tgolen
Copy link
Contributor Author

tgolen commented Dec 13, 2023

Proposed Philosophy

@tgolen tgolen changed the title Document a philosophy for our URL routing scheme Document a Philosophy for our URL routing scheme Dec 13, 2023
@tgolen
Copy link
Contributor Author

tgolen commented Dec 18, 2023

This is mostly done. Some ongoing chatter, but I at least got something written down

@tgolen tgolen closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant