-
Notifications
You must be signed in to change notification settings - Fork 21
TCA-1281 - update routing: support friendlier urls on subdomains -> dev #613
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
Conversation
src/constants/index.js
Outdated
| WEBSITE_DESIGN_LEGACY: "/self-service/work/new/website-design-legacy/basic-info", | ||
| INTAKE_FORM: `${selfServiceRootRoute}/wizard`, | ||
| HOME_PAGE: `${selfServiceRootRoute}`, | ||
| DASHBOARD_PAGE: `/work/dashboard`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the work subdomain, should this be just /dashboard ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, thanks for catching that! I used rootRoute as a base, to keep support for local development (so when you're note on work.topcoder-dev.com, you can go to local.topcoder-dev.com/work/dashboard).
testflyjets
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really great work. I'm sure this was tedious but it makes the code cleaner and sets up some actually human-rememberable routes!
Exactly! it doesn't matter the tedious work as long as the end result is worth it 👍 |
Related tickets:
https://topcoder.atlassian.net/browse/TCA-1281
https://topcoder.atlassian.net/browse/TCA-1226
Updates the Router implementation to support apps hosted from subdomains. To be more precise, the current apps can be served from:
platform-ui.topcoder.com/learn → academy.topcoder.com
platform-ui.topcoder.com/dev-center → devcenter.topcoder.com
platform-ui.topcoder.com/gamification-admin → gamification-admin.topcoder.com
platform-ui.topcoder.com/work → work.topcoder.com
For local development support and ease, if the subdomain doesn't match any known app subdomain, it will use the subdomain as a starting prefix for the path. Eg:
local.topcoder-dev.com/academylocal.topcoder-dev.com/devcenterlocal.topcoder-dev.com/gamification-adminlocal.topcoder-dev.com/workNote: to accommodate the part where we removed the base path for all routes, for the self service, I ditched the "/work" part from the urls. The urls were a bit messed, but I think this should make them more straight forward. eg: