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

Block examples documentation #6560

Merged
merged 53 commits into from
Jan 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
dccee83
the name of the property is blockSchema not schema
erral Dec 30, 2024
bea33fd
document the option
erral Dec 30, 2024
8cd8e6f
we use the term not
erral Dec 30, 2024
bfe8c56
document the SidebarPortal and SidebarPopup components as functional …
erral Dec 30, 2024
485a42c
document the SidebarPortal and SidebarPopup components as functional …
erral Dec 30, 2024
992d234
add first example of a block
erral Dec 30, 2024
8228d2d
docs
erral Dec 30, 2024
1ecbe10
more docs
erral Dec 30, 2024
12efde1
add the docs of custom schema and variations
erral Dec 30, 2024
d54d289
provide an example with variations and schema enhancer
erral Dec 30, 2024
476a36b
change folder names
erral Dec 30, 2024
9c09ad9
volto verssion
erral Dec 30, 2024
4d75f66
changelog
erral Dec 31, 2024
68c42a4
Update docs/source/blocks/examples/index.md
erral Jan 3, 2025
a75f94a
Update docs/source/blocks/examples/index.md
erral Jan 3, 2025
7907f50
Update docs/source/blocks/examples/index.md
erral Jan 3, 2025
13056b1
Update docs/source/blocks/examples/index.md
erral Jan 3, 2025
8eb9ea2
Update docs/source/blocks/examples/customviewvariationsandschemaenhan…
erral Jan 3, 2025
de133a9
Update docs/source/blocks/examples/customviewvariationsandschemaenhan…
erral Jan 3, 2025
5b70643
Update docs/source/blocks/examples/customviewvariationsandschemaenhan…
erral Jan 3, 2025
e507eed
Update docs/source/blocks/examples/customviewvariationsandschemaenhan…
erral Jan 3, 2025
3fc9aa2
Update docs/source/blocks/examples/customviewvariationsandschemaenhan…
erral Jan 3, 2025
6896154
Update packages/volto/news/6560.documentation
erral Jan 3, 2025
ff52fee
Update docs/source/blocks/examples/customschemaandview.md
erral Jan 3, 2025
ef09838
Update docs/source/blocks/examples/customschemaandview.md
erral Jan 3, 2025
f87d1b4
Apply suggestions from code review
erral Jan 3, 2025
aa274bc
rename files
erral Jan 3, 2025
9a56331
minor fixes
erral Jan 3, 2025
524f007
Merge branch 'main' into erral-review-docs
erral Jan 3, 2025
938ae9a
Update docs/source/blocks/settings.md
erral Jan 4, 2025
34e4423
Update docs/source/blocks/settings.md
erral Jan 4, 2025
158ec29
Apply suggestions from code review
stevepiercy Jan 4, 2025
9e34489
Clean up bad merge
stevepiercy Jan 4, 2025
682871d
trim code blocks
stevepiercy Jan 4, 2025
a7d2fc0
grammar
stevepiercy Jan 4, 2025
4e5b9e0
punctuation
stevepiercy Jan 4, 2025
d149cfe
grammar
stevepiercy Jan 4, 2025
739e588
s/webmaster/editor, one sentence per line, shorten intro
stevepiercy Jan 4, 2025
3d83b54
Move comment about HOC from code block to narrative text
stevepiercy Jan 4, 2025
bc5e436
Apply suggestions from code review
stevepiercy Jan 4, 2025
a8cbfb0
Apply suggestions from code review
erral Jan 5, 2025
3102b4d
signal that we do not need an edit component
erral Jan 5, 2025
ad7b2c0
show the field added by the schema enhancer in the corresponding vari…
erral Jan 5, 2025
59328e7
use the i18n pattern in the schema enhancer
erral Jan 5, 2025
83405f8
signal that the folder will be used to save the variations and the sc…
erral Jan 5, 2025
5244365
split comments to make them visible easier
erral Jan 5, 2025
8dbf8f8
rewrite the block configuration settings docs
erral Jan 5, 2025
43d0fa6
add an example with a custom edit form
erral Jan 5, 2025
720b3e2
rename the blocks
erral Jan 5, 2025
c06b755
Add add and edit content SVG icons
stevepiercy Jan 5, 2025
591505f
Apply suggestions from code review
stevepiercy Jan 5, 2025
f1abca2
Apply omitted suggestions from code review
stevepiercy Jan 5, 2025
058b4b0
Break comments into 2 lines to avoid overflow scrollbar when viewing …
ichim-david Jan 6, 2025
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
Prev Previous commit
Next Next commit
minor fixes
erral committed Jan 3, 2025
commit 9a5633184e8f6dfa33c073dbbcfff5a5894aebf7
4 changes: 4 additions & 0 deletions docs/source/blocks/examples/custom-schema-and-view.md
Original file line number Diff line number Diff line change
@@ -161,4 +161,8 @@ import imagesSVG from '@plone/volto/icons/images.svg';
## See it in action

Your block is ready to be used in your site.
<<<<<<< HEAD
=======

>>>>>>> 168bd09a7 (minor fixes)
Restart your Volto site, and you can add it using the block add form.
Original file line number Diff line number Diff line change
@@ -139,7 +139,7 @@ export default withBlockExtensions(View);
Next you need to configure the schema enhancer function.
In this example, you will add a new field named `color` when using `schemaEnhancerVariation02`.

Create a file {file}`enhancers.js` in the {file}`BlockSchema` folder with the following content.
Create a file {file}`enhancers.js` in the {file}`BlockSchema06` folder with the following content:

```js
const schemaEnhancerVariation02 = ({ formData, schema, intl }) => {