Skip to content
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 tooltip for installed with no videos #38842

Merged
merged 8 commits into from
Aug 16, 2024

Conversation

CodeyGuyDylan
Copy link
Contributor

@CodeyGuyDylan CodeyGuyDylan commented Aug 12, 2024

Proposed changes:

Add tooltip for the following states of the videopress card

  • Inactive with videos
  • Active with no videos
  • Active with a plan
  • Active without a plan

These tooltips will have to be adjusted when we add the comparison data and when we add context switching between "last 30 days" and "all-time" stats. That will be handled in those individual PRs

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

P2: p1HpG7-rb7-p2

Does this pull request change what data or activity we track or use?

Yes, there are tracks for all the tooltips onClick, as well as a track when the user clicks a link within one of the tooltips

Testing instructions:

To see the tooltip copy you can look here: tCejO24bAGT2ME7iYEfmuG-fi-6392_3262

  1. Create a Jurassic ninja site with sandbox access and checkout this branch on Jetpack (you may want to test this on your local environment, the stats are cached in a transient and it could be useful to comment that out when testing)
  2. Go to My Jetpack. There should be no tooltips for VideoPress when the product is unowned and no videos are uploaded
    image
  3. Now add 1 or more videos to your site and go back to My Jetpack. You should now see a tooltip icon and when you open it, you should see the correct amount of videos in the content, as well as a link to some documentation
    image
  4. Make sure the hosting link goes to the right place (https://jetpack.com/support/jetpack-videopress/the-jetpack-videopress-dashboard/#manage-local-videos)
  5. Now activate the product and connect your user account
  6. To mock some randomized data, go to uggcf%3N%2S%2Suers.yv%2S%3Suggcf%3N%2S%2Sbcratebx.n8p.pbz%2Sfbhepr%2Skers%2Sjcpbz%2Schoyvp.ncv%2Serfg%2Sjcpbz%2Qwfba%2Qraqcbvagf%2Spynff.jcpbz%2Qwfba%2Qncv%2Qfgngf%2Qivqrb%2Qcynlf%2Qi1%2Q1%2Qraqcbvag.cuc%3Se%3Q210o65nn%26zb%3Q1199%26sv%3Q37%2350-og and replace all those zeros with something like rand(0, 100). You can pick whatever numbers you'd like if you wanted to test out smaller or bigger numbers.
  7. Make sure you only have 1 video and look at the tooltips. They should both be in the context of a site without a plan and only 1 video
    image
    image
  8. Now purchase a VideoPress plan and go back to My Jetpack. The tooltip related to views should now be updated.
    image

Bonus: Test with an active plugin with 0 stats and 1 video. Ensure that we do not imply they are currently gathering views on their video
image

Copy link
Contributor

github-actions bot commented Aug 12, 2024

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • 🔴 Add a "[Status]" label (In Progress, Needs Team Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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 🤖


The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available.


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Choose a review path based on your changes:
    • A. Team Review: add the "[Status] Needs Team Review" label
      • For most changes, including minor cross-team impacts.
      • Example: Updating a team-specific component or a small change to a shared library.
    • B. Crew Review: add the "[Status] Needs Review" label
      • For significant changes to core functionality.
      • Example: Major updates to a shared library or complex features.
    • C. Both: Start with Team, then request Crew
      • For complex changes or when you need extra confidence.
      • Example: Refactor affecting multiple systems.
  3. Get at least one approval before merging.

Still unsure? Reach out in #jetpack-developers for guidance!

@github-actions github-actions bot added the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Aug 12, 2024
Copy link
Contributor

github-actions bot commented Aug 12, 2024

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WordPress.com Simple site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin, and enable the add/tooltip-for-videopress-card branch.

  • To test on Simple, run the following command on your sandbox:

    bin/jetpack-downloader test jetpack add/tooltip-for-videopress-card
    

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@CodeyGuyDylan CodeyGuyDylan force-pushed the add/tooltip-for-videopress-card branch from 7622e4c to c09349a Compare August 12, 2024 20:06
@@ -19,7 +19,7 @@ const useVideoPressCardDescription = ( {
if ( isPluginActive && ! videoCount ) {
return preventWidows(
__(
'Stunning-quality, ad-free video in the WordPress Editor. Begin by uploading your first video.',
'Stunning-quality, ad-free video in the WordPress Editor. Begin by uploading your first video',
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The info icon looked weird after a period, let me know if you disagree

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah IMO I think the period should remain. To me it's the opposite, and to me it looks kinda weird without the period. (and seems grammatically improper)

I'd be curious what anybody else thinks. 🤷‍♂️

With Period Without Period
Screen Shot on 2024-08-16 at 11-57-00 Screen Shot on 2024-08-16 at 11-57-57

Not a blocker though... 👍

jboland88
jboland88 previously approved these changes Aug 13, 2024
Copy link
Contributor

@jboland88 jboland88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks pretty good and tested well.
The way you are managing the tooltip copy makes sense to me.

I noticed one grammar error and one bug that I think will be addressed in the base branch. This one seems good to merge into base IMO.

sprintf(
// translators: %d is the number of videos in the Media Library that could benefit from VideoPress.
_n(
'You have %d video in your Media Library that could benefit from VideoPress. Start <a>hosting</a> them today to unlock multiple benefits: enhanced quality add-free streaming, faster load times, customizable player controls.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this string: "them" sounds incorrect for the singular.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch, updating it to "it"


const viewsWithoutPlan = {
title: __( 'High-quality video, wherever your audience is', 'jetpack-my-jetpack' ),
text: __( 'Success! 🌟 Your video is live and gathering views.', 'jetpack-my-jetpack' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this bug was covered in the other PR, but I am still getting this message with no watch time or views. I think the intent is to omit the stats with 0 views?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked about this elsewhere, decided to keep this way 😄

@CodeyGuyDylan
Copy link
Contributor Author

@ilonagl this is the PR where the tooltip comes into play. Let me know if the placements look okay!

@ilonagl
Copy link

ilonagl commented Aug 13, 2024

Thank you for the ping, @CodeyGuyDylan!

image

Could we make this text shorter so it fits into two lines? Something like this: "This metric shows total video viewing time for the last 30 days."

The info icon placement looks good. It would be best if we could keep them consistent. The rest of them have info icon next to the header, so it would be good to make it like this in this case as well:

image

What about making the header 'Existing videos' and placing the info icon next to it?

Other than that, looks great. Thank you for working on this!!

@ilonagl
Copy link

ilonagl commented Aug 13, 2024

@elliottprogrammer could we possibly update the info icon placement for the Protect card?

@CodeyGuyDylan CodeyGuyDylan force-pushed the add/value-to-active-state-videopress-card branch from b848419 to e97e266 Compare August 14, 2024 18:47
@CodeyGuyDylan CodeyGuyDylan force-pushed the add/tooltip-for-videopress-card branch from cd13c12 to 9563f26 Compare August 14, 2024 21:53
@CodeyGuyDylan CodeyGuyDylan force-pushed the add/value-to-active-state-videopress-card branch from 510c733 to 0bd3885 Compare August 15, 2024 15:36
Base automatically changed from add/value-to-active-state-videopress-card to trunk August 15, 2024 16:33
@CodeyGuyDylan CodeyGuyDylan dismissed jboland88’s stale review August 15, 2024 16:33

The base branch was changed.

@CodeyGuyDylan CodeyGuyDylan force-pushed the add/tooltip-for-videopress-card branch from a3ecd1b to 8374b91 Compare August 15, 2024 16:48
Copy link
Contributor

@elliottprogrammer elliottprogrammer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested functionality works good as described! The code looks overall good to me, I don't see any issues! Just a couple minor comments.
LGTM! 👍

@@ -19,7 +19,7 @@ const useVideoPressCardDescription = ( {
if ( isPluginActive && ! videoCount ) {
return preventWidows(
__(
'Stunning-quality, ad-free video in the WordPress Editor. Begin by uploading your first video.',
'Stunning-quality, ad-free video in the WordPress Editor. Begin by uploading your first video',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, yeah IMO I think the period should remain. To me it's the opposite, and to me it looks kinda weird without the period. (and seems grammatically improper)

I'd be curious what anybody else thinks. 🤷‍♂️

With Period Without Period
Screen Shot on 2024-08-16 at 11-57-00 Screen Shot on 2024-08-16 at 11-57-57

Not a blocker though... 👍

} }
>
<h3>{ watchTime.title }</h3>

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: Unnecessary space here...
Not a blocker, of course. 😉

@CodeyGuyDylan CodeyGuyDylan merged commit 66515fb into trunk Aug 16, 2024
71 checks passed
@CodeyGuyDylan CodeyGuyDylan deleted the add/tooltip-for-videopress-card branch August 16, 2024 16:42
@github-actions github-actions bot removed the [Status] Needs Author Reply We would need you to make some changes or provide some more details about your PR. Thank you! label Aug 16, 2024
pkuliga pushed a commit that referenced this pull request Aug 23, 2024
* Add tooltip for installed with no videos

* Add tooltip for inactive with videos

* Add tooltips for active states

* Add changelog

* Update copy

* Update tooltip location when videos are present but plugin is inactive

* Move info tooltip to heading

* Nitpicks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants