Make WordPress Core

Opened 6 weeks ago

Closed 6 weeks ago

Last modified 4 weeks ago

#64827 closed defect (bug) (duplicate)

UI Bug: Long unbroken strings overflow container in Dashboard Activity widget

Reported by: ravikhadka's profile ravikhadka Owned by:
Milestone: Priority: normal
Severity: minor Version:
Component: Administration Keywords: has-screenshots has-patch
Focuses: ui, css, administration Cc:

Description

When a post title or content contains a long, unbroken string of characters (e.g., a long URL or repeating text without spaces), it breaks out of the .activity-block container in the Dashboard Activity widget and overlaps adjacent layout elements. This issue affects both normal text (like post titles inside <a> tags) and preformatted text inside <pre> tags.

Steps to Reproduce:

Go to the WordPress admin dashboard.

Create a new post with a title or content consisting of a single, very long string of characters without spaces (e.g., typing hellohelo continuously for 100+ characters).

Publish the post.

Navigate to the main Dashboard screen and look at the "Activity" widget under the "Recently Published" section.

Observe the text overflowing the widget bounds and overlapping the adjacent column.

Expected Results: The long text string should wrap cleanly within the boundaries of the widget container.

Actual Results: The string overflows horizontally, breaking the UI layout. I have attached screenshots demonstrating the issue.

Proposed Patch:
I have tested the following CSS fix, which resolves the issue by forcing the text to wrap and ensuring the inline link elements respect the container's maximum width:

#dashboard_activity ul li,
#dashboard_activity ul li a {
    overflow-wrap: break-word; 
    word-wrap: break-word;      
    word-break: break-word;     
}

#dashboard_activity ul li a {
    display: inline-block;
    max-width: 100%;
    vertical-align: top;
}

Before:
https://prnt.sc/ZPATJhEQuNQp

After:

https://prnt.sc/NaqFifi0Q2Gy

Attachments (3)

Screenshot at Mar 08 12-08-39 PM.png (685.7 KB) - added by ravikhadka 6 weeks ago.
Before
Screenshot at Mar 08 12-27-27 PM.png (1005.0 KB) - added by ravikhadka 6 weeks ago.
After
Huzaifa-20260308124858.png (227.6 KB) - added by huzaifaalmesbah 6 weeks ago.

Download all attachments as: .zip

Change History (10)

#1 @huzaifaalmesbah
6 weeks ago

  • Keywords need-tests has-patch removed

#2 @huzaifaalmesbah
6 weeks ago

  • Keywords has-screenshots added

This ticket was mentioned in PR #11199 on WordPress/wordpress-develop by @ravikhadka.


6 weeks ago
#3

  • Keywords has-patch added

Fixes UI overflow issue in the Activity widget. See Trac #64827.
Props ravikhadka, wpsubmit

#4 @huzaifaalmesbah
6 weeks ago

  • Keywords 2nd-opinion added

I was able to reproduce the issue when using a very long unbroken string (100+ characters). In that case, the text overflows the Dashboard Activity widget and breaks the layout.

However, with normal words (with spaces), the text wraps correctly and the issue does not occur.

Requesting a 2nd opinion on whether this edge case with extremely long unbroken strings needs to be addressed, or if it is acceptable since normal content does not trigger the issue.

#5 @Presskopp
6 weeks ago

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #36081.

#6 @sabernhardt
4 weeks ago

  • Keywords 2nd-opinion removed
  • Milestone Awaiting Review deleted
  • Version trunk deleted

This ticket was mentioned in PR #11366 on WordPress/wordpress-develop by @ravikhadka.


4 weeks ago
#7

Prevents long text in the Dashboard Activity widget from overflowing its container.

This adjusts the widget CSS so long, unbroken strings wrap correctly in activity items and links.

Testing:

  1. Open the Dashboard Activity widget.
  2. Check an item with long unbroken text.
  3. Confirm the text wraps instead of overflowing.
Note: See TracTickets for help on using tickets.