Skip to content

Keep the post date on one line when categories wrap - #205

Merged
juanfra merged 4 commits into
WordPress:trunkfrom
elphizu:fix/post-date-wrapping
Nov 16, 2026
Merged

juanfra merged 4 commits into
WordPress:trunkfrom
elphizu:fix/post-date-wrapping

Conversation

@elphizu

@elphizu elphizu commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

On narrow screens, posts with many categories squeeze the post date onto two lines.

Drops the nowrap from the Date and Categories row, so the categories move to the next line when they don't fit. This covers every pattern with that row: the single, index, archive and search templates, and the archive and blog home patterns.

Fixes #202.

How to test

  1. Set the date format to l, F jS, Y in Settings → General.
  2. Publish a post assigned to nine categories.
  3. View it at a viewport width of 375px.
  4. Confirm the date stays on one line, the categories wrap below it and nothing scrolls sideways.
  5. Repeat on the sidebar template, the blog home, a category archive and search results.
  6. Insert the archive patterns on a page and check them too.
  7. Check the templates in the Site Editor and with another color variation.

Use of AI Tools

AI assistance: Yes
Tool: OpenAI Codex, Claude Code
Used for: Investigation, implementation, and running validation.

Prevent the post date from shrinking in both single-post patterns so categories wrap within the remaining space on narrow screens.

Fixes WordPress#202.
@github-actions github-actions Bot added First-time Contributor Pull request opened by a first-time contributor to the repository [Area] Patterns Issues or PRs that touch the theme's block patterns. and removed First-time Contributor Pull request opened by a first-time contributor to the repository labels Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown

👋 Thanks for your first pull request, @elphizu! We'll take a look soon.

@elphizu
elphizu marked this pull request as ready for review November 5, 2026 13:06
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: elphizu <suryakantupadhyay@git.wordpress.org>
Co-authored-by: juanfra <juanfra@git.wordpress.org>
Co-authored-by: MaggieCabrera <onemaggie@git.wordpress.org>
Co-authored-by: henriqueiamarino <iamarinoh@git.wordpress.org>
Co-authored-by: 369work <369work@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub or WordPress.org user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

@juanfra juanfra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for working on this!

One thing to keep in mind is that the date format comes from the site settings, and it can change depending on the locale. So it can be really long, for example Wednesday, November 5th, 2026. Combined with a long category name, a date that can't shrink makes the row still overflow on small viewports.

A solution we could try is to remove the "flexWrap":""nowrap from the "date and categories" group, instead of changing the date. The date stays on one line and the categories move to the next line when they don't fit.

The trade-off is that the · (the dot separator) stays at the end of the date line. @henriqueiamarino are you ok with that or would you prefer to handle that in a different way?

Whichever direction we take, we would also need to change this in all the other patterns that have the same row:

MaggieCabrera
MaggieCabrera previously approved these changes Nov 12, 2026
@MaggieCabrera

Copy link
Copy Markdown
Contributor

I approved too soon, let's wait until @henriqueiamarino gives us feedback

@henriqueiamarino

Copy link
Copy Markdown
Contributor

I had to ask AI to build a side-by-side mock of all the states mentioned to understand this one, but I did 🥲

I’m with @juanfra—let the row wrap instead of pinning the date. We can’t control the site’s date format or how long a category runs, so the version where nothing can ever overflow wins. The trailing · is fine by me: it reads as a small hanging mark at the end of the date line, consistent with the dot separators we use elsewhere, and it only shows up where the alternative would be a sideways scroll.

Thanks for the fix @elphizu, could you update it to drop the nowrap instead, and apply the same change to the ten patterns Juanfra listed so the row behaves the same everywhere? And thanks @MaggieCabrera for pinging me.

Drop the nowrap so the categories move to the next line on narrow screens instead of overflowing with long date formats.

Fixes WordPress#202.
@elphizu

elphizu commented Nov 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @juanfra and @henriqueiamarino I have updated it to remove nowrap from the date and categories row instead of pinning the date

@juanfra juanfra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks everyone!

@juanfra
juanfra merged commit cd0a9ea into WordPress:trunk Nov 16, 2026
7 checks passed
MaggieCabrera added a commit to MaggieCabrera/wordpress-develop that referenced this pull request Nov 16, 2026
On narrow screens, posts with many categories squeezed the post date onto two lines. The categories now move to the next line when they don't fit, in every template and pattern with the Date and Categories row.

Synced from WordPress/ipsum#205.

See #66678.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wporg-sync pushed a commit to WordPress/wordpress-develop that referenced this pull request Nov 17, 2026
This updates Ipsum from `bc2e5af700e28980f251d97f58cf80c72ee50a13` to `d26734ecc1ba178d9c120178ce9d2c48825fc108` on its `trunk` branch.

A full list of changes included in this commit can be found on GitHub: WordPress/ipsum@bc2e5af...d26734e

