[PR #3843] [MERGED] PM-11214 change navoptions to support single top without retaining VM #4460

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

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/3843
Author: @dseverns-livefront
Created: 8/29/2024
Status: Merged
Merged: 9/3/2024
Merged by: @dseverns-livefront

Base: mainHead: PM-11214/screen-click-issue


📝 Commits (6)

  • 9c90b95 PM-11214 keep track of bottom nav state and prevent navigation if its the same
  • 4cce961 PM-11214 conditional nav options based on if the route is the same
  • 6e70ea3 SOS
  • 8dbb328 HAGSSYNY
  • cdeeccd pr feedback
  • 8ea7884 add more context docs

📊 Changes

5 files changed (+215 additions, -122 deletions)

View changed files

📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt (+52 -112)
📝 app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarViewModel.kt (+37 -6)
app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/model/VaultUnlockedNavBarTab.kt (+104 -0)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreenTest.kt (+8 -2)
📝 app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarViewModelTest.kt (+14 -2)

📄 Description

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-11214

📔 Objective

  • If the tab the user is already on is clicked again, popBack to the top of the graph, this unblocks interaction with the sub screens as mentioned in the defect.

NOTE Key difference is on the settings tab where tapping settings again will take you back to the start of the graph**
I do have another fix locked and loaded where the VM keeps hold of a SelectedBottomTab enum and no interaction with the navController takes place if its the currently selected one, this matches what is seen today in the settings screen where the user would just stay on the submenu view.

📸 Screenshots

https://github.com/user-attachments/assets/cecfe155-b13c-4f32-bf88-bbe938c9d74c

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation or informed the documentation team

🦮 Reviewer guidelines

  • 👍 (:+1:) or similar for great changes
  • 📝 (:memo:) or ℹ️ (:information_source:) for notes or general info
  • (:question:) for questions
  • 🤔 (:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed
    issue and could potentially benefit from discussion
  • 🎨 (:art:) for suggestions / improvements
  • (:x:) or ⚠️ (:warning:) for more significant problems or concerns needing attention
  • 🌱 (:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt
  • ⛏ (:pick:) for minor or nitpick changes

🔄 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/3843 **Author:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Created:** 8/29/2024 **Status:** ✅ Merged **Merged:** 9/3/2024 **Merged by:** [@dseverns-livefront](https://github.com/dseverns-livefront) **Base:** `main` ← **Head:** `PM-11214/screen-click-issue` --- ### 📝 Commits (6) - [`9c90b95`](https://github.com/bitwarden/android/commit/9c90b958f220aea9cc302a8e8b46d0812778e42a) PM-11214 keep track of bottom nav state and prevent navigation if its the same - [`4cce961`](https://github.com/bitwarden/android/commit/4cce961124315869bab012e6c3cda6b631a7d7e1) PM-11214 conditional nav options based on if the route is the same - [`6e70ea3`](https://github.com/bitwarden/android/commit/6e70ea3eaf66c6acd93cb7288bd173c486164217) SOS - [`8dbb328`](https://github.com/bitwarden/android/commit/8dbb328f2a11acb2874e56957bc47074a691378c) HAGSSYNY - [`cdeeccd`](https://github.com/bitwarden/android/commit/cdeeccd8c56a202e2015c2246a6ca9e022dffec5) pr feedback - [`8ea7884`](https://github.com/bitwarden/android/commit/8ea7884bf090fd0d9fc56f7a94da730e3b1af9d1) add more context docs ### 📊 Changes **5 files changed** (+215 additions, -122 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreen.kt` (+52 -112) 📝 `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarViewModel.kt` (+37 -6) ➕ `app/src/main/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/model/VaultUnlockedNavBarTab.kt` (+104 -0) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarScreenTest.kt` (+8 -2) 📝 `app/src/test/java/com/x8bit/bitwarden/ui/platform/feature/vaultunlockednavbar/VaultUnlockedNavBarViewModelTest.kt` (+14 -2) </details> ### 📄 Description ## 🎟️ Tracking https://bitwarden.atlassian.net/browse/PM-11214 <!-- Paste the link to the Jira or GitHub issue or otherwise describe / point to where this change is coming from. --> ## 📔 Objective - If the tab the user is already on is clicked again, popBack to the top of the graph, this unblocks interaction with the sub screens as mentioned in the defect. **NOTE** Key difference is on the settings tab where tapping settings again will take you back to the start of the graph** I do have another fix locked and loaded where the VM keeps hold of a `SelectedBottomTab` enum and no interaction with the navController takes place if its the currently selected one, this matches what is seen today in the settings screen where the user would just stay on the submenu view. <!-- Describe what the purpose of this PR is, for example what bug you're fixing or new feature you're adding. --> ## 📸 Screenshots https://github.com/user-attachments/assets/cecfe155-b13c-4f32-bf88-bbe938c9d74c <!-- Required for any UI changes; delete if not applicable. Use fixed width images for better display. --> ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation or informed the documentation team ## 🦮 Reviewer guidelines <!-- Suggested interactions but feel free to use (or not) as you desire! --> - 👍 (`:+1:`) or similar for great changes - 📝 (`:memo:`) or ℹ️ (`:information_source:`) for notes or general info - ❓ (`:question:`) for questions - 🤔 (`:thinking:`) or 💭 (`:thought_balloon:`) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion - 🎨 (`:art:`) for suggestions / improvements - ❌ (`:x:`) or ⚠️ (`:warning:`) for more significant problems or concerns needing attention - 🌱 (`:seedling:`) or ♻️ (`:recycle:`) for future improvements or indications of technical debt - ⛏ (`:pick:`) for minor or nitpick changes --- <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 2025-11-26 23:44:47 -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#4460