Component Review - Routing #584
Open
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.
Description
This is a service review of frontend migration on OnTrack.
Ontrack Service Review
Team Member Name
Disuru Rathnayake
Student ID: s223987245
Service Name
Routing
Files in this Service
Routing.coffee
Service Purpose
The Routing service helps guide users to the right starting page. If someone tries to access the site without a specific path, or just with an empty path (""), they are taken to the root path ("/"). From there, they are automatically directed to the home page ("/home"). This makes sure everyone starts from the same place, making it easier to use the site.
Service Outcomes and Interactions
Expected Outcome:
Users entering the site with an empty route ("") are automatically redirected to the main page ("/").
Users who reach the main page ("/") are further redirected to the home page ("/home").
Interactions:
Inputs:
route: String that indicates the current path or route in the application.
Outputs:
The component reacts by redirecting users based on the provided route:
Service Migration Plan
Migration Steps:
• Run the current program to see how it works and what important parts it has.
• Remove the line that includes src/app/config/routing/routing from the program files.
• Take out the routing settings from the config.coffee file.
• Add the routing settings to a TypeScript file that already handles routing. This helps keep everything in one place.
• Update the TypeScript file with the new routes.
• Make sure this file is connected properly to work with the rest of the program.
• Check that the new setup works just like the old one by running the same tests.
• Fix any problems that come up during testing.
Component Review Checklist: Routing
Example : User input - http://localhost:4200
Example : User input - http://localhost:4200/
After redirection, the new page or expected content is visible and functional, confirming that the routing logic is implemented correctly.