As found by Jorge Calle, when switching a post from "published" back to "draft" there's a weird UI issue on the toggles in the Publicize pre-publish sheet.
The reason for this messed up styling is the disabled
attribute on the toggles. I'll look into a fix.
It's curious that Gutenberg's FormToggle
component doesn't really provide any styling for the disabled
state.
Seems like they suggest providing opacity of 0.5 when disabled in their readme though..
That looked more like an example to me, TBH. But yeah, that could work for starters. Tho that logic really should be part of the upstream component IMO.
that logic really should be part of the upstream component
I agree.
FYI, visible borders around disabled toggles will be fixed in v5.0:
https://github.com/WordPress/gutenberg/pull/12091
https://github.com/Automattic/wp-calypso/issues/28659#issuecomment-440228637
We'll need to get it sorted for Calypso separately though:
https://github.com/Automattic/wp-calypso/issues/28707
The above fixes only unchecked state, though. Checked is still messed up:
Noted at https://github.com/WordPress/gutenberg/pull/12091#issuecomment-440273541
@simison So this is possibly a dupe of #28707?
Closing, since this is either a dupe of #28707, or if it isn't, it's fixed by https://github.com/WordPress/gutenberg/pull/12091. Furthermore, #28723 adds more disabled
styling.
So this is possibly a dupe of #28707?
It'll still probably look broken in Calypso but in a different way; I'd worry about that later.
Gutenberg PR fixes this for wp-admin Gutenberg so good to close. 馃憤