Skip to content

Jetpack Section: Backup Screen - Introduce Feature Flag#13709

Merged
ashiagr merged 15 commits intodevelopfrom
issue/13629-introduce-backups-feature-flag
Jan 8, 2021
Merged

Jetpack Section: Backup Screen - Introduce Feature Flag#13709
ashiagr merged 15 commits intodevelopfrom
issue/13629-introduce-backups-feature-flag

Conversation

@ParaskP7
Copy link
Copy Markdown
Contributor

@ParaskP7 ParaskP7 commented Jan 5, 2021

Parent #13629

This PR introduces a local feature flag for the Backups feature. When the feature flag is enabled a Backup menu is shown on the My Site tab (currently irrespective of the site plan).

To test:

  • Launch app and go to My Site tab.
  • Notice that Backup menu is hidden.
  • Go to My Site -> Toolbar Avatar -> App Settings -> Test feature configuration.
  • Enable BackupsFeatureConfig, scroll down and click the RESTART THE APP button. DO NOT confuse this feature flag with the BackupFeatureConfig (singular). Make sure to enable the right feature flag.
  • Go back to My Site tab and notice Backup menu is shown.

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.

The backup menu is being displayed based on the backups feature config.

PS: The backup drawable is temporary and will be replaced with a
permanent one once the designs are finalized.
This fixes lots of import related warning on this class, thus making it
easier to spot a new warning.
@ParaskP7 ParaskP7 added this to the 16.5 milestone Jan 5, 2021
@ParaskP7 ParaskP7 requested a review from ashiagr January 5, 2021 15:19
@ParaskP7 ParaskP7 self-assigned this Jan 5, 2021
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 5, 2021

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

@ParaskP7 ParaskP7 mentioned this pull request Jan 5, 2021
40 tasks
@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 5, 2021

You can test the changes on this Pull Request by downloading the APK here.

Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

LGTM @ParaskP7! Also thank you for fixing android R imports 🙏.

Just a note for the future implementation:

(I understand this PR only targets the "old My Site" section.)

We have a ImprovedMySiteFragment which will replace the old MySiteFragment soon. It gets enabled when MySiteImprovementsFeatureConfig is enabled in App Settings.

"Scan" menu is functional only from the improved my site flow right now. We might want to sync in the next step to decide if we want to support new menus on the old My Site as I am not sure when MySiteImprovements is getting released.

@ParaskP7
Copy link
Copy Markdown
Contributor Author

ParaskP7 commented Jan 7, 2021

👋 @ashiagr !

Thank you so much for this review! 🌟

We have a ImprovedMySiteFragment which will replace the old MySiteFragment soon. It gets enabled when MySiteImprovementsFeatureConfig is enabled in App Settings.

You are totally right, I wasn't aware of that and missed that completely. I am currently updating this PR to add the Backup menu there as well. ⚙️

"Scan" menu is functional only from the improved my site flow right now. We might want to sync in the next step to decide if we want to support new menus on the old My Site as I am not sure when MySiteImprovements is getting released.

  • I am seeing Scan being functional from the MySiteFragment as well, what do you mean by it being functional only from the ImprovedMySiteFragment, am I missing something?
  • I agree, we should definitely sync on whether we need to support new menus on the old MySiteFragment and when the new ImprovedMySiteFragment is going live.

@ashiagr
Copy link
Copy Markdown
Contributor

ashiagr commented Jan 7, 2021

I am seeing Scan being functional from the MySiteFragment as well, what do you mean by it being functional only from the ImprovedMySiteFragment, am I missing something?

Oh I thought Scan menu is not connected to the Scan screen if accessed from the MySiteFragment; it is very-much connected, so we're good here. It's the display logic based on scan availability which is present only in the ImprovedMySiteFragment's VM. This logic is being replaced by the site capabilities API that we recently figured out ( @malinajirka is working on it). Let's sync on Slack so we're all on the same page.

The build backup list item functionality is based on the backups
feature config.

PS: The backup drawable is temporary and will be replaced with a
permanent one once the designs are finalized.
The build backup list item functionality of the 'SiteItemsBuilder' is
triggered based on the backups feature config.
This is because of the fact that the to be added new parameter will not
otherwise fit the line.
This is an equivalent to what the previous commit did for the new
'ImprovedMySiteFragment'. As such, this commit is added to keep both
screens, the old and the new one, consistent with each other.
@ParaskP7 ParaskP7 requested a review from ashiagr January 7, 2021 13:52
@ParaskP7
Copy link
Copy Markdown
Contributor Author

ParaskP7 commented Jan 7, 2021

👋 @ashiagr !

I have uploaded the solution for ImprovedMySiteFragment as well. I just re-requested your review.

Many thanks in advance! 🙏

Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @ParaskP7! I have verified that backup menu is present on both old and new My Site fragment based on the feature flag & currently irrespective of the site capabilities.

Also thanks for splitting code changes into separate commits and including appropriate information in the commit messages. It made reviewing very easy, good job 🌟!

@ashiagr ashiagr merged commit b023191 into develop Jan 8, 2021
@ashiagr ashiagr deleted the issue/13629-introduce-backups-feature-flag branch January 8, 2021 06:13
@ParaskP7
Copy link
Copy Markdown
Contributor Author

ParaskP7 commented Jan 8, 2021

Thanks for approving and merging the PR @ashiagr ! 🌟

I am really glad that you liked the way I structured my commits. I have been using this approach for few years now and been advocating in favor of it. It is really nice to see you found it valuable. In my opinion a reviewer should be aware of every step of the solution, small descriptive commits along with doing commit-by-commit review help navigating to the final outcome and in a sense doing an async pair programming with the author. I feel that this works really good. Also, doing that it is very beneficial for the author itself since they don't get overwhelmed by a major commit, which might include lots of feature additions, along with refactors, maybe tests, etc. With small commits, the author can quickly review their own commit much easier before committing it.

PS: Apologies for my mumbling above 😄 I am just really glad you liked it, and thanks again! 🤗

@ParaskP7 ParaskP7 changed the title Jetpack Mobile: Backups - Introduce Feature Flag Jetpack Mobile: Backup Screen - Introduce Feature Flag Jan 15, 2021
@ParaskP7 ParaskP7 changed the title Jetpack Mobile: Backup Screen - Introduce Feature Flag Jetpack Section: Backup Screen - Introduce Feature Flag Jan 28, 2021
@ParaskP7 ParaskP7 mentioned this pull request Feb 4, 2021
67 tasks
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