-
Notifications
You must be signed in to change notification settings - Fork 970
fix(bulk-editor): resolve post type default template when SEO title/description is empty #23538
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
Merged
FAMarfuaty
merged 38 commits into
feature/bulk-editor-ph2
from
1370-bulk-editor-seo-titlemeta-description-show-empty-instead-of-the-resolved-replacement-variable-template
Aug 13, 2026
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
63f70c6
fix(bulk-editor): resolve post type default template when SEO title/d…
vraja-pro 7f52065
refactor: remove redundant constructor from Post_Meta_Posts_Collector…
vraja-pro a4ea615
feat(bulk-editor): extend default template resolution to social title…
vraja-pro edd499a
fix(bulk-editor): gate social title/description resolution on OpenGra…
vraja-pro 373b5ff
refactor: move replacement variables slice to shared admin folder
vraja-pro 8f55ea4
fix: add the replacement variables to the window object
vraja-pro aa59cef
fix: returns the temple for the replacement variable use
vraja-pro 0d9550d
tests: for bulk editor integration the replacement variable temples
vraja-pro e1b5673
fix: add shared replacement variable slice
vraja-pro 17aedd1
fix: add replacement variable type to fields set
vraja-pro 459310a
feat(bulk-editor): add replacement variable editor with styled sugges…
vraja-pro 4715785
fix: hide label for replacement variable fields
vraja-pro e7f2110
fix tests for bulk editor
vraja-pro cd839ce
tests: fix console warnings
vraja-pro c1cc52f
tests: fix cs
vraja-pro bd88b48
fix(bulk-editor): read social title/description templates from option…
vraja-pro 89b05d8
docs(bulk-editor): clarify Default_Template_Resolver class docblock
vraja-pro 6afa8a9
refactor(bulk-editor): extract private resolve() helper in Default_Te…
vraja-pro 7d98239
fix(bulk-editor): split editable field from display fallback to preve…
vraja-pro 8cc785f
fix(bulk-editor): exclude template-defaulted posts from needs-improve…
vraja-pro c91aed3
fix(bulk-editor): remove unreachable ?? fallback in build_needs_impro…
vraja-pro 9641450
tests(bulk-editor): add missing needs-improvement and null-post coverage
vraja-pro 0be9715
tests(bulk-editor): tighten post-meta collector resolver assertions a…
vraja-pro 86123f9
tests: fix cs
vraja-pro 63c9d51
fix(bulk-editor): return stored social title/description before OpenG…
vraja-pro 280a131
fix(bulk-editor): complexity and cleanup of table cell components
vraja-pro d3bba77
tests(bulk editor): fix my yoast connection tests
vraja-pro b48cd8a
Merge branch 'feature/bulk-editor-ph2' into 1370-bulk-editor-seo-titl…
vraja-pro e294378
Merge branch 'feature/bulk-editor-ph2' into 1370-bulk-editor-seo-titl…
vraja-pro 95442eb
test: fix test after feature branch merge
vraja-pro 2ded23b
tests: fix tests for bulk editor
vraja-pro 47c404b
Merge remote-tracking branch 'origin/feature/bulk-editor-ph2' into 13…
vraja-pro 714f762
fix: tests for bulk editor integration
vraja-pro d3ecffe
fix: fix php cs
vraja-pro 873333f
Merge remote-tracking branch 'origin/feature/bulk-editor-ph2' into 13…
vraja-pro 65e4199
fix(bulk-editor): show fallback template as pills when opening edit f…
vraja-pro 0695fc4
fix(bulk-editor): make ReplacementVariableEditor the default cell bra…
vraja-pro 0fd7bfb
fix(bulk-editor): seed store with first content type so replacement v…
vraja-pro 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
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
44 changes: 44 additions & 0 deletions
44
packages/js/src/bulk-editor/components/table/preview-editable-field-cell.js
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| import { Table } from "@yoast/ui-library"; | ||
| import { ReplacementVariableEditorStandalone } from "@yoast/replacement-variable-editor"; | ||
| import { noop } from "lodash"; | ||
| import { sprintf, __ } from "@wordpress/i18n"; | ||
| import { FOCUS_KEYPHRASE_KEY } from "../../constants"; | ||
|
|
||
| /** | ||
| * | ||
| * @param {object} props The component props. | ||
| * @param {object} props.field The field to render. | ||
| * @param {object} props.item The content item to render. | ||
| * @param {Array} props.replacementVariables The replacement variables for this content type. | ||
| * @param {Array} props.recommendedReplacementVariables The recommended replacement variables for this content type. | ||
| * @returns {JSX.Element} The cell. | ||
| */ | ||
| export const PreviewEditableFieldCell = ( { field, item, replacementVariables, recommendedReplacementVariables } ) => { | ||
| if ( field.key === FOCUS_KEYPHRASE_KEY ) { | ||
| return ( | ||
| <Table.Cell key={ field.key } className="yst-bulk-editor-cell-value"> | ||
| { item[ field.key ] } | ||
| </Table.Cell> | ||
| ); | ||
| } | ||
|
|
||
| return ( | ||
| <Table.Cell key={ field.key } className="yst-bulk-editor-cell-value"> | ||
| <span id={ `bulk-editor-preview-${ field.key }-${ item.id }` } className="yst-sr-only"> | ||
| { sprintf( | ||
| /* translators: %1$s expands to the field label, %2$s to the content item title. */ | ||
| __( "%1$s for %2$s", "wordpress-seo" ), field.label, item.title ) } | ||
| </span> | ||
| <ReplacementVariableEditorStandalone | ||
| content={ item[ field.key ] || item[ `${ field.key }Fallback` ] || "" } | ||
| onChange={ noop } | ||
| type={ field.type } | ||
| isDisabled={ true } | ||
| replacementVariables={ replacementVariables } | ||
| recommendedReplacementVariables={ recommendedReplacementVariables } | ||
| ariaLabelledBy={ `bulk-editor-preview-${ field.key }-${ item.id }` } | ||
| fieldId={ `bulk-editor-${ field.key }-${ item.id }` } | ||
| /> | ||
| </Table.Cell> | ||
| ); | ||
| }; | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.