fix(compose-sdk): restore dialog dim after hidden loading#248
Open
fix(compose-sdk): restore dialog dim after hidden loading#248
Conversation
Keep Compose dialog dimming aligned with the View SDK when loading is disabled. Intended behavior: - If loading=false, the dialog should start without the dim-behind backdrop while the captcha is still hidden/loading. - If a visible checkbox is rendered, the dialog should regain its normal dimmed backdrop as soon as the checkbox is shown. - If an invisible flow escalates into a visible challenge, the dialog should regain its normal dimmed backdrop when that visible state is entered. - Unchanged flows such as embedded rendering, dialog cancellation, and preloaded WebView reuse should keep their prior behavior. Implementation: - Track dialog dimming as Compose state instead of repeatedly mutating the window from a global layout listener. - Restore dim on the same semantic transitions used by the View SDK: Loaded for checkbox sizes, Opened for invisible flows. - Centralize window flag updates in a dialog setup helper that preserves and restores the window's original dim configuration. Tests: - Add emulator-backed coverage for the loading=false hidden state. - Add emulator-backed coverage for dim restoration when a checkbox becomes visible. - Add emulator-backed coverage for the invisible-flow dim restoration state transition. - Preserve existing Compose behavior checks for embedded mode, dialog cancellation, and WebView reuse.
|
Diffuse report: |
|
Benchmark report:
|
This file contains hidden or 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
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.
Summary
This restores the Compose dialog dimming behavior for
loading=falseso it matches the existing View SDK semantics.Intended behavior
loading=false, the dialog should start without the dim-behind backdrop while the captcha is still hidden/loading.Implementation
Loadedfor checkbox sizesOpenedfor invisible flowsValidation
Ran on the
Medium_Phoneemulator with normal Gradle instrumentation:Passed: 11/11 tests, 0 failures.
That includes coverage for:
loading=falseremaining undimmed while the captcha is still hidden