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

Increase horizontal whitespace between navbar icon links #1964

Merged
merged 1 commit into from
Aug 28, 2024

Conversation

gabalafou
Copy link
Collaborator

@gabalafou gabalafou commented Aug 21, 2024

Fixes external issue: Quansight-Labs/czi-scientific-python-mgmt#81

This PR increases the horizontal gap between the navbar icons slightly (1rem to 1.12rem) to align better with accessibility guidelines. The idea is to make sure that the circle targets (pink) do not overlap:

visualization of circle targets shows that with code changes in this PR, the circle targets no longer overlap

It would be nice if we could rework the navbar icon links to have a known hit area at build time (hit area being the union of width, height, and padding). That way we could calculate the needed horizontal and vertical margins with SCSS, like so:

@mixin enclosing-circle-margin($hit-area-width, $hit-area-height) {
  // the diagonal of the hit area rectangle is also the diameter of the minimum enclosing circle
  $hit-area-diagonal: math.hypot($hit-area-width, $hit-area-height);
  $mx: ($hit-area-diagonal - $hit-area-width) / 2;
  $my: ($hit-area-diagonal - $hit-area-height) / 2;

  margin: $my $mx;
}

But that will have to be for another time.

@Carreau
Copy link
Collaborator

Carreau commented Aug 28, 2024

error in setup seem unrelated (2to3 install in brew setup fails as it already exists). Not sure why brew try to install Python 3.12... relaunched in case it was fixed upstream

Copy link

Coverage report

This PR does not seem to contain any modification to coverable code.

@Carreau
Copy link
Collaborator

Carreau commented Aug 28, 2024

Ok, test passing.

@Carreau Carreau merged commit feb5fc2 into pydata:main Aug 28, 2024
29 checks passed
@gabalafou gabalafou deleted the increase-navbar-icon-whitespace branch September 12, 2024 20:13
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