-
Notifications
You must be signed in to change notification settings - Fork 20
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
fix(agent): action menu should have flip enabled #584
Conversation
This is more of a hack. We could do better to configure the menu to open up if there is not enough space below. Not sure if there is a way now with |
I was hoping there was a nice way to do this with the dropdown menu opening upward when needed, but it doesn't seem possible. The only thing is this:
(https://www.patternfly.org/v4/components/table/react-legacy) Forcing this dropdown to always open upward seems a little weird. Making the margins larger or just adding some bottom padding to the card seems probably better. |
Ahh that unfortunate :((. Are we okayy with |
I think a little more bottom margin would be good. Maybe leave the Fixing the menu item to dynamically pop upward would be even better but that's a lot more work for a single small display issue that has an easy workaround aready. |
Right... okayy I refactored the table to use the new The menu is flipped vertically as expected. However, the horizontal positioning to the right is not applied. It took a while to find out that Patternfly team actually filed a bug here: patternfly/patternfly-react#8013 ( I guess we have to be on blocking for now. |
Also on this note:
I think we should convert all legacy tables to use this new component so that we can use new features later. |
Nice work with the refactoring. Could you open a separate PR to just add the bottom margin then so we can get that merged in the short term, and hopefully for the next release we replace it with this PR and an updated Patternfly version? |
Oh right! I opened #590 now :D |
562faca
to
8b32681
Compare
ae24c05
to
584a5a2
Compare
Seems like the fix in this Patternfly core is already applied. But the menu is not flipping correctly, for some reason, because the Dropdown was placed within a Edit: Actually, we just need to append the menu to |
The menu is now correctly flipped. Should be ready for review again :D |
Signed-off-by: Thuan Vo <thvo@redhat.com>
Are the other changes still related/required then? |
Oh yes they are required. Sorry, I mean we need to set |
Fixes #583
Fixed #595 (this PR includes the final refactoring piece).
Refactored probe template table to use custom action menu that enables flipping when viewport boundary is reached.