You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As a site admin, I want to be able to add a repeatable group for slide content so that I can add multiple slides to the carousel.
As a site admin, I want to be able to select a background color so that the color is displayed as the background of an individual slide.
As a site admin, I want to be able to upload an image so that the image is displayed as the background of an individual slide.
As a site admin, I want to be able to upload a video so that the video is displayed as the background of an individual slide.
As a site admin, I want to be able to set the font color so that I can ensure an individual slide’s text is readable when displayed over its background element.
As a site admin, I want to be able to add a title so that it is displayed as an individual slide’s title.
As a site admin, I want to be able to add text so that it is displayed as an individual slide’s content.
As a site admin, I want to be able to search for or manually set a link so that it is displayed as a clickable button in an individual slide.
As a user, I want to be able to click or tap on the left and right navigation arrows so that I can navigate through the slides in the carousel.
As a user, I want to be able to swipe left and right on the carousel so that I can navigate through the slides in the carousel.
As a user, I want to be able to click or tap on the pagination dots below the carousel so that I am taken to the slide for the pagination dot.
As a user, I want to be able to click on the button in a slide so that I am taken to the URL provided for the button.
Create a 3-tiered block structure involving 2 new custom blocks, as defined below:
Carousel Block
Top-level custom parent block
Contains global block settings via inspector panel (though none defined so far)
Displays child blocks via InnerBlocks, limited to the Slide Block
Slide Block
Middle-level custom child block
Limited to displaying only for the Carousel Block (i.e., not available as a top-level block or as a child of any other blocks)
Contains settings specific to the individual slide via inspector panel:
Background (image, video, color)
Font Color
Displays child blocks via InnerBlocks, limited to certain globally-available blocks (e.g., paragraph, heading)
Defines a simple inner block template, pre-populated with dummy placeholder content (e.g., "Slide Title" for heading block and "Slide Content" for paragraph block)
Default template includes heading ("title"), paragraph ("content"), and button
Note: As the core blocks to be used as inner-most child blocks have built-in font color styling controls, we can either a) nix the slide-level font color control entirely or b) implement slide-level font color control and have the child blocks inherit this if no custom color selection is chosen.
Admin Display
When the carousel (or inner blocks) are not selected, the editor view will mimic the frontend view (i.e., a proper carousel/slider view).
When the carousel (or inner blocks) are selected, the editor view will display the slides separately in a list so all content is editable.
Activity
coreymcollins commentedon Aug 24, 2020
User Stories
As a site admin, I want to be able to add a repeatable group for slide content so that I can add multiple slides to the carousel.
As a site admin, I want to be able to select a background color so that the color is displayed as the background of an individual slide.
As a site admin, I want to be able to upload an image so that the image is displayed as the background of an individual slide.
As a site admin, I want to be able to upload a video so that the video is displayed as the background of an individual slide.
As a site admin, I want to be able to set the font color so that I can ensure an individual slide’s text is readable when displayed over its background element.
As a site admin, I want to be able to add a title so that it is displayed as an individual slide’s title.
As a site admin, I want to be able to add text so that it is displayed as an individual slide’s content.
As a site admin, I want to be able to search for or manually set a link so that it is displayed as a clickable button in an individual slide.
As a user, I want to be able to click or tap on the left and right navigation arrows so that I can navigate through the slides in the carousel.
As a user, I want to be able to swipe left and right on the carousel so that I can navigate through the slides in the carousel.
As a user, I want to be able to click or tap on the pagination dots below the carousel so that I am taken to the slide for the pagination dot.
As a user, I want to be able to click on the button in a slide so that I am taken to the URL provided for the button.
ravewebdev commentedon Aug 24, 2020
@gregrickaby @coreymcollins Here's an overview of my plan so far (similar plan to @dcooney's for the Accordion block).
Create a 3-tiered block structure involving 2 new custom blocks, as defined below:
Carousel Block
InnerBlocks, limited to theSlideBlockSlide Block
CarouselBlock (i.e., not available as a top-level block or as a child of any other blocks)InnerBlocks, limited to certain globally-available blocks (e.g., paragraph, heading)Note: As the core blocks to be used as inner-most child blocks have built-in font color styling controls, we can either a) nix the slide-level font color control entirely or b) implement slide-level font color control and have the child blocks inherit this if no custom color selection is chosen.
Admin Display
When the carousel (or inner blocks) are not selected, the editor view will mimic the frontend view (i.e., a proper carousel/slider view).
When the carousel (or inner blocks) are selected, the editor view will display the slides separately in a list so all content is editable.
gregrickaby commentedon Aug 25, 2020
@ravewebdev This sounds good to me. I think we'd want to go with color option b.
ravewebdev commentedon Aug 25, 2020
8/25 EOD Update:
carouselblock.I took a step back and spent most of the day working on global functionality/styling that can be shared between this and the accordion block:
ravewebdev commentedon Aug 26, 2020
8/26 EOD Update:
fontColorattribute tocarousel-slideblock with associated setting viaInspectorControl.carousel-slideblock inwithColorsHOC to simplify applying color-related class/style to block.ravewebdev commentedon Aug 27, 2020
8/27 EOD Update:
backgroundColorattribute for testing purposes (will likely be changed/replaced later).ravewebdev commentedon Aug 28, 2020
8/28 EOD Update:
InspectorControl:ravewebdev commentedon Aug 31, 2020
8/31 EOD Update:
Settingscomponent for slide settings (edit only).Slidecomponent to display individual slide.withBackgroundImageglobal HOC to handle displaying component with background image.withBackgroundVideoglobal HOC to handle displaying component with background video.withFontColorglobal HOC to handle displaying component with custom font color.ravewebdev commentedon Sep 1, 2020
9/1 EOD Update:
withBackgroundColorglobal HOC to handle displaying component with custom background color.Slidecomponent.showPreviewsocarousel-slidechild block can access it.pure-react-carouselwrap markup components to edit function.sliderblock to default to edit mode when first inserted into post.ravewebdev commentedon Sep 2, 2020
9/2 EOD Update:
pure-react-carouselpackage and elements, as this was not working with Gutenberg.glidejspackage to handle slider with plain JS. Implemented markup, functionality, basic styling in editor preview mode.utilsdirectory, recreating setting style HOCs from carousel block.utilsas well, though may hold off until next sprint (up for discussion tomorrow).ravewebdev commentedon Sep 3, 2020
9/3 EOD Update:
slideCountattribute and corresponding property viawithSelectto track current number of slides per carousel.backgroundVideoJS module to handle muting video backgrounds in preview mode.glidejsand custom slider classes/wrappers tosavefunction for both blocks.utils/config.jsfor carousel block to holdglidejsconfig.README.mdfor carousel block.Global updates:
utilsdirectory available to both blocks.ravewebdev commentedon Sep 4, 2020
9/4 EOD Update:
rich-textblock from carousel branch and updated plugin file accordingly.InnerBlocks.propsto block-levelconfig.jsfiles.InnerBlocks.props,glideJSconfig, and slider prev/next button text.README.mds for both blocks.README.mds.PR #85 ready for review.