Skip to content

Fix deployment list layout when Latest deployment badge is shown#108560

Open
gcsecsey wants to merge 3 commits intotrunkfrom
dotdev-283-github-deployments-fix-layout-when-latest-deployment-label
Open

Fix deployment list layout when Latest deployment badge is shown#108560
gcsecsey wants to merge 3 commits intotrunkfrom
dotdev-283-github-deployments-fix-layout-when-latest-deployment-label

Conversation

@gcsecsey
Copy link
Contributor

@gcsecsey gcsecsey commented Feb 6, 2026

Fixes DOTDEV-283

Proposed Changes

  • Changed second-row HStack from width: 'auto' to width: 'max-content' so the column expands to fit content naturally instead of compressing elements
  • Added flexShrink: 0 to each metadata element (commit, branch, author, latest badge) to prevent flex compression

Why are these changes being made?

The "Latest deployment" badge was causing all elements in the commit metadata row to squeeze together. The HStack's default width: auto constrains the container, and WordPress components apply min-width: 0 to all flex children by default, allowing them to shrink below content size. These changes ensure each element maintains its natural width.

Testing Instructions

  1. Run yarn start-dashboard
  2. Navigate to a site's Deployments page
  3. Check that rows with the "Latest deployment" badge show all elements (SHA, branch name, author, badge) at full width without truncation
  4. Check that rows without the badge still render correctly
  5. Test with longer branch names to confirm the column expands appropriately
trunk this branch
CleanShot 2026-02-06 at 13 30 52@2x CleanShot 2026-02-06 at 13 29 59@2x

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

Change the second-row HStack from width: 'auto' to width: 'max-content' so the column expands to fit content naturally. Add flexShrink: 0 to each metadata element (commit SHA, branch, author, badge) to prevent them from compressing when space is constrained. This mirrors the pattern already established in deployment-logs-modal-content.tsx.
@gcsecsey gcsecsey requested a review from a team as a code owner February 6, 2026 13:26
@matticbot matticbot added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 6, 2026
@matticbot
Copy link
Contributor

matticbot commented Feb 6, 2026

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

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

  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug dotdev-283-github-deployments-fix-layout-when-latest-deployment-label on your sandbox.

@gcsecsey gcsecsey requested a review from a team February 6, 2026 13:40
Copy link
Contributor

@epeicher epeicher left a comment

Choose a reason for hiding this comment

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

Thanks @gcsecsey for solving this! I have tested it, and it works as expected. LGTM! :shipit:

Before After
Image Image

<HStack spacing={ 3 } alignment="left" style={ { width: 'auto' } }>
<HStack spacing={ 3 } alignment="left" style={ { width: 'max-content' } }>
<ExternalLink
style={ { flexShrink: 0 } }
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems we don't need flexShrink: 0 anymore as we set the width of the parent to max-content. Same for other usages below.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants