Skip to content

VideoPress Block: Add UI for Customizing Player Seekbar Colors#18155

Merged
roundhill merged 4 commits into
masterfrom
add/videopress-custom-seekbar-colors
Feb 17, 2021
Merged

VideoPress Block: Add UI for Customizing Player Seekbar Colors#18155
roundhill merged 4 commits into
masterfrom
add/videopress-custom-seekbar-colors

Conversation

@roundhill
Copy link
Copy Markdown
Contributor

@roundhill roundhill commented Dec 18, 2020

Adds a new panel to the VideoPress block to set custom colors for the seekbar:

Screen Shot 2020-12-18 at 2 33 54 PM

Props to @pgk for building the majority of this PR :)

Note that the iframe will reload everytime you choose a color... this isn't ideal and we are looking into improving the oembed to work via JS instead of an iframe for scenarios like this.

Fixes #

Changes proposed in this Pull Request:

Adds a new panel to set the seek bar colors for main, loading, and played colors. Every time you change a color, the player iframe gets reloaded so that the new color changes will show.

Jetpack product discussion

pxWta-Tk-p2

Does this pull request change what data or activity we track or use?

No

Testing instructions:

  • Add or edit a video block, don't choose any custom seekbar colors yet. They should have the usual grey/black combo.
  • Now choose some seekbar colors, click Save colors, and the player should refresh with the new colors.
  • Publish the post and view it on the front-end, the custom colors should also show.

Proposed changelog entry for your changes:

  • VideoPress Block: Added support for custom video player seekbar colors.

@matticbot
Copy link
Copy Markdown
Contributor

Caution: This PR has changes that must be merged to WordPress.com
Hello roundhill! These changes need to be synced to WordPress.com - If you 're an a11n, please commandeer and confirm D54546-code works as expected before merging this PR. Once this PR is merged, please commit the changes to WP.com. Thank you!
This revision will be updated with each commit to this PR

@jetpackbot
Copy link
Copy Markdown
Collaborator

jetpackbot commented Dec 18, 2020

Scheduled Jetpack release: March 2, 2021.
Scheduled code freeze: February 22, 2021

Thank you for the great PR description!

When this PR is ready for review, please apply the [Status] Needs Review label. If you are an a11n, please have someone from your team review the code if possible. The Jetpack team will also review this PR and merge it to be included in the next Jetpack release.

Generated by 🚫 dangerJS against 44978a5

pgk
pgk previously approved these changes Dec 22, 2020
Copy link
Copy Markdown
Contributor

@pgk pgk left a comment

Choose a reason for hiding this comment

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

Works well and makes sense! 🚢

@roundhill roundhill added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Review This PR is ready for review. labels Jan 4, 2021
@jeherve jeherve added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] VideoPress A feature to help you upload and insert videos on your site. labels Jan 5, 2021
@roundhill roundhill added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Jan 5, 2021
Copy link
Copy Markdown
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

This may be a stupid question, but is "seekbar" the official name of that progress bar? I must admit I was not familiar with the term, so when I first saw the toolbar I wasn't really sure what it was used for.

Comment thread extensions/blocks/videopress/seekbar-color-settings.js Outdated
Comment thread extensions/blocks/videopress/seekbar-color-settings.js Outdated
Comment thread extensions/blocks/videopress/seekbar-color-settings.js Outdated
Comment thread extensions/blocks/videopress/seekbar-color-settings.js Outdated
Comment thread extensions/blocks/videopress/save.js
@jeherve jeherve added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Jan 15, 2021
@sdixon194
Copy link
Copy Markdown
Contributor

Did a bit of testing and didn't see anything really broken!

Just noting that with the iframe reload, it was fairly tricky to pick a custom color, since it reloads as soon as a color is selected:

Screen Capture on 2021-01-15 at 10-18-58

Choosing a different color using the slider at the bottom was also difficult. Eventually it started working, but I couldn't reliable reproduce a way to get it to do so:

