-
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
🐛 Adjust Dropdown for deprecated table support in PF V5 #1154
Conversation
Codecov ReportPatch and project coverage have no change.
Additional details and impacted files@@ Coverage Diff @@
## main #1154 +/- ##
=======================================
Coverage 44.10% 44.10%
=======================================
Files 177 177
Lines 4501 4501
Branches 1007 1007
=======================================
Hits 1985 1985
Misses 2505 2505
Partials 11 11
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.
@gildub I'm not sure I understand the purpose of this PR, didn't we just realize we do need the isAriaDisabled
prop and that's why we are keeping the deprecated Dropdown for now? Testing this branch, the tooltip does not work (where it does without this change)
Oh sorry, I was testing the bulk dropdown and not the table row one. Hmm, this does break the tooltip but it fixes the disabled behavior. We need to figure out how to keep both -- maybe we need to custom render a KebabDropdown in a cell on each row instead of using the built in actions array? I suppose that is a big refactor. |
@mturley , in which case might want to look at migrating applications pages away from the deprecated tables. |
Yeah that is definitely something we should do eventually but is probably a lot of work and should be done carefully. I would be in support though if we decided as a team that there is a good time to do it |
Ideally we can find a way to fix this issue in the short term before we go for the full refactor |
@mturley, Even though the implementation of IAction hasn't changed it seems the integration of the two implies a different behavior. A workaround is to force Tooltip by using |
Yeah, I don't think that workaround will work, we want to retain the hover behavior. I think the reason this happened is because the legacy/deprecated Table in PF was refactored to render the composable Table components under the hood, so that it was easier to maintain when there were style changes to table elements. My guess is that this shared rendering code was updated to use the new dropdown components (or something like that). The solution that comes to mind for me is to stop using the |
I would be happy to take a crack at that if you want me to @gildub |
@mturley, in the meantime I got that tracker for the issue about tooltip support on menu for legacy dropdown: patternfly/patternfly-react#9285 |
@mturley, to follow-up and answer you, I'm trying to see if PF fix is going to be addressing the issue soon enough so we don't have to refactor. In case they don't then we'll do as you described, use our own column and dropdown. |
@mturley, good news, PF team is working on the issue and are hoping to fix it before PF GA. |
Awesome! maybe we can revert my reverting of the upgrade to the new dropdowns in KebabDropdown after that then 😆 |
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, but deleting and recreating the package-lock file resulted in locking new versions of dependencies unrelated to this fix. Ideally we should keep those to a dedicated PR if we want to bump them. You can solve this by reverting to the prior package-lock version:
git checkout main package-lock.json
and then updating only PF to the newest version matching the semver range in package.json using npm update
:
npm update @patternfly/react-core
Signed-off-by: Gilles Dubreuil <[email protected]>
Signed-off-by: Gilles Dubreuil <[email protected]>
Signed-off-by: Gilles Dubreuil <[email protected]>
Signed-off-by: Gilles Dubreuil <[email protected]>
Signed-off-by: Gilles Dubreuil <[email protected]>
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!
Disable properly the row delete option (dropdown) when an application is involved in migration wave.
Note: doesn't need to be back-ported