Replace string-based redirects in route definitions with named routes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- frontend
Research direction
Start with the four listed route definitions in pages/account/routes.js and pages/admin/routes.js, then inspect the password child route under user-settings-security to identify its existing structure. Replace the redirects with named route objects and add the missing password route name; done means all four redirects use names and the password redirect can reference its child route.
Written by the indexing model from the issue text.
Description
Part of #8094 (prerequisite: #8084)
What
4 route definitions use hardcoded path strings for their redirect property instead of named route objects.
| File | Line | Current | Should be |
|---|---|---|---|
pages/account/routes.js |
46 | redirect: '/account/settings' |
redirect: { name: 'user-settings-overview' } |
pages/account/routes.js |
81 | redirect: '/account/security/password' |
redirect: { name: '...' } (see note below) |
pages/admin/routes.js |
42 | redirect: '/admin/overview' |
redirect: { name: 'admin-overview' } |
pages/admin/routes.js |
59 | redirect: '/admin/settings/general' |
redirect: { name: 'admin-settings-general' } |
Note
The password child route under user-settings-security doesn't currently have a name property. A name will need to be added to that child route (something like user-settings-security-password) before the redirect can reference it.
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 147
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from FlowFuse/flowfuse
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
area:frontend size:S type:enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
bug needs-triage
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
story
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
All issues in FlowFuse/flowfuse
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·