-
Notifications
You must be signed in to change notification settings - Fork 23
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
React Context and Project Nested Routing #508
Conversation
f082196
to
e61d263
Compare
a99ef9f
to
2c10aed
Compare
a1bde43
to
d2ab5fa
Compare
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.
Generally looks good, I love context usage and I see some component were converted to functional. There are some things I found and mentioned in my comments. Plus I see some styling issues, I will let you know about them on slack
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.
Left a few comments for now. Functionally it looks fine to me so far (I have some more testing I'd like to do on Monday though) but there were a few style issues
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.
I noticed the about page style is a little messed up now. Not sure exactly why
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.
Can you provide a bit more context? screenshots against production ibutsu on 2.5.8?
bc64354
to
fba4293
Compare
fba4293
to
fa3c728
Compare
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 In progress: 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! DRAFT 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
use the HTML class to control theme instead of applying to every element Update upload button to use ariaDisabled, add tooltip
It's not necessary for the usecase and the cypress test was failing to detect the mocked method being called.
36beade
to
3678c98
Compare
@LightOfHeaven1994 want to take another look with the latest commits? |
@mshriver will do tomorrow 👍 |
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.
Looks great to me! Cant wait to use it
I'm going to proceed with merging and squashing commits, thanks for the reviews and input! I'll be testing the master branch DB migration against an internal RH stage instance before tagging a release with this commit. |
This pulls the commits from #504 that implement react context and update the react-routing tree.
This introduces some new components for admin and profile pages, splits sidebar into a new component, and refactors many components to use a react context instead of local storage.
This also provides static routing for projects, dashboards, and updated paths for runs and results that are project scoped.