Skip to content

Only set absolute positioning in modal - #12797

Closed
joedolson wants to merge 3 commits into
WordPress:trunkfrom
joedolson:fix-media-toolbar-spinner
Closed

Only set absolute positioning in modal#12797
joedolson wants to merge 3 commits into
WordPress:trunkfrom
joedolson:fix-media-toolbar-spinner

Conversation

@joedolson

Copy link
Copy Markdown
Contributor

Limit the spinner absolute positioning to only take effect in the media modal.

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

Use of AI Tools


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@joedolson
joedolson requested a review from afercia July 31, 2026 21:39
@github-actions

github-actions Bot commented Jul 31, 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. 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 joedolson, afercia.

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

@github-actions

Copy link
Copy Markdown

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

  • 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.

Comment thread src/wp-includes/css/media-views.css Outdated

.media-frame .media-toolbar-secondary .spinner {
.media-modal .media-frame .media-toolbar-secondary .spinner {
top: calc( 50% - 8px );

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.

At this media query, it still looks misplaced:

Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What would you suggest as an alternative? The spinner applies to all filters. So aligning it to one or the other feels wrong; this alignment is vertically centered.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Another alternative would be to set it at calc( 50% - 10px ), and move the position: relative to .media-toolbar instead of .media-toolbar-secondary. That's a relative major change, however, and I'm not sure it's a good idea - there could be unanticipated side effects.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Tested it, and yes, there are definitely undesirable side effects...

@afercia afercia 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.

I left a couple points to address..

Also, in the media dialog 'details' panel on the right, a text Saved. appears together with the spinner. The absolut epositioning overlays the spinner on top of the text.

In the screenshot below, how it looks on trunk compared to WP 4.8. Note that this specific spinner appears to have regressed a few times on various past releases so that I traveled back in time till WP 4.8 intentionally to have a confirmation that it was as I remembered:

Image

@joedolson

Copy link
Copy Markdown
Contributor Author

I think it's reasonable to adjust the specific barrier issues for spinners in this ticket, but not change the existing positioning significantly. There's no clear "winning" position for the spinner on mobile - ideally, it would either be in a clear global position, or always be associated with whatever field triggered it. Those are both more significant changes, however.

This appears to fix the overlap, while still retaining the fix from #27914
@joedolson

Copy link
Copy Markdown
Contributor Author

Attachment details spinner after change:

Screenshot 2026-08-04 at 8 36 46 PM

pento pushed a commit that referenced this pull request Aug 5, 2026
Two positioning issues: on desktop, the active spinner appeared off screen, generating a scrollbar in the media toolbar. In the attachment details modal, the spinner overlapped with the `Saved` confirmation.

On desktop, limit some positioning assignments to only apply with the media modal. In the attachment details, apply `display: flex` to prevent overlapping.

Developed in #12797

Props afercia, rcorrales, joedolson.
Fixes #65778.

git-svn-id: https://develop.svn.wordpress.org/trunk@63029 602fd350-edb4-49c9-b593-d223f7449a82
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

A commit was made that fixes the Trac ticket referenced in the description of this pull request.

SVN changeset: 63029
GitHub commit: 462a050

This PR will be closed, but please confirm the accuracy of this and reopen if there is more work to be done.

@github-actions github-actions Bot closed this Aug 5, 2026
markjaquith pushed a commit to markjaquith/WordPress that referenced this pull request Aug 5, 2026
Two positioning issues: on desktop, the active spinner appeared off screen, generating a scrollbar in the media toolbar. In the attachment details modal, the spinner overlapped with the `Saved` confirmation.

On desktop, limit some positioning assignments to only apply with the media modal. In the attachment details, apply `display: flex` to prevent overlapping.

Developed in WordPress/wordpress-develop#12797

Props afercia, rcorrales, joedolson.
Fixes #65778.
Built from https://develop.svn.wordpress.org/trunk@63029


git-svn-id: http://core.svn.wordpress.org/trunk@62248 1a063a9b-81f0-0310-95a4-ce76da25c4cd
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.

2 participants