Skip to content

Reader: fix wide unread count badges overflowing sidebar column#111662

Open
le-sgs wants to merge 1 commit into
trunkfrom
fix/read-535-unread-badge-width
Open

Reader: fix wide unread count badges overflowing sidebar column#111662
le-sgs wants to merge 1 commit into
trunkfrom
fix/read-535-unread-badge-width

Conversation

@le-sgs

@le-sgs le-sgs commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Proposed Changes

  • In client/reader/sidebar/style.scss, widen the unread-count grid column from 36px to 48px, right-align badges within the column (justify-self: end replacing margin: 0 auto), and add white-space: nowrap on .a8c-count.

Why are these changes being made?

The unread-count badge column on Reader sidebar organization items was a fixed 36px. Compact-formatted values like 4.923 mi are wider than 1–3 digit values, so they overflowed the column, got pushed flush
against the right edge of the container, and broke the visual alignment of the list against shorter counts like 989, 977, 613.

Widening the column gives compact-K values room to render, right-aligning all badges keeps the column visually consistent regardless of badge width, and white-space: nowrap is defensive so the text never
wraps inside the badge.

Testing Instructions

  1. Navigate to /reader while signed in to an account.
  2. Find a sidebar item whose count renders in compact notation, set another to a 2–3 digit value.
  3. Confirm:
    • The wider badge sits within the column without overflowing or hugging the container edge.
    • Wider and narrower badges share a consistent right edge (right-aligned column).

Before / After

Before: 4.923 mil badge pushed flush against the panel border, visually misaligned with shorter counts in the same column.

After: 4.923 mil and shorter counts both right-align in a wider column with comfortable spacing.

Pre-merge Checklist

  • Has the general commit checklist been followed?
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple, Atomic, and self-hosted Jetpack sites?
  • Have you checked for TypeScript, React or other console errors?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes?
  • Have you used memoizing on expensive computations?
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation?
  • 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?

The unread-count badge column on Reader sidebar organization items was
fixed at 36px, which caused wider compact values like "4.9K" to overflow
and visually break list alignment against shorter values.

Widen the column to 48px, right-align badges within the column so all
counts share a consistent right edge regardless of width, and add
`white-space: nowrap` on the badge to keep its content on one line.

Attempts to fix READ-535

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@le-sgs le-sgs requested a review from a team as a code owner June 13, 2026 10:43
@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 Jun 13, 2026
@matticbot

Copy link
Copy Markdown
Contributor

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

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

  • help-center
  • notifications

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/read-535-unread-badge-width on your sandbox.

@le-sgs le-sgs self-assigned this Jun 13, 2026
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.

2 participants