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

Closed
opened 2026-04-18 13:48:04 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/2967
Author: @mpbw2
Created: 1/29/2024
Status: Merged
Merged: 1/29/2024
Merged by: @mpbw2

Base: feature/maui-migrationHead: feature/maui-migration-duo2fa


📝 Commits (5)

  • dd3d036 workaround for sliding elements in duo 2fa flow
  • 69688cf restrict workaround to Android
  • c2753d5 restrict workaround to Android
  • 80df523 Revert "restrict workaround to Android"
  • e893447 Revert "restrict workaround to Android"

📊 Changes

2 files changed (+16 additions, -2 deletions)

View changed files

📝 src/Core/Pages/Accounts/TwoFactorPage.xaml (+2 -2)
📝 src/Core/Pages/Accounts/TwoFactorPageViewModel.cs (+14 -0)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/2967 **Author:** [@mpbw2](https://github.com/mpbw2) **Created:** 1/29/2024 **Status:** ✅ Merged **Merged:** 1/29/2024 **Merged by:** [@mpbw2](https://github.com/mpbw2) **Base:** `feature/maui-migration` ← **Head:** `feature/maui-migration-duo2fa` --- ### 📝 Commits (5) - [`dd3d036`](https://github.com/bitwarden/android/commit/dd3d03675650575f7b095af30da03c8f2c94a1c2) workaround for sliding elements in duo 2fa flow - [`69688cf`](https://github.com/bitwarden/android/commit/69688cfb98e8e3e17812f126b4fd90ffd2ac3cf8) restrict workaround to Android - [`c2753d5`](https://github.com/bitwarden/android/commit/c2753d5dc4960aeacdb4c798e7273ca86c08881d) restrict workaround to Android - [`80df523`](https://github.com/bitwarden/android/commit/80df5235b1a9dfc07c0e32000f01356368a75d91) Revert "restrict workaround to Android" - [`e893447`](https://github.com/bitwarden/android/commit/e8934476df2aa7a89f4af0fa50b42d805ffea729) Revert "restrict workaround to Android" ### 📊 Changes **2 files changed** (+16 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `src/Core/Pages/Accounts/TwoFactorPage.xaml` (+2 -2) 📝 `src/Core/Pages/Accounts/TwoFactorPageViewModel.cs` (+14 -0) </details> ### 📄 Description ## 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-18 13:48:04 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#29930