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 18 commits into
base: main
Choose a base branch
from

Conversation

* 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 14 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
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.

2 participants