-
Notifications
You must be signed in to change notification settings - Fork 9
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
Migrate Quick Connect authorization workflow to Compose UI #86
Merged
prudrabhat
merged 8 commits into
adobe:feature/v-next
from
prudrabhat:quickconnect_flow_migration
Feb 25, 2024
Merged
Migrate Quick Connect authorization workflow to Compose UI #86
prudrabhat
merged 8 commits into
adobe:feature/v-next
from
prudrabhat:quickconnect_flow_migration
Feb 25, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ect_flow_migration
praveek
reviewed
Feb 6, 2024
|
||
val assuranceStateManager: AssuranceStateManager = | ||
AssuranceComponentRegistry.assuranceStateManager ?: run { | ||
Log.e( |
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.
Can you change it to use our Log
API?
praveek
reviewed
Feb 6, 2024
internal class QuickConnectViewModel : ViewModel { | ||
private val quickConnectManager: QuickConnectManager | ||
private val environment: AssuranceConstants.AssuranceEnvironment | ||
private val _state: MutableState<ConnectionState> |
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.
private val _state: MutableState<ConnectionState>
internal val state: State<ConnectionState>
get() = _state
praveek
approved these changes
Feb 6, 2024
The changes look good. Can you update the Makefile so that the CI passes? |
- Better way to set internal immutable state - Use MobileCore.Log instead of android.util.log
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Currently, the QuickConnect authorization workflow UI is based on XML based system. This PR migrates it to use Jetpack Compose UI for the 3.x version to enable better code flow and maintainability.
Key changes:
QuickConnectScreen
that is the entry point for the QuickConnect authorization phase. It hosts theQuickConnectView
containing all the UI elements associated with this screen for easier instrumentation tests.QuickConnectViewModel
which is the bridge between the UI and the business logic (QuickConnectManager
,SessionUIOperationHandler
). This seamlessly fits into the workflow due to the changes done to quick connect UI being activity first unlike the 2.x pin screen.AssuranceActivity
which already hosts thePinScreen
andStatusScreen
will also host theQuickConnectScreen
.AssuranceQuickConnectActitvity
is no longer required and has been deleted. This makes Assurance a single activity flow withAssuranceNavHost
as the single point of entry and control for the UI and business logic.AssuranceQuickConnectView
composes-
AssuranceHeader
andAssuranceSubHeader
- QuickConnect graphic
-
QuickConnectErrorPanel
which optionally displays the error during connection phase.-
ActionButtonRow
that contains a Cancel button and a multi-state Connect button.- The Connect button is using the custom
ProgressButton
composable that is managed byButtonState
that defines its behavior and style (mapped to one ofIdle
,Waiting
,Retry
)Related Issue
#88
How Has This Been Tested?
Note that the tests on this PR will fail due to compilation errors pending PinScreen test fixes. These will come as a fast follow
Screenshots (if appropriate):
Types of changes
Checklist: