-
Notifications
You must be signed in to change notification settings - Fork 820
Forms: Add integrations status to block sidebar #43178
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
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage Summary1 file is newly checked for coverage.
Full summary · PHP report · JS report If appropriate, add one of these labels to override the failing coverage check:
Covered by non-unit tests
|
aac437d
to
d2d1094
Compare
d2d1094
to
9734ea7
Compare
@@ -13,7 +13,7 @@ const AkismetCard = ( { isExpanded, onToggle, data, refreshStatus } ) => { | |||
const cardData = { | |||
...data, | |||
showHeaderToggle: true, | |||
headerToggleValue: data?.isConnected, | |||
headerToggleValue: akismetActiveWithKey, |
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 change is unrelated. It's just a small improvement I saw that didn't warrant it's own PR. We already define akismetActiveWithKey as data.isConnected further up in the component, and use it elsewhere. For consistency, we should use it here.
break; | ||
} | ||
return acc; | ||
}, [] ); |
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.
The reduce method takes in the list of integrations, and returns:
(a) just those that are active/enabled for this form and
(b) includes the icon so it can be output below
(c) the tooltip text for each active integration
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.
@@ -0,0 +1,19 @@ | |||
.active-integrations { |
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.
Since this will end up at global scope in WP with all kinds of other plugins, let's have something less generic. Basically just prefix with jetpack_
or jetpack_forms_
:-)
@ilonagl — Should we add the product name to the tooltip? Jetpack CRM can be confusing since it's just the Jetpack logo (perhaps we have CRM-specific logo somewhere?) |
Yes, that would be good! E.g., "Jetpack CRM connected - sending data"; I do wonder if we need the 'sending data' piece if we include the product name? I don't want this to be too long; it does add some reassurance that it's working. Thoughts? |
That's tricky. 🤔 Eventually, we'll have integrations to other Jetpack functionality like Newsletters, Payments, so we'll need to solve it somehow. Likely would mean adding labels? |
Full name (e.g., Jetpack Newsletters connected) in the on-hover tooltip would be the easiest solution for now. I'll think about other ways, but i doubt we will have specific for each product. |
@simison @ilonagl - I've added tooltips. For now, looks like this: ![]() I used "Akismet is connected for this form" and "Jetpack CRM is connected for this form". Those are big longer but I was thinking it's clear to be specific that the integration is (a) generally connected and (b) active for the current form. If we'd like that to be shorter let me know. Happy to adjust it. @simison I also namespaced the CSS classes. |
Proposed changes:
Adds an integration icon to the Manage Integrations panel when an integration is enabled for a particular form. This is based on designs at p1HpG7-wqy-p2
Other information:
Jetpack product discussion
P2: p1HpG7-wqy-p2
Does this pull request change what data or activity we track or use?
No.
Testing instructions: