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

Feature flag sync #4019

Merged
merged 2 commits into from
Dec 21, 2023
Merged

Feature flag sync #4019

merged 2 commits into from
Dec 21, 2023

Conversation

cmonfortep
Copy link
Contributor

@cmonfortep cmonfortep commented Dec 18, 2023

Task/Issue URL: https://app.asana.com/0/488551667048375/1206046777189412/f

Description

Add Remote flags around sync.

Steps to test this PR

https://app.asana.com/0/0/1206190385973972/f

UI changes

Before After
!(Upload before screenshot) (Upload after screenshot)

@cmonfortep
Copy link
Contributor Author

Current dependencies on/for this PR:

This stack of pull requests is managed by Graphite.

@cmonfortep cmonfortep force-pushed the feature/cristian/sync/feature_flag branch 4 times, most recently from 53c5f73 to 0937e7d Compare December 18, 2023 20:37
@cmonfortep cmonfortep marked this pull request as ready for review December 19, 2023 09:04
@cmonfortep cmonfortep force-pushed the feature/cristian/sync/feature_flag branch from 0937e7d to 0a136c4 Compare December 20, 2023 10:57
Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

besides what we’ve seen in the review task, this is great. Good job @cmonfortep !

fun self(): Toggle

@Toggle.DefaultValue(true)
fun level0ShowSync(): Toggle
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: remove level prefix, the toggle itself doesn’t need it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

needs to follow same name as in privacy config, so we can't change that.

@@ -61,7 +61,7 @@ class RealSyncEngine @Inject constructor(

override fun triggerSync(trigger: SyncTrigger) {
Timber.i("Sync-Engine: petition to sync now trigger: $trigger")
if (syncStore.isSignedIn()) {
if (syncStore.isSignedIn() && syncStore.syncingDataEnabled) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why not have both checks inside the method in the store?
syncingDataEnabled can check internally for the flags and the signedin state.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We could do that, but we still need to keep isSignedIn and syncingDataEnabled for other usages, so we are not having any extra benefit. Will leave it like this for now.

) : ViewModel(), DefaultLifecycleObserver {

data class ViewState(
val warningMessage: Int? = null,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit

Suggested change
val warningMessage: Int? = null,
val message: Int? = null,

sync/sync-impl/src/main/res/layout/view_sync_enabled.xml Outdated Show resolved Hide resolved
@cmonfortep cmonfortep force-pushed the feature/cristian/sync/feature_flag branch from 0a136c4 to fa5929a Compare December 21, 2023 16:21
@cmonfortep cmonfortep merged commit 491ad02 into develop Dec 21, 2023
7 checks passed
@cmonfortep cmonfortep deleted the feature/cristian/sync/feature_flag branch December 21, 2023 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants