-
Notifications
You must be signed in to change notification settings - Fork 53
Studio: Display tooltip with the demo site last update time #812
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
wojtekn
left a comment
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 code change looks correct. The tooltip works as expected.
We could consider moving the tooltip below the button as now it is displayed over the expiration text and introduces a feeling that it's not a tooltip but an expiration text being replaced. However, we will redesign the list as a part of the project so we can skip it.
Also, I'm wondering if we should use a language similar to the one in the Sync tab, e.g., You pushed this site %s ago. for consistency. However, the tooltip is now consistent with Expires in %s.
|
Thanks for the review and feedback, Wojtek!
That's a good point. I have moved the tooltip to the bottom - since I expect this change will be available to users before we launch the redesigned list.
I was considering using similar language to the one we already use on the Sync tab, but apart it being more in line with the expiration time message as you mention, I also felt that having the tooltip in the passive form is more concise and easier to read. |
sejas
left a comment
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.
Great work @ivan-ottinger , thanks for adding the tooltip.
I confirm it works as expected and the tooltip appears over the update button.

| ); | ||
| const getLastUpdateTimeText = () => { | ||
| if ( ! date ) { | ||
| return __( 'Never updated' ); |
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 think this Never updated won’t ever be displayed.
No need to change it, it's just an observation.
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.
Thank you for your review and feedback, Antonio. Yes it should never display. I left it there as a fallback in case the date is not available for some reason. But now thinking about it further, maybe instead we should hide the tooltip in that case completely.

Related issues
Proposed Changes
Update demo sitebuttonUpdate demo siteandDelete demo sitebuttonsTesting Instructions
npm start.Update demo sitebutton, a tooltip with information when the demo site was updated should show up.Pre-merge Checklist