Screen Capture on 2021-01-15 at 10-21-54

Is it possible to delay the reload until the color is chosen and the user clicks away?

I also tested on wp 5.5 and 5.5.3, and noticed that experience seemed smoother because it didn't collapse the entire color panel once a color was chosen. On 5.6, every time I chose a color the entire panel would reload, reproducible in Chrome and Firefox:

5.5/5.5.3:

Screen Capture on 2021-01-15 at 11-18-31

5.6

Screen Capture on 2021-01-15 at 11-16-43

@roundhill
Copy link
Copy Markdown
Contributor Author

This may be a stupid question, but is "seekbar" the official name of that progress bar? I must admit I was not familiar with the term, so when I first saw the toolbar I wasn't really sure what it was used for.

No stupid questions! Should we just call it a Progress Bar?

@roundhill
Copy link
Copy Markdown
Contributor Author

Is it possible to delay the reload until the color is chosen and the user clicks away?

Nice catch @sdixon194! I'll see if that's possible...

@jeherve
Copy link
Copy Markdown
Member

jeherve commented Jan 18, 2021

Should we just call it a Progress Bar?

I would personally understand it better, yeah, but maybe that's just me :)

@roundhill
Copy link
Copy Markdown
Contributor Author

Is it possible to delay the reload until the color is chosen and the user clicks away?

Nice catch @sdixon194! I'll see if that's possible...

I've updated the block to now keep some local state for the color changes, which will get applied when the Save colors button is clicked:

Screen Shot 2021-01-18 at 1 33 49 PM

This fixes the issue with the 'live' reloading, but will require the user to click the button to see their changes. OK trade-off?

@roundhill
Copy link
Copy Markdown
Contributor Author

I would personally understand it better, yeah, but maybe that's just me :)

I changed it to Progress Colors, Progress Bar Colors was too wide, causing the selected colors to overlap with the text:

Screen Shot 2021-01-18 at 1 38 59 PM

@roundhill roundhill closed this Jan 18, 2021
@roundhill roundhill force-pushed the add/videopress-custom-seekbar-colors branch from 039446d to 150d123 Compare January 18, 2021 22:46
@roundhill
Copy link
Copy Markdown
Contributor Author

I think #18006 isn't merged to wp.com quite yet, which is why the phab diff build isn't happy at the moment...

@roundhill roundhill added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Feb 10, 2021
@roundhill
Copy link
Copy Markdown
Contributor Author

This is all rebased up and ready to go!

I'm still not sure if the deprecation is necessary as it seems to load fine for me for older versions of the block, but I may just not be understanding why we need to do it 😄 @jeherve

@jeherve jeherve added this to the 9.5 milestone Feb 11, 2021
@jeherve jeherve added [Status] Ready to Merge Go ahead, you can push that green button! and removed [Status] Needs Review This PR is ready for review. labels Feb 11, 2021
Copy link
Copy Markdown
Member

@jeherve jeherve left a comment

Choose a reason for hiding this comment

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

It seems to work well, this should be ready to merge!

@github-actions github-actions Bot added [Block] VideoPress [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ labels Feb 11, 2021
@roundhill
Copy link
Copy Markdown
Contributor Author

r221218-wpcom

@roundhill roundhill merged commit 1fa6f79 into master Feb 17, 2021
@roundhill roundhill deleted the add/videopress-custom-seekbar-colors branch February 17, 2021 17:08
@matticbot matticbot added [Status] Needs Changelog and removed [Status] Ready to Merge Go ahead, you can push that green button! labels Feb 17, 2021
jeherve added a commit that referenced this pull request Feb 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] VideoPress Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Feature] VideoPress A feature to help you upload and insert videos on your site. [Plugin] Jetpack Issues about the Jetpack plugin. https://wordpress.org/plugins/jetpack/ Touches WP.com Files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants