Skip to content

Conversation

@Infinite-Null
Copy link

@Infinite-Null Infinite-Null commented Apr 23, 2025

This PR updates the appearance of the Site Icon and media upload buttons to match their functionality. The previous styling made these elements look like drop areas, confusing when users attempted to drag and drop files onto them, as they only function as clickable buttons.

Trac ticket: #47579

Before

Screenshot 2025-04-23 at 12 36 02 PM Screenshot 2025-04-23 at 12 35 39 PM

image

After

image

Screenshot 2025-04-23 at 12 35 12 PM image

@github-actions
Copy link

Test using WordPress Playground

The changes in this pull request can previewed and tested using a WordPress Playground instance.

WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Some things to be aware of

  • The Plugin and Theme Directories cannot be accessed within Playground.
  • All changes will be lost when closing a tab with a Playground instance.
  • All changes will be lost when refreshing the page.
  • A fresh instance is created each time the link below is clicked.
  • Every time this pull request is updated, a new ZIP file containing all changes is created. If changes are not reflected in the Playground instance,
    it's possible that the most recent build failed, or has not completed. Check the list of workflow runs to be sure.

For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation.

Test this pull request with WordPress Playground.

@Infinite-Null Infinite-Null marked this pull request as ready for review April 23, 2025 07:13
@github-actions
Copy link

github-actions bot commented Apr 23, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core Committers: Use this line as a base for the props when committing in SVN:

Props ankitkumarshah, joedolson, shailu25.

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

@joedolson joedolson self-requested a review May 20, 2025 15:15
Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

These changes look good. Have you checked whether the button-add-site-icon class is still in use? If that was the only use of that class, then we should be able to remove the related CSS.

((We can't remove button-add-media, as that's widely used by plugins and themes.)

I'd also like to see more of a compromise design: use the upload button styles, but keep the full width layout and padding.

@Infinite-Null
Copy link
Author

Hi @joedolson, Thank you for the feedback. I have made the necessary changes and updated the PR please review it at your convenience.

Screenshot:

image

@Infinite-Null Infinite-Null requested a review from joedolson May 21, 2025 08:50
@joedolson
Copy link
Contributor

Some additional changes that I think would help make things more consistent:

  1. When an image is selected, e.g. for the background image, you end up with a small 'Remove' button and a large 'Change Image' button. I think it would be good if those were the same size, either both large or both small. I suggest small; I think that the Change Image button is different from the UPload Image button.

  2. The Add Header image interface still uses the dashed outline design, but with a separate upload button. I think it would be good to make those all the same: eliminate the dashed placeholder space and use a large upload button.

These changes are otherwise good!

Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

Requested changes are noted in a comment; they're less changes to the existing code and more additions that would be helpful.

@Infinite-Null
Copy link
Author

Hi @joedolson, I have done the requested changes. Please review it at your convenience:

Upload Site Logo:

image

After upload:

image

Header Upload:

image

After Upload:

image

@Infinite-Null Infinite-Null requested a review from joedolson June 2, 2025 12:09
Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

By removing the class upload-button, this breaks the hook for the JS to trigger the selection events. So, for example, if you select a logo, the 'Change Logo' button no longer works.

I think what you need to do instead of removing the class is add a class to hook styling to when the selection is populated. E.g., add a class to the parent container like 'has-selection', then change the button style based on that parent class being present.

@Infinite-Null
Copy link
Author

Hi @joedolson, Thank you for the feedback. I have updated the PR and fixed the issue. Also, I have attached a detailed testing video below. Please review it at your convenience. Thank you!

Customize

Screen.Recording.2025-07-29.at.12.32.32.PM.mov

General Settings

Screen.Recording.2025-07-29.at.12.34.33.PM.mov

@Infinite-Null Infinite-Null requested a review from joedolson July 29, 2025 07:31
Infinite-Null and others added 2 commits July 29, 2025 13:01
This makes the large buttons the same size as the inputs neighboring them, which better matches the current design on mobile.
Copy link
Contributor

@joedolson joedolson left a comment

Choose a reason for hiding this comment

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

I made a minor change to improve the look on mobile, but otherwise I think this is good to go.

@joedolson
Copy link
Contributor

Screenshot 2025-08-15 at 4 10 27 PM

Changed the button size for General settings to button-hero for a closer match to existing styles.

Copy link
Member

@shail-mehta shail-mehta left a comment

Choose a reason for hiding this comment

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

LGTM👍

@shail-mehta
Copy link
Member

Customizer Settings:

Before After
before-settings after-settings

Settings Icon:

Before After
before-customizer after-customizer

@Infinite-Null
Copy link
Author

Merged in changeset: 60645

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants