Skip to content

Jetpack Section: Add Backup/Restore Reusable VC#15566

Merged
momo-ozawa merged 4 commits intodevelopfrom
feature/15191-backup-and-restore-reusable-vc
Jan 6, 2021
Merged

Jetpack Section: Add Backup/Restore Reusable VC#15566
momo-ozawa merged 4 commits intodevelopfrom
feature/15191-backup-and-restore-reusable-vc

Conversation

@momo-ozawa
Copy link
Copy Markdown
Contributor

@momo-ozawa momo-ozawa commented Jan 4, 2021

Part of #15191

⚠️ Please review #15555 first... thanks!

  • Added a new resusable VC for Download Backup / Restore actions
  • Switches/buttons will be hooked up later
  • Styling will be updated later
Restore Download Backup
Screen Shot 2021-01-04 at 15 31 01 Screen Shot 2021-01-04 at 15 31 08

To test:

Restore

  1. My Site > Activity Log > rewindable activity cell
  2. Tap on ellipsis icon
  3. Tap on Restore
    • ✅ Should display Restore view modally
  4. Tap on Cancel
    • ✅ Should dismiss VC

Download Backup

  1. My Site > Activity Log > rewindable activity cell
  2. Tap on ellipsis icon
  3. Tap on Download Backup
    • ✅ Should display Download Backup view modally
  4. Tap on Cancel
    • ✅ Should dismiss VC

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 4, 2021

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 4, 2021

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Copy Markdown
Contributor

@leandroalonso leandroalonso left a comment

Choose a reason for hiding this comment

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

@momo-ozawa works as described!

When I tap the ellipsis icon I'm seeing an AutoLayout warning:

2021-01-04 11:09:31.953733-0300 WordPress[27317:1108158] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x7fa764033130 UIView:0x7fa764037e20.width == - 16   (active)>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7fa764033130 UIView:0x7fa764037e20.width == - 16   (active)>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKitCore/UIView.h> may also be helpful.

Also left an architectural suggestion. Let me know what do you think, you can address that in a future task if you like the idea. Up to you! :)

Base automatically changed from feature/15191-activity-cell-action-button to develop January 6, 2021 01:56
@momo-ozawa
Copy link
Copy Markdown
Contributor Author

@leandroalonso The autolayout warning seems to be an iOS bug, so I'm going to go ahead and merge this PR!

<_UIAlertControllerActionView: 0x7fe4c2814e90; frame = (0 0; 374 57); Action = <UIAlertAction: 0x7fe4c265d4a0 Title = "Download Backup" Descriptive = "(null)" Image = 0x0>>
2021-01-06 11:56:41.545558+0900 WordPress[2858:2826191] [LayoutConstraints] Unable to simultaneously satisfy constraints.
	Probably at least one of the constraints in the following list is one you don't want. 
	Try this: 
		(1) look at each constraint and try to figure out which you don't expect; 
		(2) find the code that added the unwanted constraint or constraints and fix it. 
(
    "<NSLayoutConstraint:0x7fe4b2adb360 UIView:0x7fe4c291edc0.width == - 16   (active)>"
)

https://stackoverflow.com/questions/55372093/uialertcontrollers-actionsheet-gives-constraint-error-on-ios-12-2-12-3

@momo-ozawa momo-ozawa merged commit 7a29b68 into develop Jan 6, 2021
@momo-ozawa momo-ozawa deleted the feature/15191-backup-and-restore-reusable-vc branch January 6, 2021 03:03
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.

2 participants