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

Fixed truncated dropdown menu #1138

Merged
merged 9 commits into from
Jan 6, 2024
Merged

Fixed truncated dropdown menu #1138

merged 9 commits into from
Jan 6, 2024

Conversation

sarzz2
Copy link
Contributor

@sarzz2 sarzz2 commented Nov 4, 2023

fixes #1037

Summary

In the "Sub-Articles" section of the "Contributing" page, when the dropdown menu is expanded, some section names are cut off at the right edge of the page making user scroll horizontally.

Description of changes

removed nowrap property and adjusted CSS of the subarticle to make it fit on the page

I confirm I have:

Copy link

netlify bot commented Nov 4, 2023

Deploy Preview for pydis-static ready!

Name Link
🔨 Latest commit 787609c
🔍 Latest deploy log https://app.netlify.com/sites/pydis-static/deploys/6599e67b66116000089a3e5e
😎 Deploy Preview https://deploy-preview-1138--pydis-static.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@coveralls
Copy link

coveralls commented Nov 4, 2023

Coverage Status

coverage: 100.0%. remained the same
when pulling 787609c on sarzz2:main
into a2d6103 on python-discord:main.

@jchristgit jchristgit requested a review from kosayoda November 6, 2023 11:32
@Xithrius Xithrius requested a review from GDWR December 1, 2023 22:59
@Xithrius Xithrius added area: frontend Related to site content and user interaction priority: 2 - normal Normal Priority type: enhancement Changes or improvements to existing features s: needs review Author is waiting for someone to review and approve labels Dec 1, 2023
Copy link
Member

@hedyhli hedyhli left a comment

Choose a reason for hiding this comment

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

Thank you! This was bothering me for a long time.

One problem though, this doesn't fix it on mobile:
image

Maybe it's out of scope, I could fix this case in another PR.

However, here's my idea:

We can add two lines to the max width media query (in the same file), so the dropdown menu can then be fixed on the right edge:

image

On line 12, something like this:

.dropdown-menu {
  left: unset;
  right: 0;
}

What do you think?

@sarzz2
Copy link
Contributor Author

sarzz2 commented Dec 23, 2023

works fine @hedyhli committed the changes.

Copy link
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

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

All seems good to me, thanks

pydis_site/static/css/content/page.css Outdated Show resolved Hide resolved
Co-authored-by: wookie184 <wookie1840@gmail.com>
Copy link
Member

@hedyhli hedyhli left a comment

Choose a reason for hiding this comment

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

Works beautifully 👍

@wookie184 wookie184 enabled auto-merge (squash) January 6, 2024 23:46
@wookie184 wookie184 merged commit 0487c51 into python-discord:main Jan 6, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: frontend Related to site content and user interaction priority: 2 - normal Normal Priority s: needs review Author is waiting for someone to review and approve type: enhancement Changes or improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Truncated Dropdown Menu Items in the Sub-Articles Section
5 participants