-
Notifications
You must be signed in to change notification settings - Fork 882
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
21141 decouple hidden fields for metabox #21161
Merged
igorschoester
merged 352 commits into
feature/decouple-hidden-fields
from
21141-decouple-hidden-fields-for-metabox
May 16, 2024
Merged
Changes from 1 commit
Commits
Show all changes
352 commits
Select commit
Hold shift + click to select a range
ca254e2
add defensive coding to ensure string
vraja-pro 92b2b95
moves constants to shared-admin folder
vraja-pro 73c7e2b
rename constants for stores name
vraja-pro f763e60
rename constant for post metadata keys
vraja-pro 40606a4
fix constants and added defensive coding for primary term id function
vraja-pro febbd59
fix store name and import
vraja-pro 3c4d040
use defaultTo
vraja-pro d33f6c7
Add defensive coding to analysis scores
vraja-pro c1858ee
add defensive coding to reading time
vraja-pro 7a766a6
add defensive coding and move reading time to analysis file
vraja-pro 15bd734
add defensive coding to primary term id
vraja-pro d53069a
Add defensive coding to opengraph fields
vraja-pro ffafab7
Add defensive coding to schema fields
vraja-pro 4ce2822
add defensive coding for snippet editor fields
vraja-pro 011378d
add defensive coding to twitter fields
vraja-pro a0b6e38
fix js docs comments
vraja-pro 410dae9
fix type for hidden fields sync function
vraja-pro 8a13f6c
fix type comment
vraja-pro 4236a9f
fix array type comments
vraja-pro 0b30a3c
fix array type comment
vraja-pro d6b76f2
remove to string rom twitter id, handled in twitter fields store file
vraja-pro de68a22
Listen to the original field like in classic editor, and not the hidd…
vraja-pro 6cca4f4
remove check for metabox container and check for metadata in window o…
vraja-pro a3d34df
restore side effect with defensive coding
vraja-pro 6991c8b
cleanup sync of primary category
vraja-pro 36726de
no need for estimate reading time class and conditional. the field is…
vraja-pro 5849a01
simplify adding primery term to be registered as metadata
vraja-pro 30b84dc
we want to listen to the metadata even when there is no value
vraja-pro 4ff3efc
if there is no primary term, return an empty string
vraja-pro 50c94cc
zero and empty string are saved the same, with empty string we avoid …
vraja-pro 0d3234d
cleanup estimate reading time tests
vraja-pro 4b70f09
wordproof metadata is not registered by that filter
vraja-pro ee282b9
register metadata
vraja-pro 6731e7d
Hidden is not translation
vraja-pro 69579db
php fix-cs
vraja-pro 9c5dede
remove tests from removed class
vraja-pro bb67ad2
no need to trigger change on the hidden field.
vraja-pro b52f05c
initial editor store the same way in elementor, added also comments
vraja-pro 1912305
used WPSEO_Taxonomy_Meta for getting term meta
vraja-pro b19aed0
// Score is updated to the hidden field though the sync function.
vraja-pro 47f6a81
register metadata wordproof in an initialiser
vraja-pro e43b3df
get term metadata with wpseo taxonomy meta class
vraja-pro 442a63d
restore to match the hidden fields
vraja-pro 8757d06
The default is true in WPSEO_Option_Social
vraja-pro bab7f5d
reverting name change
vraja-pro fc46bdb
Check if hidden fields are present before adding syncing
vraja-pro 65115e8
restore naming
vraja-pro cc2cd14
Add initial states for social appearance
vraja-pro 21c2338
adds initial state to the elementor editor
vraja-pro a6d9f5f
remove load from twitter reducer
vraja-pro 4ccf7fe
add sync to term edit
vraja-pro 5d79d63
add support for elementor
vraja-pro 246bf34
cleanup tests from old code
vraja-pro 7da3833
cleanup old code from tests
vraja-pro 5aa0b01
cleanup tests
vraja-pro f02f904
Add tests to social appearance methods to get values from store to be…
vraja-pro 49d5f7b
Check the right values are used for sync
vraja-pro 026696e
fix tests comments
vraja-pro 9815397
fix advanced settings loading and add tests
vraja-pro 25fa048
fix wordproof conditional
vraja-pro 7896507
add initial state for analysis fields
vraja-pro 18328d7
no need for onload function when we have initial state
vraja-pro bea6f2a
Added tests to analysisFieldsStore.js
vraja-pro 9ece15f
fix tests
vraja-pro 78ffe67
rename initial state folder and fixed prepareValue
vraja-pro dae0866
seo analysis is being calculated onload
vraja-pro 822b5ec
remove analysis from initial state
vraja-pro 694cd87
add initial state to primary term
vraja-pro 5dd5f3b
add tests to getPrimaryTerms and refactor getPrimaryTerms
vraja-pro 0239878
schema initial state and cleanup
vraja-pro 8b1e377
Add schema to test cases
vraja-pro f6ba85f
reduce wait time in sync
vraja-pro d32d6bc
refreshing app through the subscribe for the focus keyphrase and snip…
vraja-pro 2fd0808
added tests to functions in create-watcher.js
vraja-pro aec9a62
Add tests to the hidden fields sync
vraja-pro 0c91389
Hide type null from rest
vraja-pro 3fa3948
refactor for better reading
vraja-pro 957322d
Merge remote-tracking branch 'origin/trunk' into 21141-decouple-hidde…
vraja-pro b649c75
Merge remote-tracking branch 'origin/trunk' into 21141-decouple-hidde…
vraja-pro 119f47c
remove values from hidden fields. That would be populated by the hidd…
vraja-pro d562bcd
Check also for hidden fields in elementor
vraja-pro a6aeac1
check for hidden fields in default before check for elementor
vraja-pro b8eec47
Add auth call back to metadata
vraja-pro a8b8cae
hidden fields would be synced automatically
vraja-pro e4031e8
check if we shouls show article type input
vraja-pro 147ebe3
php fix cs
vraja-pro b683ff7
now that we are registering the metadata, we are using type check and…
vraja-pro d1e5d94
php fix-cs
vraja-pro dcd8fd5
php fix cs
vraja-pro 4ecf1aa
fix tests for taxonomy fields presenter
vraja-pro 77288be
Update packages/js/src/elementor.js
vraja-pro edcb22d
remove default because we are not using it
vraja-pro 728d7df
change the export and import of create watcher
vraja-pro ec176bd
Merge branch '21141-decouple-hidden-fields-for-metabox' of https://gi…
vraja-pro c71ffe7
fix js tests for hidden fields sync
vraja-pro dd96a06
remove unused prop types checks
vraja-pro 2ee2774
fix create watcher import
vraja-pro 4821f1b
fix Jsdoc comment
vraja-pro 9cb62a9
fix import of create watcher
vraja-pro 1d93ca4
cleanup tests
vraja-pro 9cc70e1
restore social option fallback
vraja-pro 008daa3
fix php type comment
vraja-pro e53fa38
rename method
vraja-pro e919e2e
fix defensive coding
vraja-pro 57bedd1
Merge remote-tracking branch 'origin/trunk' into 21141-decouple-hidde…
vraja-pro 11129a9
check we have meta in current post
vraja-pro 24580dc
I will use createCollectorFromObject in the addons
vraja-pro 809affb
refactor check for hidden fields
vraja-pro 7c03aee
add_extra_wpseo_meta_fields should be used in an initialiser
vraja-pro 8e91286
fix mapping of metadata keys
vraja-pro 8eaa0de
hide metadata from users that don't have edit post capabilities
vraja-pro 4dab37a
php fix-cs
vraja-pro 4b7d119
Merge remote-tracking branch 'origin/trunk' into 21141-decouple-hidde…
vraja-pro 704dbad
decreased cs threshold
vraja-pro cefc54f
fix prefix for terms
vraja-pro 9e55cf9
fix js tests
vraja-pro 76f8292
replace prepare callback with schema context
vraja-pro 26cde70
schema defaults are not metadata. Moved them to a separate window obj…
vraja-pro 9b0e57c
remove variable
vraja-pro 935a988
moving schema defaults to post metabox formatter
vraja-pro ba45ea0
Merge branch 'trunk' into 21141-decouple-hidden-fields-for-metabox
vraja-pro 689ad1c
rename constants
vraja-pro f904961
remove default to since it is done in the selectors
vraja-pro 54ef032
refactor hidden fields sync and constants
vraja-pro eda57cd
refactor postId selector and added a selector if it's a post
vraja-pro fd45e25
rename selector import
vraja-pro 7011d8e
Update admin/class-primary-term-admin.php
vraja-pro ad58981
fix param comment
vraja-pro 9c6f340
fix param comment
vraja-pro e7af60e
fix comments for return type
vraja-pro f7857b8
removed the value from the primary taxonomy field, would be populated…
vraja-pro adac20b
Merge remote-tracking branch 'origin/trunk' into 21141-decouple-hidde…
vraja-pro 6c23bd7
cleanup duplication of code
vraja-pro 81ff1b4
primary taxonomies are already part of the window object
vraja-pro 62864b4
get primary terms from the right window object and add get check
vraja-pro c11a433
changed post reducer
vraja-pro cd9be89
fix primary term initial state default
vraja-pro 8d35eca
restore selectors
vraja-pro b793070
convert to string the taxonomy id
vraja-pro 19ac603
Update inc/class-wpseo-meta.php
vraja-pro 9cc93b2
changing visibility to private
vraja-pro bf9e8d5
fix param type comment
vraja-pro e99cb9c
php fix-cs
vraja-pro 4370e8e
php cs fix
vraja-pro 6d0dc01
php fix cs
vraja-pro 090bab8
fix php cs threshold
vraja-pro 68c7346
fix js tests
vraja-pro ae39ad4
cleanup side effect from primary taxonomy picker
vraja-pro 1ddd210
add the comment from the post scrapper
vraja-pro 9e9a10c
add sync to meta description and title
vraja-pro ff08611
removed "yoast_wpseo_metadesc", because it's hidden field. I added a …
vraja-pro 63830a6
add sanitization for primary terms, wordproof time stamp and estimate…
vraja-pro 1bc3a1a
add sanitization to other values that are numerical
vraja-pro f7f246e
add metadata group class
vraja-pro 71f977f
update thresholds
vraja-pro af660e2
no other logic should be in the construct
vraja-pro 4f09461
removed class without tests
vraja-pro 78901b6
fix thresholds
vraja-pro e5f3536
use metadata groups class in elementor
vraja-pro 46b8997
refined the sanitisation of id's to be more precise
vraja-pro f33dcd3
refactor mapping and added initial state
vraja-pro 438c89c
fix tests and primary taxonomy getters method
vraja-pro 85c0cdc
fix js eslint errors
vraja-pro 67437d9
fix js eslint
vraja-pro 6e1afb0
eslint fix cs
vraja-pro f17786d
fix php test
vraja-pro 6bf99e2
fix eslint
vraja-pro 0732a1c
fix php cs
vraja-pro dbb1985
refactor transforming values before comparing
vraja-pro 0638706
restore primary term to avoid trigger of unsaved values
vraja-pro 9fd2b02
fix comparing values in blockeditor sync
vraja-pro eaf30bf
Add defaults
vraja-pro 5a5f4b3
add slug to window object and initial state
vraja-pro 730bd9d
make sure post ID is the same in post and term
vraja-pro 7321f50
change type in the method comment
vraja-pro 0f73989
restore integer primary id after adding case for sanitazing meta data…
vraja-pro 41d6c67
Update admin/class-primary-term-admin.php
vraja-pro 7c5ba0f
Update admin/class-primary-term-admin.php
vraja-pro 9447178
Update admin/class-primary-term-admin.php
vraja-pro 0f4a61b
Update admin/class-primary-term-admin.php
vraja-pro 42eb185
Update admin/class-primary-term-admin.php
vraja-pro 722e6ca
fix type annotation
vraja-pro e841d98
Update inc/class-wpseo-primary-term.php
vraja-pro 8cfe4f8
restore the array type annotation to reduce testing scope and typo mi…
vraja-pro a554778
fix spaces
vraja-pro 83a99ea
use di container
vraja-pro cd85330
add comment for entity type
vraja-pro 0aa4c63
fix slug initial state
vraja-pro b054061
bail when getData is not a function, defensive coding
vraja-pro c80b7bb
fix sync of slug to hidden fields
vraja-pro 057ec64
restore the usage of snippet editor slug selector
vraja-pro b12a2c4
sync seo description in term editor
vraja-pro a6f04b1
fix snippet editor slug in term editor
vraja-pro 3d195c6
remove import
vraja-pro 2d63760
remove complexity disable comment
vraja-pro 3564749
I removed the slug case because sync is taken take of by the hidden f…
vraja-pro 513f641
add space
vraja-pro c727844
Update packages/js/src/helpers/fields/blockEditorSync.js
vraja-pro 27ae693
Update packages/js/src/helpers/fields/hiddenFieldsSync.js
vraja-pro 507b9f9
remove the function check
vraja-pro 88821e0
don't show in rest if type is null
vraja-pro 82f243a
rename show article type action and property in the store
vraja-pro 1a59d75
check get in a function in store
vraja-pro 8adfbb1
more processes to the create updater to be used once
vraja-pro 20d1d45
fix callback function
vraja-pro ab7e918
add taxonomies from the store and use it
vraja-pro 3789c15
refactor transform data
vraja-pro 3b0a2ae
Add comment for IDE
vraja-pro 6a1f9e5
refactor get primary taxonomies and ad selector
vraja-pro 2b721c1
refactor post actions and reducer
vraja-pro 78d2331
change initial state import
vraja-pro e2db89a
fix indentation
vraja-pro 5740f32
prepare seo and social appearance with replacement variables
vraja-pro 8da5062
use metadata groups class via constructor
vraja-pro af8b26d
change callback function to static
vraja-pro c4faf62
check for metadata from getEditedEntityRecord
vraja-pro 3e14aa1
use constants for core store
vraja-pro 1ddbfa9
restore thresholds
vraja-pro dfab9c8
fix primary terms tests
vraja-pro 9362e22
deprecate estimate reading time classes
vraja-pro 7f1cd89
fix object annotation
vraja-pro 14a2f7e
execute getCurrentPost in the return
vraja-pro ee04d6c
fix transform meta value
vraja-pro dbb6c8d
fix php cs
vraja-pro dbb579f
restore and deprecate estimate reading time
vraja-pro 7596d20
deprecate estimate reading time
vraja-pro 09f3a93
restore thresholds and remove duplicate conditional
vraja-pro fe58c16
remove estimate reading time tests
vraja-pro 84bdbc8
remove new estimate reading time
vraja-pro 9019697
update cs thresholds
vraja-pro 2dd6952
restore postId in the store
vraja-pro 2e13f10
no need to transform the data form the core editor store
vraja-pro 6ab98a2
dont transform if there is no field and use existing action is it's a…
vraja-pro a1b63b0
update tests
vraja-pro cd8b98b
fix transform for social and google title and description
vraja-pro e40ef9d
fix comment in transform method
vraja-pro e6b42ad
fix eslint
vraja-pro 329f15f
fix term meta description getter
vraja-pro ac6a4c9
Remove conditional to avoid errors
vraja-pro e1de48f
restore estimated reading time to the wpseo meta fields
vraja-pro 4116db5
refactor comments and naming for social title and description selectors
vraja-pro 1ec0763
fix js docs
vraja-pro c5f7b29
fix annotation
vraja-pro fcb7516
Merge branch 'feature/decouple-hidden-fields' into 21141-decouple-hid…
vraja-pro 9f286df
fix thresholds after merge
vraja-pro 27257e6
fix transform meta for image ids
vraja-pro 9e5cbd0
fix typo
vraja-pro a80fb3d
fix no index for term
vraja-pro 9da1bcc
add leading to the sync
vraja-pro 76702b7
fix seo score getter
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
add taxonomies from the store and use it
- Loading branch information
commit ab7e9180f6d75e02a4c1f18d3337e9d8e9977898
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { get } from "lodash"; | ||
|
||
export const postInitialState = { | ||
isPost: get( window, "wpseoScriptData.metabox.entity.entityType", false ) === "post", | ||
id: Number( get( window, "wpseoScriptData.metabox.entity.id", null ) ), | ||
type: get( window, "wpseoScriptData.metabox.entity.type", "" ), | ||
status: get( window, "wpseoScriptData.metabox.entity.status", "" ), | ||
taxonomies: get( window, "wpseoPrimaryCategoryL10n.taxonomies", {} ), | ||
}; |
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 part of a post? Seems to me this is part of the primary terms functionality