-
Notifications
You must be signed in to change notification settings - Fork 40
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
🌱 1241 replace deprecated pf dropdown #1375
Conversation
Codecov ReportAttention:
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
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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.
1 nit-pick but otherwise LGTM
isOpen={bulkSelectOpen} | ||
dropdownItems={dropdownItems} | ||
></Dropdown> | ||
></MenuToggle> |
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.
Nit-pick: just use the self closing />
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 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); |
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 seems counterintuitive to me.
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.
when a selection is made, we want to close the dropdown
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.
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.
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.
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.
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.
+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); |
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.
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>
f308019
to
c257821
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.
LGTM
removed all instances of deprecated dropdown related imports (dropdown, dropdownItem, dropdownGroup, dropdownToggle, etc)
closes #1241