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 bindings: UI for connecting bindings #62880

Merged
merged 81 commits into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
ae6afbc
Initial experiment
cbravobernal Jul 25, 2024
5efa047
First experiment of raw custom field for P
cbravobernal Jul 25, 2024
0a1b636
use selectors
cbravobernal Jul 25, 2024
1f9900e
Use lists
cbravobernal Jul 25, 2024
8128c0f
Remove
cbravobernal Jul 25, 2024
4eac7dc
Fix removing
cbravobernal Jul 25, 2024
db906bd
Add new ui
cbravobernal Jul 25, 2024
e357882
Update attributes
cbravobernal Jul 25, 2024
1a18fb6
Check binded number
cbravobernal Jul 25, 2024
39b2efa
Check binded number
cbravobernal Jul 25, 2024
8484002
Move bindings panel to editor
cbravobernal Jul 25, 2024
88759d3
Move code
cbravobernal Jul 25, 2024
aa626fe
Move to utils
cbravobernal Jul 25, 2024
be20d24
Use tools panel for connections
cbravobernal Jul 25, 2024
5343678
Add reset
cbravobernal Jul 25, 2024
58054eb
Add bordered items
cbravobernal Jul 25, 2024
8e8a122
Fix some styles
cbravobernal Jul 25, 2024
683abfb
Move utils back to component
cbravobernal Jul 25, 2024
d3ba547
Remove not needed comments
cbravobernal Jul 25, 2024
3b703f7
Some refactor
cbravobernal Jul 25, 2024
f0cd95a
Prevent UI with no meta data
cbravobernal Jul 25, 2024
3bc6072
Add helper
cbravobernal Jul 25, 2024
da6845e
Add helper
cbravobernal Jul 25, 2024
28ceffe
Add simple e2e
cbravobernal Jul 25, 2024
a90d9da
Add one more menuitem to the list
cbravobernal Jul 25, 2024
2df3ef3
Update e2e tests now a new tab appears by default
cbravobernal Jul 25, 2024
6be1849
Another test
cbravobernal Jul 25, 2024
0380ee8
Add e2e to check paragraph
cbravobernal Jul 25, 2024
fe88757
Remove not needed experiment
cbravobernal Jul 25, 2024
41691df
Remove extra blank spaces
cbravobernal Jul 25, 2024
4f097d0
update e2e
cbravobernal Jul 25, 2024
6e04036
Keep updating e2e
cbravobernal Jul 25, 2024
51904df
Remove css to the minimum
cbravobernal Jul 25, 2024
28ba254
Less CSS
cbravobernal Jul 25, 2024
25051fc
Abstract fields and move hooks back to block-editor
SantosGuillamot Jul 25, 2024
981367a
Return null when no bindableAttributes
SantosGuillamot Jul 25, 2024
b1aaa7a
Add checks to registration
SantosGuillamot Jul 25, 2024
3d9182e
Fix when the list of fields is empty
SantosGuillamot Jul 25, 2024
ff7c393
Properly filter footnotes
SantosGuillamot Jul 25, 2024
f2469c9
Update tests
cbravobernal Jul 25, 2024
26b5988
Remove classes from component
cbravobernal Jul 25, 2024
8798953
Remove all components mention
cbravobernal Jul 25, 2024
27639ba
Add ignore console error
cbravobernal Jul 25, 2024
f0a0680
Add icons and fix styling
cbravobernal Jul 25, 2024
42693a4
Remove not needed as p
cbravobernal Jul 25, 2024
b7efec2
Remove icon
cbravobernal Jul 25, 2024
11b2a4b
Remove icons, show label only if there are more than one source
cbravobernal Jul 25, 2024
58eb28c
Simplify style names
cbravobernal Jul 25, 2024
d17b593
Adapt design
cbravobernal Jul 25, 2024
dfeba8b
Use `ItemGroup` inside `ToolsPanel`
SantosGuillamot Jul 25, 2024
9e67785
Use `Text` component
SantosGuillamot Jul 25, 2024
b19d01e
Use `getBlockBindingsSources` function
SantosGuillamot Jul 25, 2024
fb4a51b
Revert change to popover max-width
SantosGuillamot Jul 25, 2024
6439308
Remove not used classes
SantosGuillamot Jul 25, 2024
9f277b3
Remove unused props
SantosGuillamot Jul 25, 2024
0beff34
Add fallbacks for undefined keys
SantosGuillamot Jul 25, 2024
8e6ad14
Try: Use `DropdownMenuV2`
SantosGuillamot Jul 25, 2024
c9ea7c7
Add button to remove the binding
SantosGuillamot Jul 25, 2024
436c97f
Reduce truncate lines to 1
SantosGuillamot Jul 25, 2024
9896dbf
Fix labels when multiple sources
SantosGuillamot Jul 25, 2024
752d7e0
Try: Add readOnly support when fields are undefined
SantosGuillamot Jul 25, 2024
feb890d
Use RadioItem instead of Checkbox
SantosGuillamot Jul 25, 2024
8bb9136
Remove "Clear" button
SantosGuillamot Jul 25, 2024
22e1020
Remove clear button CSS
SantosGuillamot Jul 25, 2024
cabd3d8
Don't use DropdownItems outside Dropdown
SantosGuillamot Jul 25, 2024
b814725
Move separator inside menu group
SantosGuillamot Jul 25, 2024
591bd72
Use onChange to better align with radio behavior
artemiomorales Jul 25, 2024
8ffc7f4
Add aria-hiddden to group heading
artemiomorales Jul 25, 2024
13cd09e
Update tests
artemiomorales Jul 25, 2024
3a086ab
Reduce custom styles
SantosGuillamot Jul 25, 2024
12c9088
Properly add block context after latest changes
SantosGuillamot Jul 25, 2024
bc05788
Adapt tests
SantosGuillamot Jul 25, 2024
a9b347f
Remove `numberOfLines` prop
SantosGuillamot Jul 25, 2024
839b37a
Remove unused class
SantosGuillamot Jul 25, 2024
01fcf7d
Fix mobile popover
SantosGuillamot Jul 25, 2024
d14d50f
Move Separator outside of `DropdownMenuGroup`
SantosGuillamot Jul 25, 2024
2dff252
Remove empty sources from `fieldsList`
SantosGuillamot Jul 29, 2024
50f6f1e
Move UI under experimental flag
SantosGuillamot Jul 30, 2024
3bf117c
Adapt e2e changes to experimental flag
SantosGuillamot Jul 30, 2024
6fb7d89
Remove missing clicks in tests
SantosGuillamot Jul 30, 2024
d091c34
Adapt another test
SantosGuillamot Jul 30, 2024
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
3 changes: 3 additions & 0 deletions lib/experimental/editor-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ function gutenberg_enable_experiments() {
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-quick-edit-dataviews', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalQuickEditDataViews = true', 'before' );
}
if ( $gutenberg_experiments && array_key_exists( 'gutenberg-block-bindings-ui', $gutenberg_experiments ) ) {
wp_add_inline_script( 'wp-block-editor', 'window.__experimentalBlockBindingsUI = true', 'before' );
}
}

add_action( 'admin_init', 'gutenberg_enable_experiments' );
Expand Down
12 changes: 12 additions & 0 deletions lib/experiments-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,18 @@ function gutenberg_initialize_experiments_settings() {
)
);

add_settings_field(
'gutenberg-block-bindings-ui',
__( 'UI to create block bindings', 'gutenberg' ),
'gutenberg_display_experiment_field',
'gutenberg-experiments',
'gutenberg_experiments_section',
array(
'label' => __( 'Add UI to create and update block bindings in block inspector controls.', 'gutenberg' ),
'id' => 'gutenberg-block-bindings-ui',
)
);

register_setting(
'gutenberg-experiments',
'gutenberg-experiments'
Expand Down
Loading
Loading