Skip to content
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

Hide Video block toggles for Autoplay and Plays Inline #2283

Closed
2 tasks done
westonruter opened this issue May 11, 2019 · 4 comments
Closed
2 tasks done

Hide Video block toggles for Autoplay and Plays Inline #2283

westonruter opened this issue May 11, 2019 · 4 comments
Milestone

Comments

@westonruter
Copy link
Member

westonruter commented May 11, 2019

Extracted from #2255, where default values have been provided for autoplay and playsinline, but what is remaining:

  • The Autoplay toggle for the Video block needs to be hidden/removed in AMP Stories, because autoplay is required.
  • The "Play Inline" toggle for the Video block needs to be hidden/removed always since it is not allowed in AMP.

These depend on WordPress/gutenberg#6023.

image

@swissspidy
Copy link
Collaborator

I just noticed that the order of panels in the block sidebar is different right after inserting a block vs. when selecting it later. Since the CSS relies on that order, the toggles are sometimes still visible.

Just inserted:

Screenshot 2019-05-14 at 12 53 37

Selected later:

Screenshot 2019-05-14 at 12 53 46

Would be good to have some consistency here. I suppose we need to work with some filter priorities.

@swissspidy
Copy link
Collaborator

Looks like that's a Gutenberg issue...

@swissspidy
Copy link
Collaborator

Opened an issue upstream to get some feedback: WordPress/gutenberg#15641

Maybe this can be fixed by changing the order in which the components are wrapped/returned. Will have to try it out.

@swissspidy
Copy link
Collaborator

Since this has been tested in #2109, and WordPress/gutenberg#15641 is something I haven't been able to find a workaround for, I'm closing this for now.

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

No branches or pull requests

2 participants