-
Notifications
You must be signed in to change notification settings - Fork 167
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
Upgrade odh dashboard to PF5 #1901
Upgrade odh dashboard to PF5 #1901
Conversation
Great work! Thanks so much for diving in on this @jenny-s51. This will be a fun one to review haha... /hold Also let us not merge this into |
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.
@jenny-s51, There is an issue related to code linting and formatting. To address this, could you please run the following commands:
npm run format
npm run lint:goal
Additionally, it appears that certain components such as Select
, Dropdown
, and ApplicationLauncher
are still imported from PF4. These components have a new implementation and cannot be updated using codemod (source). Are we planning to upgrade these components in this particular issue, or does it require a separate one?
Also there is a peer dependency issue with |
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.
Hi @dpanshug thanks so much for taking a look at this and for your helpful PR comments. I've addressed a few of them and am still working on resolving some remaining build and UI issues.
As far as updating the deprecated components, that would definitely be the next step, and it would make the most sense to track that work in a follow up issue. Updating the deprecated components may require quite a bit of refactoring, which would be better suited to a review process that is independent of this (already very large) PR. 🙂
62bba0e
to
a9d5b03
Compare
CSS also need to be updated with Patternfly 5, there is a separate codemode for it https://www.patternfly.org/get-started/upgrade#utilize-our-class-name-updater-codemod |
892523a
to
b1c1c27
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.
Self note, we need to log a tech debt to get rid of all the /deprecated
imports.
I'll test the UI now, this is just the code review.
{ | ||
<> | ||
<BrandImage src={odhApp.spec.img} alt={odhApp.spec.displayName} /> | ||
</> | ||
} |
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.
Should this not just be <BrandImage ... />
? You're creating a variable block, wrapping a fragment, then rendering a single item 🤔
@@ -108,7 +108,7 @@ const MetricsChart: React.FC<MetricsChartProps> = ({ title, color, metrics, unit | |||
</> | |||
) : ( | |||
<> | |||
<EmptyStateIcon variant="container" component={Spinner} /> | |||
<EmptyStateIcon icon={Spinner} /> |
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.
Didn't Empty state get a header/footer? Was this missed?
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.
Yes - nice catch @andrewballantyne looks like the codemods didn't pick up this instance
frontend/src/pages/notebookController/screens/server/BrowserTabPreferenceCheckbox.tsx
Outdated
Show resolved
Hide resolved
onChange: ( | ||
e: | ||
| React.MouseEvent<Element, MouseEvent> | ||
| React.ChangeEvent<Element> | ||
| React.FormEvent<HTMLInputElement>, | ||
selection: string, | ||
) => void; |
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.
This change seems unnecessary 🤔 Both users only care about selection.
frontend/src/pages/projects/screens/spawner/imageSelector/ImageStreamSelector.tsx
Outdated
Show resolved
Hide resolved
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.
Some UI issues from my testing....
Each are inline to allow for comments... except for this one:
I'm not sure how this one broke... internal CSS for PF & our overrides due to bad tab formats... is my guess, since you didn't modify the file in question (frontend/src/concepts/pipelines/content/pipelinesDetails/pipeline/PipelineDetails.tsx
)
The sidebar in the tab breaks scroll area for the topology. We lose the bottom left icons (if you scroll the sidebar all the way to the bottom, they reappear).
onUpdateVariable({ name: variable.name, type: variable.type, value: newValue }) | ||
} | ||
/> | ||
</InputGroupItem> | ||
{variable.type === 'password' ? ( |
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.
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 am unable to reproduce both the topology issue (above) and this environment variables issue in my local instance of the shared cluster. Would be great if the team could help investigate these issues cc @andrewballantyne
{!disableK8sName && ( | ||
<FormHelperText> | ||
<HelperText> | ||
<HelperTextItem icon={<ExclamationCircleIcon />} variant={'error'}> |
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.
variant={token.error ? 'error' : 'default'} | ||
> | ||
{token.error ?? | ||
'Enter the service account name for which the token will be generated'} |
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.
> | ||
{validated === 'error' | ||
? 'The path must not point to a root folder.' | ||
: 'Enter a path to a model or folder. This path cannot point to a root folder.'} |
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.
}} | ||
/> | ||
</InputGroupItem> | ||
<InputGroupText>GiB</InputGroupText> |
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.
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.
Replies to your latest code push
actions: ( | ||
<> | ||
<FavoriteButton isFavorite={favorite} onClick={() => updateFavorite(!favorite)} /> | ||
</> |
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.
This appears to be a missed point of my previous review... mind removing the fragment here too?
{...(!dashboardConfig.spec.dashboardConfig.disableISVBadges && { | ||
actions: { | ||
actions: ( | ||
<> |
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.
Fragments are not needed when dealing with 1 child... they help when you have two or more siblings and you don't have a comment parent (usually only needed when passing as a "single prop" or "returning as a single value").
@@ -11,7 +11,6 @@ export enum Actions { | |||
FORCE_COMPONENTS_UPDATE = 'FORCE_COMPONENTS_UPDATE', | |||
} | |||
|
|||
export type AppNotificationStatus = 'success' | 'danger' | 'warning' | 'info' | 'default'; |
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.
Umm... maybe just undo all of this... not sure what you were changing 🤔 I think these values are fine.
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.
Ah I think you're addressing PF errors, and you modified this to fit those. These are our notification values. These are used in frontend/src/app/AppNotificationDrawer.tsx
Where are the variants:
variant?: 'custom' | 'success' | 'danger' | 'warning' | 'info';
Can we just make this a TS reference of that?
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.
Updated to reference the PF AlertVariant
enum let me know if this is what you had in mind @andrewballantyne
@andrewballantyne I already logged a feature issue #1931 |
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.
53ea6d7
to
e8a797a
Compare
Thank you @DaoDaoNoCode nice catch! I've updated Still investigating why this update does not apply to the "Jupyter" card ... do you have any ideas how we can fix this? |
2a0c4a9
to
d544ab8
Compare
@jenny-s51 Yes, it might related to the props in |
changes to card component, revert openshift-dynamic-sdk bump fix dependency conflicts, remove comments, lint upgrade hardcocded class references to v5 classnames run codemods after rebase run linting commands fix lint errors in CI workflow comment out references to PluginLoader format sdkInitialize update pluginstore initialization update classnames and change Title to EmptyStateHeader remove cache files update to latest release versions format remove unused title import add EmptyStateActions import PR feedback from Andrew PR feedback from Andrew and Juntao apply patch format remove eslint no console remove unused imports fix missing link in Jupyter card
8ec4b51
to
5620a68
Compare
/unhold Reworking this branch to merge into a feature branch for a brief time. This won't go to incubation yet, we will look to get this safely into main, hopefully this sprint -- might be next sprint. There is still a few little items to tie up in the style department from our custom styles. Thanks again for the hard work here @jenny-s51 🎉 |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andrewballantyne The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
33c36b7
into
opendatahub-io:f/pf5-upgrade
Closes #1694
Description
WIP, do not merge
How Has This Been Tested?
Test Impact
Request review criteria:
Self checklist (all need to be checked):
If you have UI changes:
After the PR is posted & before it merges:
main