Skip to content

Conversation

@fushar
Copy link
Contributor

@fushar fushar commented Nov 17, 2025

Fixes DOTMSD-801

Proposed Changes

This PR makes sure that the icon and the title of cards in the Site Overview are left-aligned.

It does that by manually adding a negative margin to the icon. The value is taken by iterating all <path>s of the icon's SVG and then taking the leftmost one.

The caveat is that we can no longer show the background color on warning and error intents:

Before After
image image
image image

Why are these changes being made?

Make the icon and title visually left-aligned.

Testing Instructions

Check /v2/sites/:site of various sites and verify that the icon and title are now left-aligned.

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 tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • 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)?

@github-actions
Copy link

github-actions bot commented Nov 17, 2025

@matticbot
Copy link
Contributor

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

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

  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug align-site-icon on your sandbox.

@fushar fushar marked this pull request as ready for review November 17, 2025 15:20
@fushar fushar requested a review from a team as a code owner November 17, 2025 15:20
@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 Nov 17, 2025
@fushar fushar self-assigned this Nov 17, 2025
@fushar
Copy link
Contributor Author

fushar commented Nov 17, 2025

I'm not sure if this is the correct approach... feel free to discuss in the linked issue above.

@taipeicoder
Copy link
Contributor

Two cents: This feels a lot just for alignment 😅 WDYT if we just set margin-inline-start: -4px for icons, and remove the background color if any?

@p-jackson
Copy link
Member

Or no hacks and change the design instead?
DOTMSD-801#comment-aa8254c6

@fushar
Copy link
Contributor Author

fushar commented Nov 20, 2025

This feels a lot just for alignment 😅 WDYT if we just set margin-inline-start: -4px for icons

Well it's obviously my first attempt 😅 but it does not work because the icons have different widths. For example, if we always do -4px, the Migrate site card will be misaligned:

image

@fushar
Copy link
Contributor Author

fushar commented Nov 20, 2025

It looks like we prefer not to pursue this approach, so I'm closing it for now. Thanks!

@fushar fushar closed this Nov 20, 2025
@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 Nov 20, 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.

5 participants