Skip to content

Increased contrast of LogoSuite.Logobar play/pause button background #1034

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

Merged
merged 3 commits into from
May 30, 2025

Conversation

rezrah
Copy link
Collaborator

@rezrah rezrah commented May 30, 2025

Summary

Resolves https://github.com/github/primer/issues/5240

Increases contrast of the play/pause button against animated logos in marquee mode. Logobar controls now have dedicated tokens, decoupling them from the Button styles they previously used.

Note: Color choices now are parity (or closest match) with custom styles applied in Dotcom. E.g. from the custom video controls:

Screenshot 2025-05-30 at 11 36 10

🔗 Preview link

List of notable changes:

  • Adds custom tokens for logobar controls, replacing the previous buttons ones
    • Mostly affects dark mode, light mode relatively unchanged but still uses a dedicated a token if further user customization is needed

What should reviewers focus on?

  • Check we're happy with the color choice, as dark mode value falls outside of our base color scales

Steps to test:

  1. Use this preview link

Contributor checklist:

  • All new and existing CI checks pass
  • Tests prove that the feature works and covers both happy and unhappy paths
  • Any drop in coverage, breaking changes or regressions have been documented above
  • UI Changes contain new visual snapshots (generated by adding update snapshots label to the PR)
  • All developer debugging and non-functional logging has been removed
  • Related issues have been referenced in the PR description

Reviewer checklist:

  • Check that pull request and proposed changes adhere to our contribution guidelines and code of conduct
  • Check that tests prove the feature works and covers both happy and unhappy paths
  • Check that there aren't other open Pull Requests for the same update/change

Screenshots:

Please try to provide before and after screenshots or videos

Before

Screenshot 2025-05-30 at 11 31 40

After

Screenshot 2025-05-30 at 11 39 10

Before

Screenshot 2025-05-30 at 11 31 52

After

Screenshot 2025-05-30 at 11 39 16

Copy link

changeset-bot bot commented May 30, 2025

🦋 Changeset detected

Latest commit: fde9162

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 7 packages
Name Type
@primer/react-brand Patch
@primer/brand-primitives Patch
@primer/brand-docs Patch
@primer/brand-e2e Patch
@primer/brand-fonts Patch
@primer/brand-config Patch
@primer/brand-storybook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented May 30, 2025

🔍 Design token changes found

View CSS variable changes
+ --brand-LogoSuite-color-control-rest: var(--base-color-scale-gray-1);
+ --brand-LogoSuite-color-control-hover: var(--base-color-scale-gray-2);
+ --brand-LogoSuite-color-control-rest: #4d4e6a;
+ --brand-LogoSuite-color-control-hover: #5a5b7c;
+ --brand-LogoSuite-color-control-hover: var(--base-color-scale-gray-2);
+ --brand-LogoSuite-color-control-rest: var(--base-color-scale-gray-1);

Copy link
Contributor

github-actions bot commented May 30, 2025

🟢 No visual differences found

Our visual comparison tests did not find any differences in the UI.

@rezrah rezrah temporarily deployed to github-pages May 30, 2025 10:45 — with GitHub Actions Inactive
@rezrah rezrah requested a review from danielguillan May 30, 2025 10:47
@rezrah rezrah marked this pull request as ready for review May 30, 2025 10:47
@Copilot Copilot AI review requested due to automatic review settings May 30, 2025 10:47
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces dedicated design tokens to improve the contrast of the LogoSuite marquee play/pause button and updates the CSS to use them.

  • Added new control.rest and control.hover tokens for LogoSuite in design-tokens.
  • Updated LogoSuite.module.css to use --brand-LogoSuite-color-control-... instead of button-subtle tokens.
  • Created changesets to publish the patches in both @primer/brand-primitives and @primer/react-brand.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/react/src/LogoSuite/LogoSuite.module.css Replaced background-color vars with new control tokens
packages/design-tokens/src/tokens/functional/components/logosuite/colors.json Added control.rest and control.hover entries
.changeset/witty-dolls-sleep.md Described new tokens for LogoSuite play/pause controls
.changeset/mean-pants-hear.md Described contrast update for LogoSuite in react-brand
Comments suppressed due to low confidence (1)

packages/react/src/LogoSuite/LogoSuite.module.css:189

  • The focus-visible state doesn’t use the new control token. Consider adding a dedicated --brand-LogoSuite-color-control-focus token (or fallback) and applying it here to ensure keyboard focus has sufficient contrast.
.LogoSuite__logobar-playPauseButton:focus-visible {

@rezrah rezrah merged commit 0d3a198 into main May 30, 2025
17 checks passed
@rezrah rezrah deleted the rezrah/logosuite-pause-contrast-fix branch May 30, 2025 11:17
@primer-css primer-css mentioned this pull request May 30, 2025
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