-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Quick Edit: add Template field #66591
Merged
+305
−2
Merged
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
da0b766
Add DataFormProvider for fields
louwie17 538ef3e
Add dataform layout component and inline layout
louwie17 9cb2b26
Fix label in panel view
louwie17 c641723
Remove unneeded line
louwie17 a707275
Update `field` to FormField as well
louwie17 111e9f1
Merge branch 'update/dataform_combined_fields_api' of github.com:Word…
gigitux 93b8e53
QuickEdit: implement Template field
gigitux 9806534
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/templ…
gigitux ca3b59b
improve style
gigitux 61f9655
implement logic to reset to default template
gigitux 5a623fb
ensure that setting object is defined
gigitux f9b1eef
Add DataFormProvider for fields
louwie17 db4cbd6
Add dataform layout component and inline layout
louwie17 2d7ee1b
Fix label in panel view
louwie17 2ba1ffb
Remove unneeded line
louwie17 4384814
Update `field` to FormField as well
louwie17 8e4b0ef
Remove combinedFields usage
louwie17 152c875
Remove old use of View
louwie17 7cfb87d
Add label and move field type check to 'getFieldDefinition'
louwie17 a3768d8
Create types of each view
louwie17 3e5a584
Add sticky example
louwie17 58150ef
Update combined fields story
louwie17 b523f7f
Merge branch 'update/dataform_combined_fields_api' of github.com:Word…
gigitux 8698f0f
Add DataFormProvider for fields
louwie17 6a0598d
Add dataform layout component and inline layout
louwie17 bbae788
Fix label in panel view
louwie17 e17c228
Remove unneeded line
louwie17 05d7506
Update `field` to FormField as well
louwie17 15b0f11
Remove combinedFields usage
louwie17 a8d2462
Remove old use of View
louwie17 5967797
Add label and move field type check to 'getFieldDefinition'
louwie17 7eac0ab
Create types of each view
louwie17 a8f9e82
Add sticky example
louwie17 f9e86cb
Update combined fields story
louwie17 b05dbef
Fix change I missed during rebase
louwie17 8c15a9b
Remove old status_and_visibility field
louwie17 8ea852c
Rename fields to children for clarity
louwie17 0c67f64
Add children support to regular layout
louwie17 4cd314b
Replace inline with labelPosition
louwie17 ddf996a
Remove field type checking within dataform layouts
louwie17 f31a91c
Merge branch 'update/dataform_combined_fields_api' of github.com:Word…
gigitux 9021f79
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/templ…
gigitux d698e14
fix template field registration
gigitux 69396c0
restore not necessary changes
gigitux 7864b00
Merge branch 'trunk' of github.com:WordPress/gutenberg into add/templ…
gigitux 704ebe5
wrap DataForm component
gigitux 7cf2843
not use hook
gigitux cbb8bda
improve dependency
gigitux f891475
improve code style
gigitux 32e1b31
add issue
gigitux File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
improve dependency
commit cbb8bda871392548d2595f40568cc95eaf6854e4
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this here and not directly in the template field edit?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not asking to change it, just curious why
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to pass
settings
to this provider andusePatternSettings
depends on the edit site store:gutenberg/packages/edit-site/src/components/page-patterns/use-pattern-settings.js
Lines 15 to 20 in f891475
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, here are my thoughts on this. Not necessarily something to be done here though
We need to check what settings exactly are needed for these previews. It seems mostly about the list of available patterns (maybe there's other stuff but I'm not sure). IMO, these could be provided directly from
core-data
package selectors... without the "settings" object. This is a cleanup that needs to be done at some point. I mention some of this here https://make.wordpress.org/core/2024/09/12/gutenberg-development-practices-and-common-pitfalls/ (It's also kind of a similar change to what we did for defaultTemplates and template parts)I'm ok shipping this as is now but I feel like if someone uses the "template" field, it should just work without any hidden requirement.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I agree with you! I'm happy to:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome ❤️