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

[A11y] Adjusted homepage circuit board label sizes to accommodate text spacing #9059

Merged
merged 4 commits into from
Mar 18, 2022

Conversation

advay26
Copy link
Contributor

@advay26 advay26 commented Mar 16, 2022

Addresses #8988

Problem:

On the Home page, when text spacing is applied, the 'package versions' and 'unique packages' text overflows outside its container.

NOTE: I was told to use codepen.io to apply text spacing, but it can also be achieved by adding this to the stylesheet:

* {
 line-height: 1.5 !important;
 letter-spacing: 0.12em !important;
 word-spacing: 0.16em !important;
}

p{
 margin-bottom: 2em !important;
}

Regular home page:
image

After applying text spacing:
image

Fix:

To fix this, I made the label containers wider to accommodate the expanded text. The resulting UI changes seem minor to look at, but I'm happy to get additional feedback on that.

After the changes,

Regular home page:
image

After applying text spacing:
image

@advay26 advay26 requested a review from a team as a code owner March 16, 2022 00:22
@loic-sharma
Copy link
Contributor

Do you know why we're using width for the circuit board instead of padding? This manual width approach may break once we reach 1 trillion downloads.

@agr
Copy link
Contributor

agr commented Mar 16, 2022

I think the package downloads box width should be increased a bit more:
image
That 1 looks too close to the left edge and might overflow when it is turned to some other digit.

@agr
Copy link
Contributor

agr commented Mar 16, 2022

If we are to go with dynamic width approach, we also might need to update the image to move the "unique packages" box a little bit down to remove the chance of it overlapping with the "package downloads" one.

@shishirx34
Copy link
Contributor

Agree, I would check the padding solution if possible for dynamic increases in content and width.

…xpansion, moved unique packages label down to allow more space once labels expand
@advay26
Copy link
Contributor Author

advay26 commented Mar 17, 2022

@NuGet/gallery-team
I've made the following changes:

  • Used padding to dynamically decide the label width
  • Anchored labels on one of their sides to avoid spilling over into the circuit board image ('package downloads' and 'unique packages' can only expand rightwards, 'package versions' can only expand leftwards)
  • Edited the circuit board image (svg) to shorten the stem under the 'unique packages' label and move the label down. This was done so that there would be greater separation between the 'unique packages' label and the 'package downloads' label in case the 'package downloads' label expands rightwards.

How the changes look

Regular home page:
image

With text spacing:
image

Also, NuGet's now ready for its meteoric growth, nothing stopping us now 💪🚀
image

Copy link

@clairernovotny clairernovotny left a comment

Choose a reason for hiding this comment

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

LGTM on the aesthetic side. I can't comment on the CSS.

@advay26 advay26 merged commit de0ef5e into dev Mar 18, 2022
@advay26 advay26 deleted the dev-advay26-a11y-text-spacing branch March 18, 2022 19:52
@dannyjdev dannyjdev mentioned this pull request Mar 22, 2022
7 tasks
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.

None yet

7 participants