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

Update BackupDelta to use the backup of the selected date and show the activity log #40752

Conversation

cleacos
Copy link
Contributor

@cleacos cleacos commented Apr 3, 2020

Changes proposed in this Pull Request

[ HUGE ]
Styles not yet applied

Update BackupDelta to use the backup of the selected date, simplify the code and doing some clean up of the component.

  • Broken down the backup details snapshot view into several renders
  • Removed the Activity Log view from this component and move that render responsibility to the BackupsPage component.
  • Removed unused props and functions
  • Added getCategorizedActivities function to utils to get the activities categorized based on the activities passed to it

Testing instructions

  • Apply the changes
  • Go through your backups and you should see the Backup details of the date and if you have a Real-time subscription, you should see the rewindable activities of that date.
  • See the expected copies for the backup status.

@cleacos cleacos added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) labels Apr 3, 2020
@cleacos cleacos requested review from cbauerman and rcoll April 3, 2020 13:10
@cleacos cleacos self-assigned this Apr 3, 2020
@matticbot
Copy link
Contributor

@matticbot
Copy link
Contributor

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~72 bytes removed 📉 [gzipped])

name     parsed_size           gzip_size
backups       -274 B  (-0.1%)      -72 B  (-0.1%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Don't render ActivityLog if we don't have rewindable activities

Adapt BackupDelta to use the last backup from the selected date

- Broken down the backup details snapshot into several renders
- Removed the Activity Log from this component. That block is rendered now by the BackupsPage
- Removed unused props and functions
- Added util function to get the activities categorized based on the activities passed to it

Provide to the ActivityCard the timezone and the gmtOffset of the site
@cleacos cleacos force-pushed the update/jetpack-cloud-backupdelta-pass-the-selected-backup branch from 69a5ab1 to 3e72626 Compare April 9, 2020 10:42
@cleacos
Copy link
Contributor Author

cleacos commented Apr 9, 2020

Branch rebased.

@@ -106,6 +76,22 @@ class BackupDelta extends Component {
? mediaCreated.slice( 0, 2 ).concat( deletedElement )
: mediaCreated.slice( 0, 3 );

return (
<Fragment>
Copy link
Member

Choose a reason for hiding this comment

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

lets use <> instead of

@cleacos cleacos added [Status] Needs Rebase and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Apr 13, 2020
@cleacos
Copy link
Contributor Author

cleacos commented Apr 22, 2020

PR outdated

@cleacos cleacos closed this Apr 22, 2020
@sirreal sirreal deleted the update/jetpack-cloud-backupdelta-pass-the-selected-backup branch December 4, 2020 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jetpack Cloud Anything related to the Jetpack Cloud (cloud.jetpack.com) [Status] Needs Rebase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants