Skip to content

Repeater Block #3313

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

Open
wants to merge 26 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
6f27d80
text block now uses repeaterValue context
Nov 29, 2023
349950e
Merge branch 'develop' into feat/repeater-block
May 23, 2024
917aea7
Merge branch 'develop' into feat/repeater-block
Jun 5, 2024
c4ebfa3
Merge branch 'develop' into feat/repeater-block
Jun 13, 2024
ed17780
added repeater value context
Jun 13, 2024
087d2c8
Merge branch 'develop' into feat/repeater-block
Jul 24, 2024
743de96
Merge branch 'develop' into feat/repeater-block
Jul 24, 2024
b82bcd8
Merge branch 'develop' into feat/repeater-block
Aug 5, 2024
4d1b60e
added support for updating object properties inside attributes
Aug 7, 2024
5709582
Merge branch 'develop' into feat/repeater-block
Aug 7, 2024
94c61d6
Pass query loop context
Aug 10, 2024
658972a
added repeater block icons
Sep 5, 2024
4f79131
do not run through sprintf anymore if it's just the default attr name…
Sep 5, 2024
85d43fd
optimized use dynamic content
Sep 6, 2024
4dbfbfd
show spinner while still loading dynamic content in editor
Sep 10, 2024
5acc421
added format to the dynamic content popup
Sep 11, 2024
5231a84
added repeater value in button block
Sep 11, 2024
1f21215
Merge branch 'develop' into feat/repeater-block
Sep 23, 2024
bd1073b
Merge branch 'develop' into feat/repeater-block
Sep 23, 2024
826b855
Merge branch 'develop' into feat/repeater-block
Sep 23, 2024
64e0201
allow custom attributes, links and image attributes to be dynamically…
Sep 25, 2024
f6e8c23
Merge branch 'develop' into feat/repeater-block
Sep 27, 2024
ebb1dba
added repeaterValue in all block.json
Oct 4, 2024
3905673
Merge branch 'develop' into feat/repeater-block
Oct 9, 2024
ad03d99
added tabOverrides prop
Oct 17, 2024
d84f68f
added isBusy prop to select control
Oct 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/__block-container-template/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "New Block",
"description": "A new block.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Keywords that are not in the title"
],
Expand Down
8 changes: 7 additions & 1 deletion src/__block-template/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "New Block",
"description": "A new block.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Keywords that are not in the title"
],
Expand Down
4 changes: 4 additions & 0 deletions src/block-components/typography/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { useDynamicContent } from '~stackable/components/dynamic-content-control
/**
* WordPress dependencies
*/
import { Spinner } from '@wordpress/components'
import { RichText } from '@wordpress/block-editor'
import {
useEffect,
Expand Down Expand Up @@ -92,6 +93,9 @@ export const Typography = memo( forwardRef( ( props, ref ) => {
}, [ debouncedText, onChange ] ) // Don't include `value` in the dependency list because it will cause a double triggering of the `onChange`.

const dynamicContentText = useDynamicContent( debouncedText )
if ( dynamicContentText.includes( 'data-stk-dynamic=' ) && dynamicContentText.includes( '></span>' ) ) {
return <Spinner />
}

if ( ! editable ) {
return <TagName className={ className }>{ dynamicContentText }</TagName>
Expand Down
8 changes: 7 additions & 1 deletion src/block/accordion/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Accordion",
"description": "A title that your visitors can toggle to view more text. Use as FAQs or multiple ones for an Accordion.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Toggle",
"Faq"
Expand Down
8 changes: 7 additions & 1 deletion src/block/blockquote/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Blockquote",
"description": "Display a quote in style",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"textdomain": "stackable-ultimate-gutenberg-blocks",
"stk-type": "section",
"stk-demo": "https://wpstackable.com/blockquote-block/?utm_source=welcome&utm_medium=settings&utm_campaign=view_demo&utm_content=demolink"
Expand Down
8 changes: 7 additions & 1 deletion src/block/button-group/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Button Group",
"description": "Add a customizable button.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Link"
],
Expand Down
8 changes: 7 additions & 1 deletion src/block/button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Button",
"description": "Add a customizable button.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"parent": [
"stackable/button-group"
],
Expand Down
8 changes: 7 additions & 1 deletion src/block/call-to-action/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Call to Action",
"description": "A small section you can use to call the attention of your visitors. Great for calling attention to your products or deals.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/innerBlockOrientation": "innerBlockOrientation"
},
Expand Down
8 changes: 7 additions & 1 deletion src/block/card/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Card",
"description": "Describe a single subject in a small card. You can use this to describe your product, service or a person.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/innerBlockOrientation": "innerBlockOrientation"
},
Expand Down
8 changes: 7 additions & 1 deletion src/block/carousel/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Carousel",
"description": "A carousel slider.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Slider"
],
Expand Down
9 changes: 8 additions & 1 deletion src/block/column/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@
"title": "Inner Column",
"description": "A single column with advanced layout options.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId", "stackable/innerBlockOrientation", "stackable/columnWrapDesktop" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/columnWrapDesktop",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/innerBlockOrientation": "innerBlockOrientation"
},
Expand Down
3 changes: 2 additions & 1 deletion src/block/columns/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"usesContext": [
"postId",
"postType",
"queryId"
"queryId",
"stackable/repeaterValue"
],
"keywords": [
"Section rows",
Expand Down
8 changes: 7 additions & 1 deletion src/block/count-up/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Count Up",
"description": "Showcase your stats. Display how many customers you have or the number of downloads of your app.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Number"
],
Expand Down
8 changes: 7 additions & 1 deletion src/block/countdown/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Countdown",
"description": "Display a countdown timer on your website.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Timer"
],
Expand Down
3 changes: 2 additions & 1 deletion src/block/design-library/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation"
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Template"
Expand Down
8 changes: 7 additions & 1 deletion src/block/divider/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Divider",
"description": "Add a pause between your content.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Horizontal Rule",
"HR"
Expand Down
8 changes: 7 additions & 1 deletion src/block/expand/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Expand / Show More",
"description": "Display a small snippet of text. Your readers can toggle it to show more information.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Hide",
"Less"
Expand Down
8 changes: 7 additions & 1 deletion src/block/feature-grid/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Feature Grid",
"description": "Display multiple product features or services. You can use Feature Grids one after another.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/columnWrapDesktop": "columnWrapDesktop"
},
Expand Down
8 changes: 7 additions & 1 deletion src/block/feature/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Feature",
"description": "Display a product feature or a service in a large area.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/columnWrapDesktop": "columnWrapDesktop"
},
Expand Down
8 changes: 7 additions & 1 deletion src/block/heading/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Heading",
"description": "Introduce new sections of your content in style.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Title"
],
Expand Down
3 changes: 2 additions & 1 deletion src/block/hero/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation"
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"providesContext": {
"stackable/innerBlockOrientation": "innerBlockOrientation"
Expand Down
8 changes: 7 additions & 1 deletion src/block/horizontal-scroller/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Horizontal Scroller",
"description": "A slider that scrolls horizontally.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId", "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Slider",
"Carousel"
Expand Down
3 changes: 2 additions & 1 deletion src/block/icon-box/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation"
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"textdomain": "stackable-ultimate-gutenberg-blocks",
"stk-type": "section",
Expand Down
8 changes: 7 additions & 1 deletion src/block/icon-button/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Icon Button",
"description": "Add a customizable button.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"parent": [
"stackable/button-group"
],
Expand Down
3 changes: 2 additions & 1 deletion src/block/icon-label/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation"
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"SVG"
Expand Down
10 changes: 9 additions & 1 deletion src/block/icon-list-item/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
"title": "Icon List Item",
"description": "A single list entry in the Icon List block",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation", "stackable/ordered", "stackable/uniqueId" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/ordered",
"stackable/uniqueId",
"stackable/repeaterValue"
],
"keywords": [],
"parent": [
"stackable/icon-list"
Expand Down
8 changes: 7 additions & 1 deletion src/block/icon-list/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@
"title": "Icon List",
"description": "An unordered list with icons. You can use this as a list of features or benefits.",
"category": "stackable",
"usesContext": [ "postId", "postType", "queryId" , "stackable/innerBlockOrientation" ],
"usesContext": [
"postId",
"postType",
"queryId",
"stackable/innerBlockOrientation",
"stackable/repeaterValue"
],
"keywords": [
"Checklist",
"Bullets",
Expand Down
Loading
Loading