-
Notifications
You must be signed in to change notification settings - Fork 6
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
WIP: Add playlist support #6
Conversation
…approach of the core Gallery block
…e properly on the front-end
Ugh not able to set two reviewers it seems... so pinging @fabiankaegy and @dinhtungdu for review and merge as you're ready |
Note that this is still a work in progress. I'm hoping to detail out tomorrow the approach I took and some of the downsides I'm encountering, as well as the pieces that I still see left here. I also have some questions and areas of feedback I'd love to get. Feel free to review in the meantime though but just want to set proper expectations here. |
Added more details to the PR now. As I mention in that, I think all core functionality is in place and working but lots of things that could be improved upon. Happy to address any feedback anyone may have or feel free to checkout this branch and work on top of it. |
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.
The block works with audio files in the library. But it doesn't work if I upload the media file directly. I think that should be fixed because it's a bug, other enhancements can be implemented later.
Also, the player position is fixed in the editor. It's due to the position being related to the body, not the editor wrapper. It doesn't happen on the front end. |
I'd say let's resolve the merge conflicts and merge this in. I can work on opening issues for the remaining issues Darin noted as well as what Tung called out, then we can sort out what's a legitimate initial release blocker and what can get fixed up later on. |
Description of the Change
This PR adds basic playlist support to our custom block. I copied the approach that the new core Gallery block uses, specifically around how it uses innerBlocks, only utilizing Audio blocks and not Image blocks.
The initial state looks like this:
You can then select one or more items from the Media Library and that will render out the individual Audio blocks as well as the WebAmp player:
You can then remove any of the Audio blocks or add new audio files and everything updates.
On the front-end, currently it renders out all the individual Audio blocks and then those get replaced with the WebAmp player.
There are a number of remaining items that I see here:
mediaPlaceholder
component (you can get to this flow using the Classic block). This may be as good as it gets until support is added for thatThere's probably other things that could be tweaked/fixed/changed as well that I'm missing. The basic pieces are all there, where you can add the block, you can add one or more songs and that then renders on the FE. But lots of little things we could make better here
Alternate Designs
Instead of using core/audio blocks within an innerBlocks container, we could add our own custom block to handle the playlist items