-
Notifications
You must be signed in to change notification settings - Fork 219
Limit number of visible incompatible extensions in sidebar notice #11972
Limit number of visible incompatible extensions in sidebar notice #11972
Conversation
The release ZIP for this PR is accessible via:
Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. |
Size Change: +554 B (0%) Total Size: 1.53 MB
ℹ️ View Unchanged
|
…atible-extensions-in-sidebar-notice
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.
@nielslange this PR is working as expected, I have made an inline suggestion, and I do have another suggestion about the icon. Maybe moving the chevron down a few pixels when it's expanded would be better, toggling between open/closed it looks like it is not aligned correctly with the text when it's expanded.
assets/js/editor-components/incompatible-extension-notice/index.tsx
Outdated
Show resolved
Hide resolved
Thanks for your review, @opr. Regarding the icon, I tried to mimic the behaviour of Gutenberg. That said, I just applied your suggestion and moved the chevron 2px down when it's opened. It looks indeed better, but it looks slightly different from the behavior of the Gutenberg chevron. I'm looking forward to hearing your thoughts on that. |
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.
but it looks slightly different from the behavior of the Gutenberg chevron. I'm looking forward to hearing your thoughts on that.
Hmm, OK let's keep it consistent, thanks for trying the change out Niels, revert your commit and I'll approve 🙏🏼
This reverts commit ff51424.
Thanks, @opr. I just reverted the chevron commit and all tests passed. |
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.
Looks good! Thanks Niels.
What
Fixes #11557
This PR limits the display of incompatible extensions to two, with the option to view additional ones in a dropdown menu. Instead of introducing an according component to show remaining incompatible extensions, I decided to use the HTML element
<details>
.The proposed design in #11557 shows that the
<details>
element does not have the marker on the left-hand side, but a chevron on the right-hand side. For consistency-reasons, I used the chevron from@wordpress/icons
, which is used to collapse various sidebar sections. For Safari, I had to introduce a separate definition to remove the marker (see review below).In #11557 (comment), @elizaan36 mentioned that the link color should be changed to gray and be underlined. While cross-browser testing, I noticed that Safari does not allow adding
text-decoration
to the<summary>
element. Therefore, I introduced a<span>
to ensure that the link is underlined in all browsers.Why
This PR enhances the user experience by creating a more clear UI. It also prevents overwhelming merchants by showing too many incompatible extensions by default.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Note
Things to keey an eye on while testing:
Test with 2 extensions
Test with 3 extensions
1 more incompatibility
.Test with 10 extensions
8 more incompatibilities
.Screenshots or screencast
Before and after
Cross-browser compatibility
Note
WooCommerce Visibility
Required:
Checklist
Required:
[type]
label or a[skip-changelog]
label.Conditional:
[skip-changelog]
label is not present).Changelog