Merged
Changes from all commits

Here’s the deal.

I can’t show you this code in full context because it’s in a private repository.

@@ -29,3 +29,59 @@ $is-editor: true;
.wp-block-file__content-wrapper {
display: flex;
}

.wp-block-r-questrom-slider-block {
background: #fff;
counter-reset: slide-counter;
max-height: 500px;
overflow: hidden;
padding: 30px;

&::before {
z-index: -1;
}

&::after {
content: 'Slideshow Block - Contains ' counter(slide-counter) ' slides. Select a slide to begin editing.';
color: rgba(10, 24, 41, 0.7);
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-weight: 700;
font-size: 13px;
position: absolute;
top: 18px;
}

.has-child-selected & {
max-height: none;

&::after {
content: 'Slideshow Block - Edit mode. Contains ' counter(slide-counter) ' slides. Deselect this block to preview.';
}
}

.block-list-appender__toggle,
.block-editor-inserter__toggle {
border-radius: 0 !important;

&::before {
content: attr(aria-label);
}
}

.block-editor-inserter__toggle {
width: auto !important;
}
}

.wp-block-r-questrom-slide-block {
border: 1px solid #eee;

&::before {
counter-increment: slide-counter;
content: "Slide number " counter(slide-counter) ": ";
color: rgba(10, 24, 41, 0.7);
font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif;
font-size: 13px;

}
}
@@ -14,15 +14,18 @@
"packages-update": "wp-scripts packages-update"
},
"dependencies": {
"@accessible360/accessible-slick": "^1.0.1",
"@wordpress/block-editor": "^5.2.2",
"@wordpress/blocks": "^6.25.2",
"@wordpress/i18n": "^3.17.0"
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.1"
},
"devDependencies": {
"@wordpress/babel-preset-default": "^5.0.1",
"babel-plugin-import-glob": "^2.0.0",
"@wordpress/scripts": "^13.0.0",
"babel-plugin-import-glob": "^2.0.0",
"node-sass-glob-importer": "^5.3.2",
"resolve-url-loader": "^3.1.2",
"webpack-merge": "^5.7.3"
}
}

The slider block

@@ -0,0 +1,51 @@
# Slider Block

The slider block allows a user to insert a slideshow-style block
with both dot and arrow controls.

There is no limit to the number of slides. This block uses
Accessible Slick for the frontend and is responsible for
managing the slider behavior. Layouts are in the slide block.

Autoplay is not supported because it goes against BU MWAS.

A matching Slide block is the only child block allowed inside the
slider block. The Slide block has a number of preset content variations,
including testimonials, profile grid, photos, video, gallery, and columns.

## What's in here?

- A `current` folder. This is the current version of your block,
and where you will be working most of the time. Inside of this folder,
you'll find:
- `_style.scss`: Write all styles for the frontend of this block here.
(Editor-specific styles should go in editor.scss.)
- `config.js`: Your block configuration goes here.
- `edit.js`: All block admin editing functions go here.
- `markup.js`: Your basic HTML and output will go here. Designers - start here!
Developers: this is where you will go to connect frontend to backend code. This
file controls the display of both the Gutenberg view and the website view of the block
by default.
- `save.js`: Code related to how the block displays on the frontend goes here.
- A `deprecated` folder. This is where you should go if you need to
deprecate a block. **Always deprecate before changing code that could
affect existing content on websites, even markup!** Inside, you'll find:
- A set of folders which holds the code for each version of the block that has been
deprecated
- A file which controls the deprecated versions
- `index.js` is responsible for registering your block. You'll only
need to update this once with the namespace of the block, when you
begin development.

## To make your new block available to WordPress

- Import it to `src/index.js`
- Import the sass in `src/_index.scss`

## Can't compile?

- If you've removed the deprecated folder because you are using PHP rendering
insted of JavaScript rendering, you may run into an error where even though you've
deleted all references to a certain file or folder, you still get an error that it is
missing. To fix this, you need to clear the cache by deleting node_modules and rerunning
`npm install`.