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

Drop old pf overrides 🧹 #20982

Merged
merged 3 commits into from
Sep 10, 2024
Merged

Conversation

jelly
Copy link
Member

@jelly jelly commented Sep 5, 2024

This drops a tiny part of our overrides.

@jelly jelly requested a review from garrett September 5, 2024 17:45
Copy link
Member

@garrett garrett left a comment

Choose a reason for hiding this comment

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

Looking into this. I am not sure the popover auto width. I did see an issue prior, and it's not clear if the PF fix would actually fix our issue.

I need to look further, but I need top sign out for today soon. I've added it to my TODO to look at this more tomorrow.

Comment on lines 7 to 11
// https://github.com/patternfly/patternfly-react/issues/5993
.pf-v5-c-popover.pf-m-width-auto {
--pf-v5-c-popover--MaxWidth: min(300px, 90%);
}

Copy link
Member

Choose a reason for hiding this comment

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

I literally saw what looks like this bug on a recent issue in Cockpit Machines. But that's with this override. I don't know if it would be better without the override or not, or if it wouldn't change a thing.

I'll have to come back to this. 🤨

Copy link
Member

Choose a reason for hiding this comment

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

I'm referring to this issue: cockpit-project/cockpit-machines#1794

(So this override doesn't actually fix the problem in that case, but we might need to revisit this problem and perhaps even make another override instead. Machines should probably change the way it calls that popover, but it also shouldn't happen like that by default too.)

Copy link
Member

Choose a reason for hiding this comment

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

Ironically, that issue in Machines is lacking this CSS workaround for whatever reason, and when I add it, it fixes the problem.

As-is, without the workaround:

Screen Shot 2024-09-10 at 11 37 39

With the workaround:

Screen Shot 2024-09-10 at 11 36 55

Copy link
Member

Choose a reason for hiding this comment

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

Related to:

It's supposed to be fixed, but it's still broken, so I don't know if we need to fix it here or elsewhere... but it does need to be fixed somewhere.

Copy link
Member Author

Choose a reason for hiding this comment

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

Uh, so we make this a global override? Imo its not great either

Copy link
Member

Choose a reason for hiding this comment

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

I agree that none of these options are great. But this is what PatternFly is giving us.

I'd personally implement this in a different way that wouldn't require so much JS and even so much CSS and DOM to do the same thing, but... (It's obvious how it should be, but this isn't done in that way, therefore it has lots of bugs like this.)

Copy link
Member

Choose a reason for hiding this comment

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

The end result is that people using the software would care if they can actually read the text or not. Screenshot 1 is clearly wrong and bad, whereas screenshot 2 is actually functional. Regardless of implementation.

Copy link
Member

Choose a reason for hiding this comment

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

But, meanwhile, it would be completely fine to merge this PR without this change. This change might be needed, and may even need to be extended (as seen above).

pkg/systemd/overview.scss Show resolved Hide resolved
Unsetting makes no difference as the height does not change in practice.
Copy link
Member

@garrett garrett left a comment

Choose a reason for hiding this comment

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

Thanks!

@jelly jelly merged commit 4bb8100 into cockpit-project:main Sep 10, 2024
82 checks passed
@jelly jelly deleted the drop-old-pf-overrides branch September 10, 2024 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants