Skip to content
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

[Feature Branch] React Functional Conversions #539

Draft
wants to merge 39 commits into
base: main
Choose a base branch
from

Conversation

mshriver
Copy link
Contributor

@mshriver mshriver commented Jan 10, 2025

Opening a PR to observe the delta between the react migration branch and main.

https://issues.redhat.com/browse/IQE-3308

  1. Convert dashboard to functional #534
  2. Convert IbutsuHeader to functional component #535
  3. FileUpload React functional conversion #540
  4. Sidebar useEffect conversion #541
  5. Convert ReportBuilder to functional #542
  6. Convert UserDropdown to Functional #543
  7. Convert FilterTable and MetaTable #544
  8. Convert AddTokenModal and DeleteModal to functional #545
  9. Convert ClassifyFailureTable to functional #546
  10. DRAFT convert classification dropdown #547
  11. Convert UserDropdown to Functional - Followup #548
  12. Fix bug, useState instead of useContext #549
  13. Convert ResultView #550
  14. Convert EditWidgetModal #551
  15. Convert NewDashboardModal #552
  16. Convert TabTitle #553
  17. Convert custom view component #554
  18. Refactor ParamDropdown and WidgetHeader #555
  19. Convert NewWidgetWizard #556
  20. Convert MultiValueInput #557
  21. Convert RunSummary #558
  22. Convert TableStates #559
  23. Convert Importance by Component Widget #560
  24. Convert TestHistoryTable #562
  25. Convert ProjectEdit #563
  26. Add more eslint rules #564
  27. Add more eslint rules #566
  28. Convert projectlist #568
  29. Update timerange test history #569
  30. Convert Admin Page #570
  31. Convert UserEdit to functional #571
  32. Convert ResultAggregator widget #572
  33. Convert UserTokens #573
  34. Convert UserProfile #574
  35. Convert UserList #575
  36. Convert EmptyObject #576
  37. Convert resultSummary Widget #578
  38. Added logic for different keycloak auth paths (#567) #581 (cherry picking Added logic for different keycloak auth paths #567)
  39. Convert AccessibilityAnalysisView #582
  40. Convert Accessibility dashboard #585
  41. Convert CompareRunsView #586
  42. Convert JenkinsJob View #588

* 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
@mshriver mshriver changed the title Convert dashboard to functional (#534) [Feature Branch] React Functional Conversions Jan 12, 2025
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
@mshriver mshriver added enhancement New feature or request frontend labels Jan 22, 2025
mshriver and others added 23 commits January 22, 2025 18:47
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
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
* Convert admin route

* Convert Admin and AdminHome

* Update Auth service

some basic simplification, leaving class with static methods in place
Change to FormSelect for Project selection
mshriver and others added 12 commits February 19, 2025 07:53
* Convert projectlist

add empty state, fix filtertable rerender

* Disable buttons on empty filter, add onRemoveFilter
syntax updates to AddTokenModal

simplification of tokens page, remove pagination from URL params
* Convert ResultAggregator widget

* get rid of callback

* Use explicit props to configure the filter state of the widget
Convert dropdown too

Split MetaFilter component file
Fix MetaFilter errors due to state update scope

Updates from great code review
* Convert resultSummary Widget

* Let the catch handle the error
* Added logic for different keycloak auth paths

* Modified code with suggestions

* Fixed linting issues

Co-authored-by: wcater803 <96142740+wcater803@users.noreply.github.com>
Incomplete, but surface level conversion so it doesn't get left behind
* DRAFT Convert CompareRunsView

* TODOs open for compareruns, page is 90% functional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants