Open BCerki opened 6 months ago
One minor thing I noticed we could clean up is rename OperationsForm
to OperationForm
to keep consistent with the rest of our application ie: Operations
for a dashboard with a list of operations, Operation
for a singular operation.
This is blocked until after Thursday when Josh and Dylan's work goes in
Much of the frontend will be refactored as part of part 2, so we probably don't need this anymore as discussed in sprint planning
Description of the Tech Debt
Will have lots of conflicts with #1385 and @joshgamache 's file-moving PR
The Next App router creates makes files routable when they're called
route.tsx
orpage.tsx
(https://nextjs.org/docs/app/building-your-application/routing/pages-and-layouts).Our app has a folder called
routes
and files calledPage.tsx
(note the capital) which are not routable, but because the names are so similar to what Next uses, there can be confusion. (Also, older versions of Next used a folder calledpages
to create routes, so there's a lot of opportunity for naming confusion.)Suggestions to improve front-end clarity:
For the industry_user roles (files in
app/(authenticated)/bceidbusiness
):withAuthorization
middleware that cuts off the(authenticated/bceidbudiness/industry_user)
bit, so add a section in thedeveloper-guide.md
about routing that explains why the frontend URLs look different from the file structure[operation]
parameter is the operation's UUID, but when a operation is first being created and doesn't have an UUID yet, the url shows the word "create". I find this a little confusing (especially in the frontend files if we useoperationId
to refer to this parameter), but that would be a huge refactor, so maybe the solution is just to mention this in the routing section of thedeveloper_guide.md
Page.tsx
to the name of the React component within it (if component names could be improved, feel free to edit)components/routes
, move any form-related components tocomponents/form
folder. Note: this change will affect import paths throughout the app, but not any routes, since components were never used for routingroutes
folder to something else that doesn't imply routing (NOTpages
, will interfere with Next's routing/cause confusion). Maybescreens
orbody
or something?user-operator/[id]/[formSection]
(this is the user-operator form) outside ofselect-operator
into thedashboard
folder. (Once the user reaches the form, they've already selected their operator; they're now adding or editing it.) Note: this will require updating routes within the app, and a possible way to handle this could be to make apageRoutes
folder like CIF has: https://github.com/bcgov/cas-cif/blob/develop/app/routes/pageRoutes.ts. This change may also require a tweak to the breadcrumbs (could potentially renameuser-operator
tomy-operator
)For the cas roles (files in
app/(authenticated)/idir
):Tech Debt Triage
The purpose of our technical debt triage process is to analyze technical debt to determine risk level of the technical debt and the value in tackling that technical debt.
Risk Value Scoring: