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

fix overflowing plugins title and badge #5320

Closed
wants to merge 1 commit into from
Closed

fix overflowing plugins title and badge #5320

wants to merge 1 commit into from

Conversation

MikeMcC399
Copy link
Contributor

Closes #5305

This PR adds css property flex-direction: column for the class pluginTitle in src/components/plugins-list/style.module.css, correcting a display issue on https://docs.cypress.io/plugins.

The plugin badge (official, verified, community or experimental) is now always displayed below the name of the plugin and it never overflows out of the plugin's box.

It also corrects a potential issue which has not been apparent so far, that an unhyphenated plugin name longer than 24 characters would also overflow. This is a consequence of combining h3 with flex.

Before

plugins overlap

After

plugins no overflow

Verification

  1. Display https://docs.cypress.io/plugins in Google Chrome / Mozilla Firefox and vary the width of the browser. Ensure that all plugin details stay within the plugin's box.

  2. Temporarily add a 40 character unhyphenated plugin name (e.g. A234567890B234567890C234567890D234567890) and observe that this name stays inside the box independently of the browser's viewport width.

References

cc: @elylucas

@netlify
Copy link

netlify bot commented Jun 18, 2023

👷 Deploy request for cypress-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 7920b3d

@cypress-app-bot
Copy link
Collaborator

@MikeMcC399 MikeMcC399 marked this pull request as ready for review June 18, 2023 09:36
@MikeMcC399
Copy link
Contributor Author

MikeMcC399 commented Jun 18, 2023

It could also be resolved by removing the h3, but then you would need to add some other formatting for the title text, so it seemed that flex-direction: column was the simplest and most effective solution.

@mike-plummer mike-plummer self-assigned this Jun 21, 2023
@mike-plummer
Copy link
Contributor

Nice find @MikeMcC399! We could also put a flex-wrap: wrap on the div but that would result in each badge wrapping at different points which doesn't look great. Only thing I don't like about using column is it looks slightly unbalanced due to the large bottom margin on the h3 vs the tiny space between the badge and the hr. Maybe we can adjust to balance it out a bit? Thoughts @elylucas ?

@MikeMcC399
Copy link
Contributor Author

@mike-plummer

We could also put a flex-wrap: wrap on the div but that would result in each badge wrapping at different points which doesn't look great.

I also tried that out and didn't like the results.

@MikeMcC399 MikeMcC399 closed this by deleting the head repository Jun 21, 2023
@MikeMcC399
Copy link
Contributor Author

Accidentally closed. Continued in #5333.

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.

Plugin badges overflow out of box
3 participants