Skip to content
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

Templates, compound blocks & muliti-section blocks support #68

Merged
merged 9 commits into from
Sep 13, 2023

Conversation

dylandepass
Copy link
Member

@dylandepass dylandepass commented Sep 6, 2023

Support for Templates, compound and multi-section blocks

Templates

Templates are a way to group an entire document into a single element in the sidekick library

To mark a document as a template you would set type to template in default library metadata.
Screenshot 2023-09-06 at 11 39 14 AM

Supporting metadata in a template is also a required feature for template support. To add a metadata table to the template you can use the new Page metadata block.

Screenshot 2023-09-06 at 11 40 25 AM

When the template is copied a metadata table will be added along with the content to the clipboard.
Screenshot 2023-09-06 at 11 41 06 AM

Multi Section blocks

Multi section blocks are a way to group multiple sections into a single item in the sidekick library. Some block implementations require multiple sections of content (tabs).

To use multi section blocks the first section should contain library metadata that has a include next key and the value should be set to the number of subsequent sections that should be included in the item in the sidekick library.

Screenshot 2023-09-06 at 11 53 35 AM

Fixes #28, #64, #65, #66, #67

@dylandepass dylandepass changed the title Multi section blocks Templates, Compound Blocks & Muliti-section blocks support Sep 6, 2023
@dylandepass dylandepass changed the title Templates, Compound Blocks & Muliti-section blocks support Templates, compound blocks & muliti-section blocks support Sep 6, 2023
@codecov
Copy link

codecov bot commented Sep 6, 2023

Codecov Report

Merging #68 (eb5036c) into main (88d5a61) will increase coverage by 0.49%.
Report is 3 commits behind head on main.
The diff coverage is 99.82%.

@@            Coverage Diff             @@
##             main      #68      +/-   ##
==========================================
+ Coverage   97.80%   98.30%   +0.49%     
==========================================
  Files          27       30       +3     
  Lines        3467     4308     +841     
==========================================
+ Hits         3391     4235     +844     
+ Misses         76       73       -3     
Files Changed Coverage Δ
src/components/block-list/block-list.js 99.56% <99.06%> (-0.44%) ⬇️
src/components/block-renderer/block-renderer.js 96.74% <100.00%> (+0.59%) ⬆️
src/plugins/blocks/blocks.js 99.72% <100.00%> (+0.64%) ⬆️
src/plugins/blocks/utils.js 98.52% <100.00%> (+1.87%) ⬆️
src/utils/dom.js 92.65% <100.00%> (+0.51%) ⬆️
test/fixtures/blocks.js 98.34% <100.00%> (+0.52%) ⬆️
test/fixtures/libraries.js 100.00% <100.00%> (ø)
test/fixtures/pages.js 97.84% <100.00%> (+0.97%) ⬆️
test/fixtures/stubs/compound-block.js 100.00% <100.00%> (ø)
test/fixtures/stubs/pages.js 100.00% <100.00%> (ø)
... and 2 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

📢 Have feedback on the report? Share it here.

@dylandepass dylandepass merged commit 28c8a78 into main Sep 13, 2023
4 checks passed
@dylandepass dylandepass deleted the multi-section-blocks branch September 13, 2023 03:24
@github-actions
Copy link

🎉 This PR is included in version 1.5.5 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support blocks made up of multiple sections
2 participants