-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React Context and Project Nested Routing (#508)
* autoupdate pre-commit * Frontend refactor for context and routing Frontend updates for admin portal-edit and portal-list are working React context used to track active dashboard and project, instead of browser local storage. Dashboard, IbutsuHeader, IbutsuPage rewritten for using the context. Static routes set for project dashboard/runs/results/reportbuilder using UUID. Page component state needs to be updated in some areas when navigation orginates from the URL with params set and not component selection. Project selection and dashboard selection are hooked up to the routing with ugly event handler prop passing. Moving these to functional components will allow using useEffect with dependencies instead to control interaction between these components sidebar moved into new functional component, project views need to be accounted for in component state or in the context itself. Now when a project is not selected, there is no page rendered (no sidebar). This will need an empty state page to look good, something easy just saying to select a project or portal. Class component callbacks on setState don't pick up modified context, so I'm having to hack a function parameter into the callback functions Split Admin and Profile pages into separate component for sane routing Both now use Page instead of IbutsuPage, keeping IbutsuHeader Use an outlet in the admin and profile pages for easy routing run and result updates for routing change path relative links for react-router so that runs and results are nested under `/project/:id` Page refreshes now set both the project and dashboard selection from URL params! * remove utility functions, update Links use path relative links from components where the route relative paths don't compose correctly. Update widget-config-controller to allow view type widgets to not have any project set needs testing Updating FileUpload to remove params Updating unit test to provide the necessary context for the FileUpload component * Updates for theme handling and Upload tooltip use the HTML class to control theme instead of applying to every element Update upload button to use ariaDisabled, add tooltip * Remove FileUpload onClick prop It's not necessary for the usecase and the cypress test was failing to detect the mocked method being called. * Add empty state for no project selection
- Loading branch information
Showing
40 changed files
with
909 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// eslint.config.js | ||
export default [ | ||
{ | ||
rules: { | ||
"no-unused-vars": "warn", // this isn't actually working through pre-commit or webpack | ||
} | ||
} | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.