Navigation: Fix warning when stretch justification is used#50568
Merged
andrewserong merged 1 commit intotrunkfrom May 14, 2023
Merged
Navigation: Fix warning when stretch justification is used#50568andrewserong merged 1 commit intotrunkfrom
andrewserong merged 1 commit intotrunkfrom
Conversation
aristath
approved these changes
May 12, 2023
Member
aristath
left a comment
There was a problem hiding this comment.
Does what it says on the tin.
LGTM 👍
Contributor
Author
|
Thanks for the review! |
Contributor
|
Thanks for fixing this! I've been meaning to update the layout logic in the Nav block since #44600, as we shouldn't need the custom properties any longer, but there's always so much to do 😅 |
Contributor
Author
Oh, I hear ya! My to-do list grows faster than my to-done list 😅 |
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?
Fixes the warning issue reported in #50550
In the Navigation block's PHP, check that the provided justification value is present in the mapping array before attempting to access it.
Why?
Since
stretchwas introduced as a valid value, whenstretchis set on the Navigation block, it throws a warning when rendered on the site frontend.This PR doesn't implement proper support for
stretchin this block — it's just looking at resolving this PHP warning.How?
Testing Instructions
stretchcontent justification (the right-most option)stretchdoesn't really do anything for this block yet (I don't think), but double-check thatleft,centre,rightjustifications still work as expectedTesting Instructions for Keyboard
Screenshots or screencast
This is the warning that should not be logged with this PR applied: