-
Notifications
You must be signed in to change notification settings - Fork 23
[Feature Branch] React Functional Conversions #539
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
Conversation
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.
It's time!
All commits were reviewed going into the branch, this PR is not directly reviewed.
It has been soaking in stage for a while and is looking solid for a 2.6.0 release on main.
* Convert Dashboard to functional component it would be shorter to list what didn't change. Everything changes? useEffect replacing compnentDidMount No more weird handling of filter values, let API filtering do it's job Cleaned up small behaviors around button enabling State use makes way more sense now dashboard_id is sanely synced when direct navigation via URL don't wait for promise repsonse to set modal open state
Buggy, really needs to be on top of the dashboard conversion and not straight against main. the rendering/useEffect is not right, select flickers open Migrate to react-toastify Remove eventEmitter for notifications, use react-toastify Styling isn't amazing but it should follow dark/light theme and uses the PF alert component. Removed before/after upload hooks as they're unnecessary for our scope and implementation, they were only used for notifications and with react-toastify container I just moved that functionality into the file upload component itself. Move theme to context, update masthead Correctly reads browser preference or local storage to set theme on login, and track theme selection in IbutsuContext masthead can't be themed correctly in PF5, update on migration to PF6. Apply some styling to the toolbar buttons in the masthead Change theme select to ToggleGroup, following PF design guidelines JSDOM mock for window.matchMedia
Context wasn't being used correctly in sidebar Move behavior to useEffect to fetch views on project selection
Pretty straightforward migration, dropped one unused state item for total pages. Had to use callback functions for the useEffect hookst
* Convert user-dropdown to functional * address linting issues
* removed pf5 class from dropdown items * rely only on setState methods to update dropdown state * remove eventEmitter from IbutsuHeader
Please enter the commit message for your changes. Lines starting
new file for WidgetHeader
Resolved comments from review
Split ArtifactTab component resolve the blob and it's type and render the tab, separate from ResultView
* Convert importance component widget * removed unused return statement
* Add more eslint rules * Fix rest lint issues after rebase
* Convert TestHistoryTable Split LastPassed into new component * updated vars to const from review
Remove eventEmitter and ElementWrapper
No longer necessary as all components have been converted to functional in order to consume hooks directly.
useEffect wrappers for document.title changes to set consistently after render. change hoisted function definitions to block scoped variables
* Updates for tab history handling Using WCA@IBM! Add default tab hashes to result paths trying to update the hash after navigation via effect within ResultView ends up making the history ugly regardless of use of navigation hooks on tab selection. Just set the hash on the initial target for summary Create custom useTabHook Move buildTree Convert Run to useTabHook Use #summary hash for run hrefs * useTabHook, restore state and add skipHash When nested, the activeTab should not sync with the location hash. add useTabHook to jenkinsjob analysis Update link composition in filterheatmap provide hash for tabbed views use `${}` syntax Update useTabHook navigation with location include search and path as-is, search is used in a few spots * Catch error on project request from header * useTabHook in jenkinsjobanalysis view
* useUserFilter custom hook Can be further abstracted to cover the MetaFilter implementation, and provide consistent filter application and clearing across the app. Uses more recent patternfly components and react pattern suggestions Provides activeFilters state Provides memo for the filter select and text elements for field, operation, and text filters Provides memo for the actively applied filter elements Provides callbacks for filter related functions Apply useUserFilter on the UserList Directly use Table instead of FilterTable Apply PF5 react patterns for header and body props Use dataLabels and action columns screen reader props Icon and variant customization for the status labels Move administrator label from name column to status column Filtering provided by the useUserFilter hook Move UserFilter component for simplification * Create UserRow component Pull the Tr into its own component
Pull eslint / react-hooks updates for config
default dashboard is applied after dashboards are loaded and effects have been simplified/flattened. Clear dashboard on the default is clearing but SOMETHING is re-applying it.
remove deprecated rules
Working config, failing lint with everything due to prettier and fixable by prettier.
Move test history tab into memo Destructure props on all components for consistency
* Use an object for UserFilter options Provide a display name for the filter options instead of the api parameter key * Update ProjectEdit, useUserFilter hook Change how owner selection works in the form. Use the UserFilter hook to provide name and email filtering specifically, instead of only name filtering via typeahead. Having typeahead is nice, but assumes all users have SSO names set properly, which they may not. I think this layout works alright, and the default API params should populate the list with the first 25 users with no filters applied * variable rename
c2fe801
to
7e7d0a5
Compare
Manual rebase was required to resolve a few conflicts, so a force push updating the history with co-author commits was done. |
Opening a PR to observe the delta between the react migration branch and main.
https://issues.redhat.com/browse/IQE-3308