Skip to content

Commit

Permalink
prep build 09/15
Browse files Browse the repository at this point in the history
  • Loading branch information
bph committed Sep 15, 2023
2 parents 8e25732 + 9fcfaac commit 64c9b7c
Show file tree
Hide file tree
Showing 189 changed files with 15,173 additions and 1,347 deletions.
37 changes: 25 additions & 12 deletions docs/explanations/history.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,35 @@

A set of links and resources covering the history of the Gutenberg project, how it got started, sources of inspiration, and initial thinking.

## Survey

There was a survey done: [https://make.wordpress.org/core/2017/04/07/editor-experience-survey-results/](https://make.wordpress.org/core/2017/04/07/editor-experience-survey-results/)

## Inspiration

This includes a list of historical articles and influences on the Gutenberg project.
A community [Editor Experience Survey](https://make.wordpress.org/core/2017/04/07/editor-experience-survey-results/) was conducted in early 2017, which reinforced the need for a new editing experience in WordPress.

- LivingDocs: [https://beta.livingdocs.io/articles](https://beta.livingdocs.io/articles)
- Parrot: [https://intenseminimalism.com/2017/parrot-an-integrated-site-builder-and-editor-concept-for-wordpress/](https://intenseminimalism.com/2017/parrot-an-integrated-site-builder-and-editor-concept-for-wordpress/)
This is a list of historical articles and products that influenced the Gutenberg project and the creation of the Block Editor.

- [Parrot: an integrated site builder and editor concept for WordPress](https://intenseminimalism.com/2017/parrot-an-integrated-site-builder-and-editor-concept-for-wordpress/)
- LivingDocs
- Apple Keynote
- Slack
- Google Sites v2

## Blog posts by the team

- Gutenberg tag on make/core: updates and much more: [https://make.wordpress.org/core/tag/gutenberg/](https://make.wordpress.org/core/tag/gutenberg/)
- Suggested revised timeline: [https://make.wordpress.org/core/2017/08/11/revised-suggested-roadmap-for-gutenberg-and-customization/](https://make.wordpress.org/core/2017/08/11/revised-suggested-roadmap-for-gutenberg-and-customization/)
- Discovering Gutenberg: [https://make.wordpress.org/core/2017/08/08/discovering-gutenberg-and-next-steps/](https://make.wordpress.org/core/2017/08/08/discovering-gutenberg-and-next-steps/)
### Gutenberg updates and feature overviews

- [Themes of the Future](https://wordpress.tv/2021/01/21/eileen-violini-themes-of-the-future-the-new-frontier-of-gutenberg-block-based-themes-and-theme-development/), Eileen Violini (January 2021)
- [Status Check: Site Editing & Customization](https://make.wordpress.org/core/2020/12/10/status-check-site-editing-and-customization/), Matías Ventura Bausero (December 2020)
- [State of the Word 2020 FSE Demo](https://youtu.be/QI3qCoiuG3w?t=1279), Matt Mullenweg (December 2020)
- [Embrace the Modularity](https://riad.blog/2020/01/28/embrace-the-modularity/), Riad Benguella (January 2020)
- [State of the Word 2019 Gutenberg Demo](https://www.youtube.com/watch?v=LezbkeV059Q), Matt Mullenweg (December 2019)
- [Growing JavaScript Skills with WordPress](https://gziolo.pl/2019/07/15/growing-javascript-skills-with-wordpress/) at JavaScript for WordPress conference (July 2019)
- [Beyond Gutenberg](https://wordpress.tv/2018/07/09/matias-ventura-beyond-gutenberg/), Matías Ventura Bausero (July 2018)
- [Anatomy of a block: Gutenberg design patterns](https://wordpress.tv/2018/07/08/tammie-lister-anatomy-of-a-block-gutenberg-design-patterns/), Tammie Lister (July 2018)
- [The Language of Gutenberg](https://lamda.blog/2018/04/22/the-language-of-gutenberg/), Miguel Fonseca (April 2018)
- [State of the Word 2017 Gutenberg Demo](https://youtu.be/XOY3ZUO6P0k?t=2100), Matt Mullenweg with demo by Matías Ventura Bausero (December 2017)
- [Gutenberg, or the Ship of Theseus](https://matiasventura.com/post/gutenberg-or-the-ship-of-theseus/), Matías Ventura Bausero (October 2017)
- [We Called It Gutenberg for a Reason](https://ma.tt/2017/08/we-called-it-gutenberg-for-a-reason/), Matt Mullenweg (August 2017)
- [How Gutenberg is Changing WordPress Development](https://riad.blog/2017/10/06/how-gutenberg-is-changing-wordpress-development/), Riad Benguella (October 2017)
- [Revised suggested roadmap for Gutenberg and Customization](https://make.wordpress.org/core/2017/08/11/revised-suggested-roadmap-for-gutenberg-and-customization/), Tammie Lister (August 2017)
- [Discovering Gutenberg and next steps](https://make.wordpress.org/core/2017/08/08/discovering-gutenberg-and-next-steps/), Tammie Lister (August 2017)
- [How Gutenberg Will Shape the Future of WordPress](https://www.linkedin.com/pulse/gutenberg-morten-rand-hendriksen/), Morten Rand-Henrikson (August 2017)

You can also view this [Index of Gutenberg related posts](https://make.wordpress.org/core/handbook/references/keeping-up-with-gutenberg-index/) for more resources.
13 changes: 12 additions & 1 deletion docs/getting-started/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,17 @@ Welcome! Let's get started building with blocks. Blocks are at the core of exten

[Create a Block Tutorial](/docs/getting-started/create-block/README.md) - Learn how to create your first block for the WordPress block editor.

## Learn WordPress Courses

At [Learn WordPress](https://learn.wordpress.org/), you can find [tutorials](https://learn.wordpress.org/tutorials/), [courses](https://learn.wordpress.org/courses/), and [online workshops](https://learn.wordpress.org/online-workshops/) to learn more about developing for the Block Editor. Here is a selection of current offerings.

- [Intro to Block Development: Build Your First Custom Block](https://learn.wordpress.org/course/introduction-to-block-development-build-your-first-custom-block/)
- [Converting a Shortcode to a Block](https://learn.wordpress.org/course/converting-a-shortcode-to-a-block/)
- [Using the WordPress Data Layer](https://learn.wordpress.org/course/using-the-wordpress-data-layer/)
- [Registering Block Patterns](https://learn.wordpress.org/workshop/registering-block-patterns/)
- [Intro to Gutenberg Block Development](https://learn.wordpress.org/workshop/intro-to-gutenberg-block-development/)
- [Intro to Publishing with the Block Editor](https://learn.wordpress.org/workshop/intro-to-publishing-with-the-block-editor/)

## Ways to Stay Informed

New features and changes are important to keep up to date on as the Gutenberg project continues. Each person will have their own unique needs in keeping up with a project of this scale. What follows is more of a catalogue of ways to keep up rather than a recommendation for how to do so.
Expand Down Expand Up @@ -50,4 +61,4 @@ Checking in on [issues](https://github.com/WordPress/gutenberg/issues) and [PRs]
- [Glossary](/docs/getting-started/glossary.md)
- [Frequently Asked Questions](/docs/getting-started/faq.md)
- [Project History](/docs/explanations/history.md)
- [Outreach](/docs/getting-started/outreach.md)
- [Gutenberg related Make posts](https://make.wordpress.org/core/handbook/references/keeping-up-with-gutenberg-index/)
87 changes: 0 additions & 87 deletions docs/getting-started/outreach.md

This file was deleted.

6 changes: 0 additions & 6 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,6 @@
"markdown_source": "../docs/getting-started/full-site-editing.md",
"parent": "getting-started"
},
{
"title": "Outreach",
"slug": "outreach",
"markdown_source": "../docs/getting-started/outreach.md",
"parent": "getting-started"
},
{
"title": "Glossary",
"slug": "glossary",
Expand Down
12 changes: 12 additions & 0 deletions docs/reference-guides/data/data-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,18 @@ _Returns_

- `Optional< any >`: The edit.

### getUserPatternCategories

Retrieve the registered user pattern categories.

_Parameters_

- _state_ `State`: Data state.

_Returns_

- `UserPatternCategories`: User patterns category array and map keyed by id.

### getUserQueryResults

Returns all the users returned by a query ID.
Expand Down
1 change: 0 additions & 1 deletion docs/toc.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
]
},
{ "docs/getting-started/full-site-editing.md": [] },
{ "docs/getting-started/outreach.md": [] },
{ "docs/getting-started/glossary.md": [] },
{ "docs/getting-started/faq.md": [] }
]
Expand Down
4 changes: 2 additions & 2 deletions lib/class-wp-theme-json-gutenberg.php
Original file line number Diff line number Diff line change
Expand Up @@ -2510,11 +2510,11 @@ public function get_root_layout_rules( $selector, $block_metadata ) {
// Right and left padding are applied to the first container with `.has-global-padding` class.
$css .= '.has-global-padding { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
// Nested containers with `.has-global-padding` class do not get padding.
$css .= '.has-global-padding :where(.has-global-padding) { padding-right: 0; padding-left: 0; }';
$css .= '.has-global-padding :where(.has-global-padding:not(.wp-block-block)) { padding-right: 0; padding-left: 0; }';
// Alignfull children of the container with left and right padding have negative margins so they can still be full width.
$css .= '.has-global-padding > .alignfull { margin-right: calc(var(--wp--style--root--padding-right) * -1); margin-left: calc(var(--wp--style--root--padding-left) * -1); }';
// The above rule is negated for alignfull children of nested containers.
$css .= '.has-global-padding :where(.has-global-padding) > .alignfull { margin-right: 0; margin-left: 0; }';
$css .= '.has-global-padding :where(.has-global-padding:not(.wp-block-block)) > .alignfull { margin-right: 0; margin-left: 0; }';
// Some of the children of alignfull blocks without content width should also get padding: text blocks and non-alignfull container blocks.
$css .= '.has-global-padding > .alignfull:where(:not(.has-global-padding):not(.is-layout-flex):not(.is-layout-grid)) > :where([class*="wp-block-"]:not(.alignfull):not([class*="__"]),.wp-block:not(.alignfull),p,h1,h2,h3,h4,h5,h6,ul,ol) { padding-right: var(--wp--style--root--padding-right); padding-left: var(--wp--style--root--padding-left); }';
// The above rule also has to be negated for blocks inside nested `.has-global-padding` blocks.
Expand Down
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.3/block-editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function gutenberg_get_block_editor_settings_experimental( $settings ) {
$template_blocks = parse_blocks( $current_template[0]->content );
$post_content_block = gutenberg_find_first_block( 'core/post-content', $template_blocks );

if ( ! empty( $post_content_block['attrs'] ) ) {
if ( isset( $post_content_block['attrs'] ) ) {
$settings['postContentAttributes'] = $post_content_block['attrs'];
}
}
Expand Down
24 changes: 19 additions & 5 deletions lib/compat/wordpress-6.4/block-hooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,14 +158,28 @@ function gutenberg_insert_hooked_block( $inserted_block, $relative_position, $an
array_unshift( $block['innerBlocks'], $inserted_block );
// Since WP_Block::render() iterates over `inner_content` (rather than `inner_blocks`)
// when rendering blocks, we also need to prepend a value (`null`, to mark a block
// location) to that array.
array_unshift( $block['innerContent'], null );
// location) to that array after HTML content for the inner blocks wrapper.
$chunk_index = 0;
for ( $index = $chunk_index; $index < count( $block['innerContent'] ); $index++ ) {
if ( is_null( $block['innerContent'][ $index ] ) ) {
$chunk_index = $index;
break;
}
}
array_splice( $block['innerContent'], $chunk_index, 0, array( null ) );
} elseif ( 'last_child' === $relative_position ) {
array_push( $block['innerBlocks'], $inserted_block );
// Since WP_Block::render() iterates over `inner_content` (rather than `inner_blocks`)
// when rendering blocks, we also need to prepend a value (`null`, to mark a block
// location) to that array.
array_push( $block['innerContent'], null );
// when rendering blocks, we also need to correctly append a value (`null`, to mark a block
// location) to that array before the remaining HTML content for the inner blocks wrapper.
$chunk_index = count( $block['innerContent'] );
for ( $index = count( $block['innerContent'] ); $index > 0; $index-- ) {
if ( is_null( $block['innerContent'][ $index - 1 ] ) ) {
$chunk_index = $index;
break;
}
}
array_splice( $block['innerContent'], $chunk_index, 0, array( null ) );
}
return $block;
}
Expand Down
Loading

0 comments on commit 64c9b7c

Please sign in to comment.