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

Video Block: refactor setting panel #67044

Merged

Conversation

up1512001
Copy link
Member

What?

Splitting from #66946

Why?

While adding DimensionsTool to video block it appears it needs to be inside ToolsPanel component instead of PanelBody.

Testing Instructions

  1. Add video block
  2. open setting panel

Screenshots or screencast

Screen.Recording.2024-11-16.at.00.11.32.mov

@up1512001 up1512001 added [Type] Enhancement A suggestion for improvement. [Block] Video Affects the Video Block labels Nov 15, 2024
@up1512001 up1512001 self-assigned this Nov 15, 2024
@up1512001 up1512001 requested a review from ajitbohra as a code owner November 15, 2024 18:43
Copy link

github-actions bot commented Nov 15, 2024

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.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: up1512001 <[email protected]>
Co-authored-by: aaronrobertshaw <[email protected]>
Co-authored-by: t-hamano <[email protected]>

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

Copy link
Contributor

@aaronrobertshaw aaronrobertshaw left a comment

Choose a reason for hiding this comment

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

Thanks for spinning up this PR @up1512001 🚀

Before we commit to refactoring the panel. As @t-hamano has proposed on your original PR, it would be good to see what's involved in the block support approach first.

My understanding of your original PR was that your use case needed an additional option (contain?) that the existing aspect ratio block support didn't provide? Can you give #67047 a test and review to see if it does meet your needs?

Even if we choose to adopt the block support instead of #66946, this refactor of the panel might still be desirable to bring the block inline with the Cover and Image blocks. We can make that call later though once we get the functionality we want.

@t-hamano
Copy link
Contributor

I left a comment here to discuss what approach would be ideal to resolve #60911.

@up1512001
Copy link
Member Author

@t-hamano As we are now moving towards ToolsPanel for many blocks it would be good to implement aspect-ratio & scale through DimensionsTool component.
let me know if we should proceed and first convert the video block Panel component to ToolsPanel.
This is a reference #67813

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

@up1512001 Sorry for the late reply.

let me know if we should proceed and first convert the video block Panel component to ToolsPanel.

Yes, it's worth moving forward with this PR regardless of how we move forward with #66946.

It's mostly working as expected, but I'd be happy if you could rebase just to be sure.

packages/block-library/src/video/edit.js Outdated Show resolved Hide resolved
packages/block-library/src/video/edit-common-settings.js Outdated Show resolved Hide resolved
@up1512001
Copy link
Member Author

up1512001 commented Dec 27, 2024

@t-hamano updated the default state for playback controls to true by default & rebase the PR.

Screen.Recording.2024-12-27.at.14.08.54.mov

@up1512001 up1512001 requested a review from t-hamano December 27, 2024 08:42
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@up1512001 up1512001 merged commit b4424d8 into WordPress:trunk Dec 27, 2024
64 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.0 milestone Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Video Affects the Video Block [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor "Settings" panel of Video block to use ToolsPanel instead of PanelBody
3 participants