Make WordPress Core

Opened 2 months ago

Closed 2 months ago

#65606 closed defect (bug) (fixed)

Updating site title in Settings -> General clears site icon in admin bar temporarily

Reported by: fushar Owned by: tyxla
Priority: normal Milestone: 7.1
Component: Toolbar Version: 7.1
Severity: normal Keywords: has-patch commit
Cc: Focuses:

Description

After #65088, when we have a site icon set, then go to Settings -> General, then update the site title there (but not saved yet), the site icon in the admin bar disappears. But it's just during preview; when we save the form, the site icon is back.

Attachments (1)

site-icon-title.mp4 (88.5 KB ) - added by fushar 2 months ago.

Download all attachments as: .zip

Change History (5)

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


2 months ago
#1

  • Keywords has-patch added

Trac ticket: https://core.trac.wordpress.org/ticket/65606

A follow-up to https://github.com/WordPress/wordpress-develop/pull/11781. This PR improves the site title/icon update logic in Settings -> General, when the form is not saved yet.

Previously, only site title is live-previewed (but removes site icon accidentally; see the video in the linked Trac ticket). This PR fixes that, and also live-preview the site icon changes, so that addition/change/removal to the site icon is also live-previewed in the admin bar.

See the following video:

https://github.com/user-attachments/assets/7383ed8f-0803-44c4-9459-418675cebb66

## Testing Instructions

  1. Go to Settings -> General
  2. Try to update site title, or add / change / remove site icon. Verify that the change is immediately live-previewed in the admin bar,

## Use of AI Tools

AI assistance: Yes
Tool(s): Claude Code
Model(s): Opus 4.8
Used for: code generation and brainstorming

#2 @tyxla
2 months ago

  • Keywords commit added
  • Owner set to tyxla
  • Status newreviewing

#3 @tyxla
2 months ago

  • Status reviewingaccepted

#4 @tyxla
2 months ago

  • Resolutionfixed
  • Status acceptedclosed

In 62686:

Toolbar: Correctly preview site title and icon changes in the admin bar.

On Settings → General, live-previewing an unsaved site title change no
longer removes the admin bar site icon: the icon element is preserved and
re-prepended when the title text is updated.

Additionally, adding, changing, or removing the site icon is now
live-previewed in the admin bar, keeping the toolbar in sync with the
img.site-icon element and the has-site-icon class before the form is
saved.

Developed in: #12474.

Props fushar, tyxla.
Fixes #65606.

Note: See TracTickets for help on using tickets.