WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 6 months ago

#37280 assigned enhancement

Remove boldness from update notices

Reported by: ocean90 Owned by: Presskopp
Milestone: Future Release Priority: normal
Severity: normal Version:
Component: General Keywords: good-first-bug has-patch needs-refresh
Focuses: ui, administration Cc:
PR Number:

Description

Previously: https://wordpress.slack.com/archives/design/p1466093104000007

The notices are currently inconsistent, some are bold, some are not, and some use bold only to highlight words.

OH: Bold text is just wasted bandwidth.

Attachments (12)

edit-posts.png (21.8 KB) - added by ocean90 3 years ago.
menus.png (41.5 KB) - added by ocean90 3 years ago.
plugins.png (17.4 KB) - added by ocean90 3 years ago.
posts-trashed.png (21.1 KB) - added by ocean90 3 years ago.
profile.png (25.3 KB) - added by ocean90 3 years ago.
settings.png (22.5 KB) - added by ocean90 3 years ago.
theme-activated.png (25.8 KB) - added by ocean90 3 years ago.
theme-editor.png (25.3 KB) - added by ocean90 3 years ago.
permalinks.png (44.7 KB) - added by ocean90 3 years ago.
37280.1.diff (3.8 KB) - added by Presskopp 3 years ago.
First patch
37280.template.diff (1.4 KB) - added by Presskopp 3 years ago.
37280.2.diff (5.0 KB) - added by jpolakovic 3 years ago.

Download all attachments as: .zip

Change History (22)

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@ocean90
3 years ago

@Presskopp
3 years ago

First patch

#1 follow-up: @Presskopp
3 years ago

  • Keywords has-patch added; needs-patch removed

Patch. Hope I detected them all.

@ocean90

Two questions

1) OH === Oral Hygiene ?
2) Where did you find this chubby "Permalink structure updated"? Is it

\wp-admin\edit-tag-form.php, L.75

or did I just destroy something?

This ticket was mentioned in Slack in #core by elrae. View the logs.


3 years ago

This ticket was mentioned in Slack in #polyglots by presskopp. View the logs.


3 years ago

#4 in reply to: ↑ 1 @ocean90
3 years ago

  • Owner set to Presskopp
  • Status changed from new to assigned

Replying to Presskopp:

2) Where did you find this chubby "Permalink structure updated"?

It's passed to add_settings_error() and printed by settings_errors().

#5 follow-up: @Presskopp
3 years ago

Ok, if I'm not mistaking, that makes it a patch. But wait! Is there any good in this:

printf(__('Comment by %s moved to the trash.'), '<strong></strong>');
printf(__('Comment by %s marked as spam.'), '<strong></strong>');

found in

\wp-admin\includes\template.php, L.465/468

So what about

printf(__('Comment by %s moved to the trash.'));
printf(__('Comment by %s marked as spam.'));

#6 @Presskopp
3 years ago

comments please, this is adding some more lines as a separate patch

#7 in reply to: ↑ 5 @dd32
3 years ago

Replying to Presskopp:

Ok, if I'm not mistaking, that makes it a patch. But wait! Is there any good in this:

printf(__('Comment by %s moved to the trash.'), '<strong></strong>');
printf(__('Comment by %s marked as spam.'), '<strong></strong>');

If you look at how it's actually used in the UI, the JS fills the <strong> tags in with the commenter's name.
Javascript doesn't understand %s as a placeholder, so HTML tags are used instead. If we want to remove the bolding of the username here we'd need to replace it with something such as <span></span> and update whatever JS uses it to search for the span tag rather than strong.

#8 @Presskopp
3 years ago

thanks @dd32

If we want to keep it simple (not changing tags for JS), all I see left now would be this line:

$output .= "<p><strong>{$details['message']}</strong></p>"; in template.php L.1480

I must not be the one doing the final patch, as always just trying to contribute.

#9 @jpolakovic
3 years ago

@dd32 I have created a patch that consolidates all the code @Presskopp contributed so far, plus I'm adding a simple fix for removing the boldness from the author fields that are populated by the JavaScript in edit-comments.js.

Using jQuery's .replaceWith instead of .text on L283 of edit-comments.js replaces the <strong></strong> placeholder by a text string containing the author name.

Last edited 3 years ago by jpolakovic (previous) (diff)

@jpolakovic
3 years ago

#10 @desrosj
6 months ago

  • Focuses administration added
  • Keywords needs-refresh added

@jpolakovic are you able to refresh this patch? It no longer applies cleanly to trunk.

Spot checking these instances, it appears that there are still inconsistencies. Though, these should be audited as it's possible some have been fixed elsewhere.

Note: See TracTickets for help on using tickets.