[PR #2967] [PM-5910] Workaround for for sliding elements in Duo 2FA flow #3921

Closed
opened 2025-11-26 23:38:36 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/2967

State: closed
Merged: Yes


Type of change

  • Bug fix
  • New feature development
  • Tech debt (refactoring, code cleanup, dependency upgrades, etc)
  • Build/deploy pipeline (DevOps)
  • Other

Objective

To stop the sliding bottom layout on the Duo 2FA page we're now setting a fixed height for the webview based on a simple measurement. The gap at the bottom can vary depending on the device height (screenshots below), but thankfully Duo's new frameless implementation will demote this flow to an edge case.

Code changes

  • TwoFactorPage/Viewmodel: Added height property and calculation using DeviceDisplay.MainDisplayInfo height & density

Screenshots

Screenshot 2024-01-29 at 12 38 59 PM
Screenshot 2024-01-29 at 12 39 11 PM

In the rare case we aren't able to obtain the available height for measuring, we default to 400dp as a safe minimum as seen here:

Screenshot 2024-01-29 at 12 57 25 PM
Screenshot 2024-01-29 at 12 58 11 PM

Before you submit

  • Please check for formatting errors (dotnet format --verify-no-changes) (required)
  • Please add unit tests where it makes sense to do so (encouraged but not required)
  • If this change requires a documentation update - notify the documentation team
  • If this change has particular deployment requirements - notify the DevOps team
**Original Pull Request:** https://github.com/bitwarden/android/pull/2967 **State:** closed **Merged:** Yes --- ## Type of change - [X] Bug fix - [ ] New feature development - [ ] Tech debt (refactoring, code cleanup, dependency upgrades, etc) - [ ] Build/deploy pipeline (DevOps) - [ ] Other ## Objective <!--Describe what the purpose of this PR is. For example: what bug you're fixing or what new feature you're adding--> To stop the sliding bottom layout on the Duo 2FA page we're now setting a fixed height for the webview based on a simple measurement. The gap at the bottom can vary depending on the device height (screenshots below), but thankfully Duo's new [frameless implementation](https://github.com/bitwarden/mobile/pull/2956) will demote this flow to an edge case. ## Code changes <!--Explain the changes you've made to each file or major component. This should help the reviewer understand your changes--> <!--Also refer to any related changes or PRs in other repositories--> * **TwoFactorPage/Viewmodel:** Added height property and calculation using `DeviceDisplay.MainDisplayInfo` height & density ## Screenshots <!--Required for any UI changes. Delete if not applicable--> ![Screenshot 2024-01-29 at 12 38 59 PM](https://github.com/bitwarden/mobile/assets/59324545/cd34ecf8-e40e-44c8-8f89-30722b63fcb2) ![Screenshot 2024-01-29 at 12 39 11 PM](https://github.com/bitwarden/mobile/assets/59324545/6bc67a5a-2148-4c46-a8c2-172f79e2b96a) In the rare case we aren't able to obtain the available height for measuring, we default to 400dp as a safe minimum as seen here: ![Screenshot 2024-01-29 at 12 57 25 PM](https://github.com/bitwarden/mobile/assets/59324545/8d72305f-5b4e-42a0-9334-4c6604ce4f7b) ![Screenshot 2024-01-29 at 12 58 11 PM](https://github.com/bitwarden/mobile/assets/59324545/edd12b0c-62e7-4d6c-ad82-7499f32f872a) ## Before you submit - Please check for formatting errors (`dotnet format --verify-no-changes`) (required) - Please add **unit tests** where it makes sense to do so (encouraged but not required) - If this change requires a **documentation update** - notify the documentation team - If this change has particular **deployment requirements** - notify the DevOps team
GiteaMirror added the pull-request label 2025-11-26 23:38:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#3921