-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Update backup status views: no backup, failed backup, scheduled backup #40932
Update backup status views: no backup, failed backup, scheduled backup #40932
Conversation
- Updated the copies for: failed backup, no backup. - Added a new status backup view for scheduled backup for today. - Applied some styles
<Gridicon icon="sync" /> | ||
<> | ||
<Gridicon icon="cloud-upload" className="daily-backup-status__gridicon-no-backup" /> | ||
<div className="daily-backup-status__title">{ translate( 'No backup' ) }</div> |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 21 times:
translate( 'No backups' )
ES Score: 7
const yesterday = today.subtract( 1, 'days' ); | ||
|
||
const lastBackupDay = lastBackupDate.isSame( yesterday, 'day' ) | ||
? translate( 'Yesterday ' ) |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 54 times:
translate( 'yesterday' )
ES Score: 15
See 1 additional suggestions in the PR translation status page
<> | ||
<Gridicon className="daily-backup-status__gridicon-backup-scheduled" icon="cloud-upload" /> | ||
<div className="daily-backup-status__static-title"> | ||
{ translate( 'Backup Scheduled:' ) } |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 9 times:
translate( 'Backup Scheduled' )
ES Score: 11
Can you explain in the testing instructions How to get into the different state in order to test this PR? |
Why do we say more "Backups from today" (under the contact Support button). From the second screenshot that part shouldn't be there or am I missing something. :) |
client/landing/jetpack-cloud/components/daily-backup-status/index.jsx
Outdated
Show resolved
Hide resolved
client/landing/jetpack-cloud/components/daily-backup-status/index.jsx
Outdated
Show resolved
Hide resolved
I wasn't able to test this PR but the code so far looks good and it was easy to follow. :) |
Updated
Yes, that is, the text shouldn't be there, but it's part of another component. In this PR: #40752 that issue is fixed. |
const backupDate = applySiteOffset( backup.activityTs, { timezone, gmtOffset } ); | ||
|
||
const displayDate = backupDate.format( 'L' ); | ||
const displayTime = backupDate.format( 'LT' ); | ||
|
||
return ( | ||
<Card className="daily-backup-status__failed"> | ||
<> |
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.
Neat. Had to look this up. Shorthand for Fragment
. Love it.
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, tests good. Shipping.
Changes proposed in this Pull Request
Update the backup status views when:
Backup scheduled:
Failed backup (copy updated):
No Backup:
Testing instructions
You need to have a Jetpack site with a backup subscription (or a plan with it). To have a:
Failed Backup scenario: disconnect the site for one, so you'll get a failed backup. Also, you can modify the props of the component, change
rewind__backup_complete_full
byrewind__backup_error
No Backup scenario: cancel your subscription and after that, the system will not trigger any backup. The other case is when your backup is delayed to the next day, but it's out of your hands. Directly you can modify the props of DailyBackupStatus component, add in
new prop
fieldbackup: null
backup
props tonull