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
Add "Shared with you" badge to Extensions > My Subscriptions list as applicable #46229
Conversation
Hi @andfinally, @raja651, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
7c90bc8
to
86abab3
Compare
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.
This is a brilliant improvement, thanks! 👌
I wonder if there's anything we can do about the tooltip width? With my (admittedly unnaturally long) test email address, I get an ugly scrollbar.
Also, I just noticed the behaviour of this and the tooltip on the Expired badge is a bit annoying. It won't go away till you click the badge again. This is not very intuitive, IMHO. I notice we use the same component for the kebab menu, but I think we add an outside click handler when we show it, so you can close it by clicking anywhere outside it.
…b.com/woocommerce/woocommerce into add/wccom19063-in-app-shared-by-badge
We can't change the width of the tooltip to anything sensible without breaking all kinds of other bits of design. How about we just make it so that exceptionally-long email addresses are allowed to wrap. It's the least-bad option, and only requires a single Screen.Recording.2024-04-16.at.19.21.30.mov |
Suggest this is treated as a separate issue, as (a) it applies to all the |
Done in e636709. |
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.
Yeah, I noticed that: I assumed that it was a deliberate (a11y?) choice for this component to focus the contents of the tooltip when opened. I'll double-check! |
Hi @Dan-Q, just a nudge about this PR! I'm getting a webpack build error locally – I tried to rebase on trunk, but ran into several conflicts. |
I just merged changes from trunk without any conflicts, and I'm not getting build errors. What errors are you getting @andfinally? |
Ah! Found the build error. Looks like the underlying TypeScript type doesn't anticipate an actually-valid CSS declaration. Lemme fix that! |
Modern browesers interpret the former as an alias of the latter, including allowing the use of 'anywhere'. But the current version of https://www.npmjs.com/package/csstype only recognises 'anywhere' as valid for overflowWrap. Switching it prevents compilation errors, still exhibits the correct behavior.
Test using WordPress PlaygroundThe changes in this pull request can be previewed and tested using a WordPress Playground instance. Test this pull request with WordPress Playground. Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit. |
Okay @andfinally! Try that now! |
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, works as expected!
I'm still getting the horrible outline I mentioned in #46229 (review). It's coming from a WordPress rule on all links in common.css
.
I'd suggest we override it.
Index: plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss b/plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss
--- a/plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss (revision d627bcdcd532e1f0a34469b9f03f5a6411832c6c)
+++ b/plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/my-subscriptions.scss (date 1715767787120)
@@ -198,6 +198,10 @@
color: $gray-900;
a {
text-decoration: none;
+
+ &:focus {
+ box-shadow: none;
+ }
}
}
}
I'd even argue StatusPopover
needs a pointer cursor, as it's interactive.
plugins/woocommerce/changelog/46229-add-wccom19063-in-app-shared-by-badge
Show resolved
Hide resolved
…ed-by-badge Co-authored-by: And Finally <andfinally@users.noreply.github.com>
…b.com/woocommerce/woocommerce into add/wccom19063-in-app-shared-by-badge
If we override it in the way you suggest, it's bad for a11y. Instead, how about we just don't focus-within the popover when it appears? [2a36975] Then the link still gets a focus state when it's focussed, but not just when the popup appears. Screen.Recording.2024-05-17.at.12.36.26.mov |
I'm confused why we're highlighting the link if the focus is on its parent. And half of me thinks we focus on the tooltip by deafult for accessibility reasons – for example to make it easier to tab through to any link inside it. But this looks like an easy change that resolves the focus issue, thanks! |
It looks like the default behaviour for a |
Changes proposed in this Pull Request:
Fixes WCCOM#19063.
To make it easier to see when an extension is available because of a shared subscription, this PR amends the Extensions > My Subscriptions page for connected stores to:
How to test the changes in this Pull Request:
plugins/woocommerce-admin/client/marketplace/components/my-subscriptions/table/rows/functions.tsx
and adding another<StatusPopover>
; observe that the badges have both horizontal and now vertical margins to prevent them from colliding with one another.Changelog entry
Significance
Type
Message
For shared subscriptions, My Subscriptions now shows "Shared with you" and the email address of the person who shared it with you.
Comment