-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update the float on the Spinner to none
#19338
Conversation
I would love this to get merged (I’m sick of overriding this in my own code) but there are a few places where the spinner needs to be floated, such as when it’s shown above the compatibility mode metaboxes during saving, which would need to be updated. There are also a bunch of cases where the float is removed via CSS in specific instances, so that CSS would end up being redundant. |
@chrisvanpatten, Thanks for the feedback! I checked the meta boxes and that seems to work still. I've also updated a couple other files that were overriding the float and removed that style. This still should be tested by others before merging though. |
@@ -4,7 +4,7 @@ | |||
width: 18px; | |||
height: 18px; | |||
opacity: 0.7; | |||
float: right; | |||
float: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I keep this as float:none;
or just remove it altogether? @jasmussen any thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting, if the float does not appear to regress anything, definitely remove it altogether. Floats are the worst, and if there's truly no downside to removing it, out it goes.
A float left or right literally takes an item out of the flow of content, giving it a zero height footprint (with no margins), that would be the only thing to look for, the non floated thing pushing things down.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @jasmussen ✋ I've removed the float completely now.
After removing the float completely, this can use a bit more testing. I've tested on the link creation popover, the uploading of images and it all looks good still. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is working well for me, code looks good and a float really should fix more things than it breaks.
I tested the most obvious spinner locations. From a brief code search it looks like the spinner is used in these places:
- Block directory search results
- Media upload progress
- URL input
- Block placeholder
- Embeds loading
- Galleries loading
- Images loading
- Latest posts loading
- Metaboxes saving
- Featured images doing something
- Post publish panel saving
Those are the things to look for.
Removed instances of float:none; in other CSS rules since the component is already set for this. Remove the float completely.
00b49af
to
12f693a
Compare
Thanks @mapk! Excited to put this to use :) |
Description
Fixes #18199. It appears that changing the float on the spinner component to
none
instead ofright
seems to work fine.How has this been tested?
I tested the visual change in a few places like:
Each instance there seemed to work just fine visually. I only tested in Firefox 71.0.
Screenshots
Image block
Storybook
Types of changes
Non-breaking CSS changes.
Checklist: