Add optional chaining in case taxonomy visibility is not defined#40532
Merged
glendaviesnz merged 2 commits intotrunkfrom Apr 25, 2022
Merged
Add optional chaining in case taxonomy visibility is not defined#40532glendaviesnz merged 2 commits intotrunkfrom
glendaviesnz merged 2 commits intotrunkfrom
Conversation
|
Size Change: +127 B (0%) Total Size: 1.23 MB
ℹ️ View Unchanged
|
Member
|
This looks good to me and would be great to get into 6.0. Assuming no concerns, would love to get an official approval and merge on this as soon as possible. |
youknowriad
approved these changes
Apr 25, 2022
Contributor
youknowriad
left a comment
There was a problem hiding this comment.
Maybe a comment to avoid an accidental removal. This seems harmless anyway.
Contributor
|
This was backported to wp/6.0 branch to be included in WordPress 6.0 Beta 3 today: d7f1f9e |
scruffian
pushed a commit
that referenced
this pull request
May 9, 2022
Root vars shouldn't apply to block global styles Fix issue with shorthand padding on server side. Temp fix for file path error Fix site editor top padding not updating Support shorthand properties in site editor. Fix full widths in the post editor Check selector inside function. Fix kebab-casing of CSS variables. Fix borked merge conflict solving Move post editor full width styles to edit-post package. Set default padding value to 0. Update test string. Fix PHP unit tests Fix PHP lint Fix failing PHP tests. Use block gap variable as default root padding value. Fix linting errors. Add opt-in setting via package.json Generate correct block editor styles Fix tests and add prop to core theme.json Fix unit tests properly this time Improve the logic for warnings for Post Comments Form placeholder (#40563) * Improve the warning for Comments Form placeholder * Fix typo on showPlaceholder variable name Co-authored-by: Luis Herranz <luisherranz@gmail.com> Add optional chaining in case taxonomy visibility is not defined (#40532) Co-authored-by: Glen Davies <glen.davies@a8c.com> Merge remote-tracking branch 'origin/trunk' into try/root-padding-fix Added missing doc comment for parameter "$use_root_vars" Add alignments rules for blocks within post content Remove default padding match alignment rules to those used in blockbase move root padding rules to a new method revert unconnected change revert spacing change add docblock for new method remove file' fix merge mess formatting
scruffian
pushed a commit
that referenced
this pull request
May 11, 2022
Root vars shouldn't apply to block global styles Fix issue with shorthand padding on server side. Temp fix for file path error Fix site editor top padding not updating Support shorthand properties in site editor. Fix full widths in the post editor Check selector inside function. Fix kebab-casing of CSS variables. Fix borked merge conflict solving Move post editor full width styles to edit-post package. Set default padding value to 0. Update test string. Fix PHP unit tests Fix PHP lint Fix failing PHP tests. Use block gap variable as default root padding value. Fix linting errors. Add opt-in setting via package.json Generate correct block editor styles Fix tests and add prop to core theme.json Fix unit tests properly this time Improve the logic for warnings for Post Comments Form placeholder (#40563) * Improve the warning for Comments Form placeholder * Fix typo on showPlaceholder variable name Co-authored-by: Luis Herranz <luisherranz@gmail.com> Add optional chaining in case taxonomy visibility is not defined (#40532) Co-authored-by: Glen Davies <glen.davies@a8c.com> Merge remote-tracking branch 'origin/trunk' into try/root-padding-fix Added missing doc comment for parameter "$use_root_vars" Add alignments rules for blocks within post content Remove default padding match alignment rules to those used in blockbase move root padding rules to a new method revert unconnected change revert spacing change add docblock for new method remove file' fix merge mess formatting fix merge mess fix alignment append to ruleset fix issue in site editor match the styles for the site editor to those used in the front end formatting change move new code to 6.1 compat files fix linter
scruffian
pushed a commit
that referenced
this pull request
May 16, 2022
Root vars shouldn't apply to block global styles Fix issue with shorthand padding on server side. Temp fix for file path error Fix site editor top padding not updating Support shorthand properties in site editor. Fix full widths in the post editor Check selector inside function. Fix kebab-casing of CSS variables. Fix borked merge conflict solving Move post editor full width styles to edit-post package. Set default padding value to 0. Update test string. Fix PHP unit tests Fix PHP lint Fix failing PHP tests. Use block gap variable as default root padding value. Fix linting errors. Add opt-in setting via package.json Generate correct block editor styles Fix tests and add prop to core theme.json Fix unit tests properly this time Improve the logic for warnings for Post Comments Form placeholder (#40563) * Improve the warning for Comments Form placeholder * Fix typo on showPlaceholder variable name Co-authored-by: Luis Herranz <luisherranz@gmail.com> Add optional chaining in case taxonomy visibility is not defined (#40532) Co-authored-by: Glen Davies <glen.davies@a8c.com> Merge remote-tracking branch 'origin/trunk' into try/root-padding-fix Added missing doc comment for parameter "$use_root_vars" Add alignments rules for blocks within post content Remove default padding match alignment rules to those used in blockbase move root padding rules to a new method revert unconnected change revert spacing change add docblock for new method remove file' fix merge mess formatting fix merge mess fix alignment append to ruleset fix issue in site editor match the styles for the site editor to those used in the front end formatting change move new code to 6.1 compat files fix linter
scruffian
pushed a commit
that referenced
this pull request
May 18, 2022
Root vars shouldn't apply to block global styles Fix issue with shorthand padding on server side. Temp fix for file path error Fix site editor top padding not updating Support shorthand properties in site editor. Fix full widths in the post editor Check selector inside function. Fix kebab-casing of CSS variables. Fix borked merge conflict solving Move post editor full width styles to edit-post package. Set default padding value to 0. Update test string. Fix PHP unit tests Fix PHP lint Fix failing PHP tests. Use block gap variable as default root padding value. Fix linting errors. Add opt-in setting via package.json Generate correct block editor styles Fix tests and add prop to core theme.json Fix unit tests properly this time Improve the logic for warnings for Post Comments Form placeholder (#40563) * Improve the warning for Comments Form placeholder * Fix typo on showPlaceholder variable name Co-authored-by: Luis Herranz <luisherranz@gmail.com> Add optional chaining in case taxonomy visibility is not defined (#40532) Co-authored-by: Glen Davies <glen.davies@a8c.com> Merge remote-tracking branch 'origin/trunk' into try/root-padding-fix Added missing doc comment for parameter "$use_root_vars" Add alignments rules for blocks within post content Remove default padding match alignment rules to those used in blockbase move root padding rules to a new method revert unconnected change revert spacing change add docblock for new method remove file' fix merge mess formatting fix merge mess fix alignment append to ruleset fix issue in site editor match the styles for the site editor to those used in the front end formatting change move new code to 6.1 compat files fix linter
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What?
Adds an optional chaining operator to the taxonomy
visibilityproperty.Why?
Fixes: #40326 In some circumstances it seems that the
visibilityproperty of a taxonomy can be undefined causing the editor to crash.How?
Adds a defensive check to make sure
visibilityis not undefined before checkingshow_uipropertyTesting Instructions
packages/editor/src/components/post-taxonomies/index.jsdoing this the editor should still load, but without Category taxonomy showing. Without this patch doing this causes the editor to crash.