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.
Thanks for getting this PR up! I'll test further later today.
I'm wondering if we need the
hasGlobalStyleVariations
condition at all. 🤔E.g.,
I'll investigate later.
Also, not related to this PR, but there's a persistent JS error for sidebar items on mobile: #67467 (comment)
Just mentioning in case you see it and are wondering 👍🏻
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 thought about removing the condition too. But after looking at the original code, I saw that the condition was there and the uid was missing in the default return. To keep the code consistent and working as expected, I decided to leave it as is.
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.
Ah, thanks for the context. That's a good point. Anyway, I'll test as soon as I can today and we'll aim to get the fix in ASAP.
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 still think a lot of this code is superfluous and doubles up on things.
For example, most of the props could be passed to
SidebarNavigationItemGlobalStyles
in MainSidebarNavigationContent.With the same effect.
Removing the condition doesn't have any side effects as far as I can see, but I agree that we can take the cautious route to fix the bug.
I can get a follow up to clean up the code and we can get folks who have commented on recent changes to routing here to chime in.
cc @youknowriad and @t-hamano for visibility