-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
improve documentation for fields package #67580
Conversation
Flaky tests detected in f55d10c. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12161690957
|
@@ -14,9 +14,11 @@ const templateField: Field< BasePost > = { | |||
id: 'template', | |||
type: 'text', | |||
label: __( 'Template' ), | |||
getValue: ( { item } ) => item.template, |
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.
This is not necessary. I removed it. #66591 (comment)
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@@ -1,3 +0,0 @@ | |||
const duplicatePost = undefined; | |||
|
|||
export default duplicatePost; |
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 do we delete this file? Is it not used by mobile (I see it's named *.native.*
)?
@@ -37,8 +37,8 @@ const duplicatePost: Action< BasePost > = { | |||
const [ item, setItem ] = useState< BasePost >( { | |||
...items[ 0 ], | |||
title: sprintf( | |||
/* translators: %s: Existing template title */ |
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.
Nice catch, thanks! We actually hide this action for templates.
@@ -1,3 +0,0 @@ | |||
const exportPattern = undefined; | |||
|
|||
export default exportPattern; |
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.
Same as above: isn't this used by mobile?
Thanks for taking the time :) I'd approve but I'd like to double-check why we're removing the |
These two actions exports Also, mobile build doesn't fail, so I think that these changes are fine. |
They actually don't run :) There's an issue with the runner mobile folks are looking at #67586 |
@@ -1,13 +1,10 @@ | |||
export { default as viewPost } from './view-post'; | |||
export { default as reorderPage } from './reorder-page'; | |||
export { default as reorderPageNative } from './reorder-page.native'; |
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.
@dcalhoun sorry to ping you so many times lately :)
Is it ok to remove the native actions here? They export undefined
(reorder), export pattern, duplicate post, so we wonder why are they necessary?
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.
Mostly to make unit tests pass. If nothing breaks, it's ok to remove IMO
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'll concede to @youknowriad's knowledge on this one. It appears the addition occurred in 94d1d2b to repair unit test failures. I agree it is safe to remove if unit tests continue passing.
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 for the confirmation to both of you 🙇
Thanks for the feedback and review folks! 🙇 |
What?
This pull request includes documentation updates for various actions and fields in the
packages/fields
package. Also, remove unused native files.I think that there is still some space for improvements (especially on action names) but we can revisit later.