- Address the review notes from the 7.2 Beta 5 core commit (WordPress/ipsum#216)
- Fix Pullquote custom line height not applying on the front end (WordPress/ipsum#203)
- Fix horizontal scroll caused by long unbroken words in comments (WordPress/ipsum#200)
- Improve design guide defaults and schema descriptions (WordPress/ipsum#193)
- Make the short post date format translatable (WordPress/ipsum#224)
- Fix Details block markers being announced by screen readers (WordPress/ipsum#230)
- Remove the physical left alignment from the page patterns (WordPress/ipsum#226)
- Indent the navigation submenus on the inline start (WordPress/ipsum#225)
- Fix accessible names for overlay navigation (WordPress/ipsum#228)
- Split AGENTS.md so it holds for any copy of the theme (WordPress/ipsum#214)
- Use a logical margin for the comment form checkbox (WordPress/ipsum#231)
- Keep keyboard focus visible and clear of the sticky header (WordPress/ipsum#145)
- Fix accessible name of overlay search form (WordPress/ipsum#239)
- Show a message when the blog and Archive Full have no posts (WordPress/ipsum#238)
- Keep the post date on one line when categories wrap (WordPress/ipsum#205)
- Remove repeated button styles from theme.json (WordPress/ipsum#235)
- Remove unused values from theme.json (WordPress/ipsum#237)
- Make the credit line URL translatable (WordPress/ipsum#240)
- Use single border radius values in theme.json (WordPress/ipsum#236)
- Escape the short post date format instead of ignoring PHPCS (WordPress/ipsum#245)
- Use the Site Title in Footer Centered (WordPress/ipsum#244)
- Keep AGENTS.md about the theme, not the GitHub repository (WordPress/ipsum#247)
- Treat "Written by" as a label before the author name (WordPress/ipsum#246)
- Use Quote blocks for statement patterns and remove text quote mark styles (WordPress/ipsum#232)
  

This commit also includes changes that only exist in core:

- Tests for the `ipsum/get-design-guide` ability are added in `tests/phpunit/tests/theme/ipsumGetDesignGuideAbility.php`, because Ipsum's repository has no PHPUnit setup. On multisite, the tests save global styles as a super admin, since only super admins can save unfiltered global styles.
- `contributing.txt` says Ipsum is developed on GitHub until its 1.0 release, with contributions going through Trac after that. It also drops the note about `style.css` being used when it is newer than `style.min.css`.
- A test message in `ipsumDesignGuide.php` says "do not match" instead of "to not match".

Developed in: #15948

Follow-up to r65366.

Props onemaggie, juanfra, shailu25, iamarinoh, 369work, gziolo, wildworks, suryakantupadhyay, khushalsains, ravipatel, meahadi.
Fixes #66678. See #66352.

git-svn-id: https://develop.svn.wordpress.org/trunk@65549 602fd350-edb4-49c9-b593-d223f7449a82
wporg-sync pushed a commit to WordPress/WordPress that referenced this pull request Nov 17, 2026
This updates Ipsum from `bc2e5af700e28980f251d97f58cf80c72ee50a13` to `d26734ecc1ba178d9c120178ce9d2c48825fc108` on its `trunk` branch.

A full list of changes included in this commit can be found on GitHub: WordPress/ipsum@bc2e5af...d26734e

- Address the review notes from the 7.2 Beta 5 core commit (WordPress/ipsum#216)
- Fix Pullquote custom line height not applying on the front end (WordPress/ipsum#203)
- Fix horizontal scroll caused by long unbroken words in comments (WordPress/ipsum#200)
- Improve design guide defaults and schema descriptions (WordPress/ipsum#193)
- Make the short post date format translatable (WordPress/ipsum#224)
- Fix Details block markers being announced by screen readers (WordPress/ipsum#230)
- Remove the physical left alignment from the page patterns (WordPress/ipsum#226)
- Indent the navigation submenus on the inline start (WordPress/ipsum#225)
- Fix accessible names for overlay navigation (WordPress/ipsum#228)
- Split AGENTS.md so it holds for any copy of the theme (WordPress/ipsum#214)
- Use a logical margin for the comment form checkbox (WordPress/ipsum#231)
- Keep keyboard focus visible and clear of the sticky header (WordPress/ipsum#145)
- Fix accessible name of overlay search form (WordPress/ipsum#239)
- Show a message when the blog and Archive Full have no posts (WordPress/ipsum#238)
- Keep the post date on one line when categories wrap (WordPress/ipsum#205)
- Remove repeated button styles from theme.json (WordPress/ipsum#235)
- Remove unused values from theme.json (WordPress/ipsum#237)
- Make the credit line URL translatable (WordPress/ipsum#240)
- Use single border radius values in theme.json (WordPress/ipsum#236)
- Escape the short post date format instead of ignoring PHPCS (WordPress/ipsum#245)
- Use the Site Title in Footer Centered (WordPress/ipsum#244)
- Keep AGENTS.md about the theme, not the GitHub repository (WordPress/ipsum#247)
- Treat "Written by" as a label before the author name (WordPress/ipsum#246)
- Use Quote blocks for statement patterns and remove text quote mark styles (WordPress/ipsum#232)
  

This commit also includes changes that only exist in core:

- Tests for the `ipsum/get-design-guide` ability are added in `tests/phpunit/tests/theme/ipsumGetDesignGuideAbility.php`, because Ipsum's repository has no PHPUnit setup. On multisite, the tests save global styles as a super admin, since only super admins can save unfiltered global styles.
- `contributing.txt` says Ipsum is developed on GitHub until its 1.0 release, with contributions going through Trac after that. It also drops the note about `style.css` being used when it is newer than `style.min.css`.
- A test message in `ipsumDesignGuide.php` says "do not match" instead of "to not match".

Developed in: WordPress/wordpress-develop#15948

Follow-up to r65366.

Props onemaggie, juanfra, shailu25, iamarinoh, 369work, gziolo, wildworks, suryakantupadhyay, khushalsains, ravipatel, meahadi.
Fixes #66678. See #66352.
Built from https://develop.svn.wordpress.org/trunk@65549


git-svn-id: http://core.svn.wordpress.org/trunk@64622 1a063a9b-81f0-0310-95a4-ce76da25c4cd
arshidkv12 pushed a commit to arshidkv12/wordpress-develop that referenced this pull request Nov 21, 2026
This updates Ipsum from `bc2e5af700e28980f251d97f58cf80c72ee50a13` to `d26734ecc1ba178d9c120178ce9d2c48825fc108` on its `trunk` branch.

A full list of changes included in this commit can be found on GitHub: WordPress/ipsum@bc2e5af...d26734e

- Address the review notes from the 7.2 Beta 5 core commit (WordPress/ipsum#216)
- Fix Pullquote custom line height not applying on the front end (WordPress/ipsum#203)
- Fix horizontal scroll caused by long unbroken words in comments (WordPress/ipsum#200)
- Improve design guide defaults and schema descriptions (WordPress/ipsum#193)
- Make the short post date format translatable (WordPress/ipsum#224)
- Fix Details block markers being announced by screen readers (WordPress/ipsum#230)
- Remove the physical left alignment from the page patterns (WordPress/ipsum#226)
- Indent the navigation submenus on the inline start (WordPress/ipsum#225)
- Fix accessible names for overlay navigation (WordPress/ipsum#228)
- Split AGENTS.md so it holds for any copy of the theme (WordPress/ipsum#214)
- Use a logical margin for the comment form checkbox (WordPress/ipsum#231)
- Keep keyboard focus visible and clear of the sticky header (WordPress/ipsum#145)
- Fix accessible name of overlay search form (WordPress/ipsum#239)
- Show a message when the blog and Archive Full have no posts (WordPress/ipsum#238)
- Keep the post date on one line when categories wrap (WordPress/ipsum#205)
- Remove repeated button styles from theme.json (WordPress/ipsum#235)
- Remove unused values from theme.json (WordPress/ipsum#237)
- Make the credit line URL translatable (WordPress/ipsum#240)
- Use single border radius values in theme.json (WordPress/ipsum#236)
- Escape the short post date format instead of ignoring PHPCS (WordPress/ipsum#245)
- Use the Site Title in Footer Centered (WordPress/ipsum#244)
- Keep AGENTS.md about the theme, not the GitHub repository (WordPress/ipsum#247)
- Treat "Written by" as a label before the author name (WordPress/ipsum#246)
- Use Quote blocks for statement patterns and remove text quote mark styles (WordPress/ipsum#232)
  

This commit also includes changes that only exist in core:

- Tests for the `ipsum/get-design-guide` ability are added in `tests/phpunit/tests/theme/ipsumGetDesignGuideAbility.php`, because Ipsum's repository has no PHPUnit setup. On multisite, the tests save global styles as a super admin, since only super admins can save unfiltered global styles.
- `contributing.txt` says Ipsum is developed on GitHub until its 1.0 release, with contributions going through Trac after that. It also drops the note about `style.css` being used when it is newer than `style.min.css`.
- A test message in `ipsumDesignGuide.php` says "do not match" instead of "to not match".

Developed in: WordPress#15948

Follow-up to r65366.

Props onemaggie, juanfra, shailu25, iamarinoh, 369work, gziolo, wildworks, suryakantupadhyay, khushalsains, ravipatel, meahadi.
Fixes #66678. See #66352.

git-svn-id: https://develop.svn.wordpress.org/trunk@65549 602fd350-edb4-49c9-b593-d223f7449a82
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Patterns Issues or PRs that touch the theme's block patterns.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The post date wraps onto two lines on narrow screens when a post has many categories

4 participants