-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Allow syncBarcodeView consumers to define minimum scanning area #7356
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
base: develop
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| private fun setupExpandedScanningArea() { | ||
| if (minScanningAreaHeight == MIN_SCANNING_AREA_HEIGHT_NOT_SET) return |
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.
If RC flag is off, minScanningAreaHeight will be equal to MIN_SCANNING_AREA_HEIGHT_NOT_SET, so I don't think we need to feature flag here as well
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
|
|
||
| binding = if (syncFeature.useNewActivityConnectSyncLayout().isEnabled()) { |
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.
Alternatively, we could duplicate the entire activity and navigate to one or the other based on RC if we think that's safer
sync/sync-impl/src/main/java/com/duckduckgo/sync/impl/ui/qrcode/SyncBarcodeView.kt
Outdated
Show resolved
Hide resolved
eaeb280 to
1d9fa71
Compare

Task/Issue URL: https://app.asana.com/1/137249556945/project/1212227266948491/task/1210351397656377?focus=true
Description
Allow syncBarcodeView consumers to define minimum scanning area
Use remote config to allow for synamic resizing of SyncBarcodeView along with minimum scanning area
Steps to test this PR
Feature 1
useNewActivityConnectSyncLayoutenabled (default state), open sync settings and try to add a new deviceFeature 2
useNewActivityConnectSyncLayout, open sync settings and try to add a new deviceUI changes
Note
Adds a remote-toggle new Connect Sync layout and enables
SyncBarcodeViewconsumers to set a minimum scanning area via a new attribute.SyncFeature.useNewActivityConnectSyncLayoutto switch between old/new Connect Sync UI.SyncConnectActivityselects layout at runtime and abstracts bindings viaConnectSyncBinding(old/new).res/layout/activity_connect_sync_new.xmlwith dynamic scanner area and updated QR/code UI.SyncBarcodeView)app:minScanningAreaHeightattribute (declared inattrs-sync-barcode-view.xml).view_square_decorated_barcode.xmlto wrapBarcodeViewinbarcodeContainer.Written by Cursor Bugbot for commit 1d9fa71. This will update automatically on new commits. Configure here.