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

Add a command center to the site editor. #49330

Merged
merged 37 commits into from
Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
fbc69ae
Bootstrap the commands package
youknowriad Mar 21, 2023
5a4db2e
Add commands loaders
youknowriad Mar 23, 2023
2f2ccea
Add navigation commands
youknowriad Mar 24, 2023
055ff30
Add commands to navigate to new post/page
youknowriad Mar 27, 2023
635e86e
Use our own Modal component and tweak style
youknowriad Mar 27, 2023
66a5479
Add back button
youknowriad Mar 28, 2023
f57e748
Better loading state
youknowriad Mar 28, 2023
d47ebd0
Add page specific placeholders
youknowriad Mar 29, 2023
31b156c
Variables
jameskoster Mar 29, 2023
a54b91a
General styling
jameskoster Mar 29, 2023
f1f3d3b
Update the architecture of the command loader
youknowriad Mar 30, 2023
319b9ae
Add posts, templates and template parts
youknowriad Mar 30, 2023
ad75627
Placeholder
jameskoster Mar 30, 2023
a5730da
Style tweaks
jameskoster Mar 30, 2023
3994400
Add empty state
youknowriad Mar 31, 2023
24b6d2d
Close command center on click
youknowriad Mar 31, 2023
8deb50f
Do not change the canvas mode
youknowriad Mar 31, 2023
c366b31
Make group headings sticky
jameskoster Mar 31, 2023
6a446d7
fixed top position for commands
SaxonF Apr 2, 2023
0363e50
Update Typo
youknowriad Apr 3, 2023
02e2098
Small fix
youknowriad Apr 3, 2023
3ae0f23
Allow providing post titles
youknowriad Apr 3, 2023
c59ee40
Highlight the searched text
youknowriad Apr 3, 2023
9b237ad
Remove useless custom search
youknowriad Apr 3, 2023
f064740
Make the API private for now
youknowriad Apr 3, 2023
1cbad9d
Add a couple e2e tests
youknowriad Apr 3, 2023
2c23eb9
Fix lock file
youknowriad Apr 3, 2023
38ad2ce
font weight
jameskoster Apr 3, 2023
6997207
Prevent browser default on Meta+K
mcsf Apr 4, 2023
f155e52
Fix unregistering command loaders
youknowriad Apr 4, 2023
ca57c7d
Fix comment typos
youknowriad Apr 4, 2023
e238211
Remove leftovers
youknowriad Apr 4, 2023
ec903f5
Reset search on close
youknowriad Apr 4, 2023
172d6cf
Replace create with add
youknowriad Apr 6, 2023
8cb81b7
Use an experimental flag
youknowriad Apr 6, 2023
4d3beca
Fix empty pages and duplication in selected items
youknowriad Apr 6, 2023
55e94f7
Skip command center tests until the experimental flag is removed
youknowriad Apr 6, 2023
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
6 changes: 6 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,12 @@
"markdown_source": "../packages/browserslist-config/README.md",
"parent": "packages"
},
{
"title": "@wordpress/commands",
"slug": "packages-commands",
"markdown_source": "../packages/commands/README.md",
"parent": "packages"
},
{
"title": "@wordpress/components",
"slug": "packages-components",
Expand Down
11 changes: 10 additions & 1 deletion lib/client-assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -385,11 +385,20 @@ function gutenberg_register_packages_styles( $styles ) {
);
$styles->add_data( 'wp-list-reusable-block', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-commands',
gutenberg_url( 'build/commands/style.css' ),
array( 'wp-components' ),
$version
);
$styles->add_data( 'wp-commands', 'rtl', 'replace' );

gutenberg_override_style(
$styles,
'wp-edit-site',
gutenberg_url( 'build/edit-site/style.css' ),
array( 'wp-components', 'wp-block-editor', 'wp-editor', 'wp-edit-blocks' ),
array( 'wp-components', 'wp-block-editor', 'wp-editor', 'wp-edit-blocks', 'wp-commands' ),
$version
);
$styles->add_data( 'wp-edit-site', 'rtl', 'replace' );
Expand Down
3 changes: 3 additions & 0 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ function gutenberg_enable_experiments() {
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-color-randomizer', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableColorRandomizer = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-command-center', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-edit-site', 'window.__experimentalEnableCommandCenter = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-group-grid-variation', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalEnableGroupGridVariation = true', 'before' );
}
Expand Down
12 changes: 12 additions & 0 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,18 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-command-center',
__( 'Command center ', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Test the command center; Open it using cmd + k in the site editor.', 'gutenberg' ),
'id' => 'gutenberg-command-center',
)
);

add_settings_field(
'gutenberg-group-grid-variation',
__( 'Grid variation for Group block ', 'gutenberg' ),
Expand Down
Loading