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

🌱 1241 replace deprecated pf dropdown #1375

Merged

Conversation

gitdallas
Copy link
Collaborator

removed all instances of deprecated dropdown related imports (dropdown, dropdownItem, dropdownGroup, dropdownToggle, etc)

closes #1241

@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Attention: 10 lines in your changes are missing coverage. Please review.

Comparison is base (fbd5e3d) 41.31% compared to head (ec0abce) 41.37%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1375      +/-   ##
==========================================
+ Coverage   41.31%   41.37%   +0.06%     
==========================================
  Files         138      138              
  Lines        4330     4326       -4     
  Branches     1035     1037       +2     
==========================================
+ Hits         1789     1790       +1     
+ Misses       2453     2448       -5     
  Partials       88       88              
Flag Coverage Δ
client 41.37% <54.54%> (+0.06%) ⬆️
server ∅ <ø> (∅)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
client/src/app/components/MenuActions.tsx 100.00% <100.00%> (ø)
client/src/app/components/TargetCard.tsx 16.92% <ø> (-1.26%) ⬇️
client/src/app/layout/HeaderApp/MobileDropdown.tsx 90.00% <100.00%> (+16.66%) ⬆️
client/src/app/components/KebabDropdown.tsx 83.33% <71.42%> (+50.00%) ⬆️
client/src/app/layout/HeaderApp/SSOMenu.tsx 53.57% <0.00%> (-3.58%) ⬇️
...src/app/components/FilterToolbar/FilterToolbar.tsx 19.29% <0.00%> (-1.76%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nit-pick but otherwise LGTM

isOpen={bulkSelectOpen}
dropdownItems={dropdownItems}
></Dropdown>
></MenuToggle>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit-pick: just use the self closing />

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't test this one, but mental compile passes

@@ -17,23 +17,26 @@ export const MenuActions: React.FC<MenuActionsProps> = ({ actions }) => {
<Dropdown
isOpen={isOpen}
onSelect={() => {
setIsOpen(!isOpen);
setIsOpen(false);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems counterintuitive to me.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when a selection is made, we want to close the dropdown

Copy link
Member

@ibolton336 ibolton336 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just struck me as odd that there are no other actions involved in the select handler other than closing the dropdown. I think this component may be deprecated.

Copy link
Collaborator Author

@gitdallas gitdallas Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the dropdown items have their own. i suppose this is part of being composable and having more flexibility. could make the dropdown item have an onclick with () => setIsOpen(false); item.callback();, but then would have to pass the args too instead of just putting item.callback in there. it's nice that it can be handled by the dropdown for all selections.

Copy link
Member

@ibolton336 ibolton336 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 - After looking into this, seems that there are never any menuActions passed to the PageHeader component. I think this is a leftover component that just never got deleted.

Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
Signed-off-by: gitdallas <dallas.nicol@gmail.com>
@@ -17,23 +17,26 @@ export const MenuActions: React.FC<MenuActionsProps> = ({ actions }) => {
<Dropdown
isOpen={isOpen}
onSelect={() => {
setIsOpen(!isOpen);
setIsOpen(false);
Copy link
Member

@ibolton336 ibolton336 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just struck me as odd that there are no other actions involved in the select handler other than closing the dropdown. I think this component may be deprecated.

Signed-off-by: gitdallas <dallas.nicol@gmail.com>
@gitdallas gitdallas force-pushed the chore/1241-replace-deprecated-pf-dropdown branch from f308019 to c257821 Compare September 25, 2023 19:28
Copy link
Member

@sjd78 sjd78 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gitdallas gitdallas merged commit 5fbe7b6 into konveyor:main Sep 26, 2023
6 checks passed
@gitdallas gitdallas deleted the chore/1241-replace-deprecated-pf-dropdown branch September 26, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Replace deprecated PF dropdown with latest version
3 participants