Skip to content

BigSky logo: adhere to the common logo specs #103612

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 5 commits into from
May 22, 2025
Merged

BigSky logo: adhere to the common logo specs #103612

merged 5 commits into from
May 22, 2025

Conversation

ciampo
Copy link
Contributor

@ciampo ciampo commented May 21, 2025

Follow-up to #103546 (comment)
Related to DS-216

Proposed Changes

Tweak the BigSkyLogo.Mark logo props in order to follow the latest specs (defined in DS-216):

  • centralized common logo prop types;
  • removed normalized variant;
  • added aria-labelledby to the SVG element pointing to the title;
  • optimized the path by running the SVG through SVGOMG
  • make the white part of the logo an actual mask when non-monochrome;
  • removed "logo" from the default title;
  • tweaked the way the export is built, and added a named export to allow Storybook to better extract prop types for controls;
  • forwarded ref
  • removed unnecessary Storybook examples;
  • CHANGELOG

Why are these changes being made?

To stick to the logo API specs (see DS-216)

Testing Instructions

Load Storybook, make sure:

  • the component looks and works as on trunk (apart from the lack of normalized);
  • controls are shown;
  • the component has a aria-labelledby prop when the title is defined;
  • the component's central "white" shape becomes a pass-through mask when monochrome="true"

In Calypso:

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@ciampo ciampo self-assigned this May 21, 2025
@ciampo ciampo requested a review from a team as a code owner May 21, 2025 23:17
@ciampo ciampo added [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it Components labels May 21, 2025
@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 21, 2025
Copy link

github-actions bot commented May 21, 2025

@matticbot
Copy link
Contributor

matticbot commented May 21, 2025

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • happy-blocks
  • help-center
  • odyssey-stats
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/blue-sky-logo on your sandbox.

@matticbot
Copy link
Contributor

matticbot commented May 21, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Async-loaded Components (~137 bytes removed 📉 [gzipped])

name                                                      parsed_size           gzip_size
async-load-calypso-components-sites-add-new-site-content       -443 B  (-5.5%)     -137 B  (-4.8%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

@ciampo ciampo changed the title BlueSky logo: adhere to the common logo specs BigSky logo: adhere to the common logo specs May 21, 2025
@ciampo ciampo mentioned this pull request May 21, 2025
8 tasks
@ciampo ciampo force-pushed the fix/blue-sky-logo branch 2 times, most recently from 1df3a47 to 63c5f4f Compare May 21, 2025 23:22
Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

LGTM

const brandFill = monochrome ? 'currentColor' : '#030FB0';
const isMasked = monochrome;

const trimmedTitle = title.trim();
Copy link
Member

Choose a reason for hiding this comment

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

Why do we trim() ? I feel like we should expect consumers to pass a well-formed string. And if this is part of the truthiness checks, I'd rather we handle this as a properly-empty nullish value rather than an empty string.

Also, is the idea with a falsey title that it'd be used as a decorative image? And if so, would we also need to hide it from assistive technology (e.g. aria-hidden, role=presentation) ? Or should we just not support the falsey title altogether?

Copy link
Contributor Author

@ciampo ciampo May 22, 2025

Choose a reason for hiding this comment

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

Good points.

  • I removed the trim() call, but kept title as a pure string
  • I added more explicit documentation about using aria-hidden as the recommended way to remove from assistive technology

This approach follows the specs that from DS-216 (which originated from this conversation), although I'm happy to revisit the specs if we think they could be improved

@ciampo ciampo force-pushed the fix/blue-sky-logo branch from 63c5f4f to e1fd63b Compare May 22, 2025 14:24
@ciampo ciampo merged commit 8eff576 into trunk May 22, 2025
11 checks passed
@ciampo ciampo deleted the fix/blue-sky-logo branch May 22, 2025 15:31
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label May 22, 2025
gabrielcaires pushed a commit that referenced this pull request May 26, 2025
* BigSky logo: remove normalized, fix title, mask if monochrome, expose Mark component

* Remove unnecessary Storybook stories

* CHANGELOG

* Do not `trim()` the title

* Add more explicit docs around using `aria-hidden` to remove from assistive tech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Components [Type] Enhancement Changes to an existing feature — removing, adding, or changing parts of it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants