[PR #5452] [MERGED] [PM-19779] Make Authenticator TOTP codes collapsible #5778

Closed
opened 2025-11-27 00:14:09 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5452
Author: @SaintPatrck
Created: 6/30/2025
Status: Merged
Merged: 7/2/2025
Merged by: @SaintPatrck

Base: mainHead: PM-19779/collapsable-totp-codes


📝 Commits (1)

  • 8c82e6d [PM-19779] Make Authenticator TOTP codes collapsable

📊 Changes

10 files changed (+612 additions, -104 deletions)

View changed files

📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt (+205 -98)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModel.kt (+58 -3)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/model/SharedCodesDisplayState.kt (+2 -0)
📝 authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/util/SharedVerificationCodesStateExtensions.kt (+7 -0)
authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/header/AuthenticatorExpandingHeader.kt (+88 -0)
📝 authenticator/src/main/res/values/strings.xml (+6 -2)
📝 authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreenTest.kt (+115 -1)
📝 authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModelTest.kt (+25 -0)
📝 authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/search/ItemSearchViewModelTest.kt (+3 -0)
📝 authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/util/SharedVerificationCodesStateTest.kt (+103 -0)

📄 Description

🎟️ Tracking

PM-19779

📔 Objective

This commit introduces an expanding header component, AuthenticatorExpandingHeader, and integrates it into the item listing screen.

  • The AuthenticatorExpandingHeader allows sections like "Local codes" and shared account sections to be expanded or collapsed by the user.
  • The item listing screen now uses this new header for both local codes and shared code sections.
  • The local codes section is expanded by default, while shared code sections are collapsed by default.
  • Item counts are now displayed in the headers for both local codes and shared accounts (e.g., "Local codes (3)", "user@example.com | bitwarden.com (5)").
  • Corresponding string resources for expand/collapse actions and updated header formats have been added.
  • Tests in ItemListingScreenTest.kt have been updated and new tests added to verify the functionality of the expanding headers and correct display of items based on header state.

📸 Screenshots

Coming soon!

Reminders before review

  • Contributor guidelines followed
  • All formatters and local linters executed and passed
  • Written new unit and / or integration tests where applicable
  • Protected functional changes with optionality (feature flags)
  • Used internationalization (i18n) for all UI strings
  • CI builds passed
  • Communicated to DevOps any deployment requirements
  • Updated any necessary documentation (Confluence, contributing docs) 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/5452 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 6/30/2025 **Status:** ✅ Merged **Merged:** 7/2/2025 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `PM-19779/collapsable-totp-codes` --- ### 📝 Commits (1) - [`8c82e6d`](https://github.com/bitwarden/android/commit/8c82e6d7c28f9fc42fbc4f3ff47693adc98cdf0d) [PM-19779] Make Authenticator TOTP codes collapsable ### 📊 Changes **10 files changed** (+612 additions, -104 deletions) <details> <summary>View changed files</summary> 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreen.kt` (+205 -98) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModel.kt` (+58 -3) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/model/SharedCodesDisplayState.kt` (+2 -0) 📝 `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/util/SharedVerificationCodesStateExtensions.kt` (+7 -0) ➕ `authenticator/src/main/kotlin/com/bitwarden/authenticator/ui/platform/components/header/AuthenticatorExpandingHeader.kt` (+88 -0) 📝 `authenticator/src/main/res/values/strings.xml` (+6 -2) 📝 `authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingScreenTest.kt` (+115 -1) 📝 `authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/itemlisting/ItemListingViewModelTest.kt` (+25 -0) 📝 `authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/search/ItemSearchViewModelTest.kt` (+3 -0) 📝 `authenticator/src/test/kotlin/com/bitwarden/authenticator/ui/authenticator/feature/util/SharedVerificationCodesStateTest.kt` (+103 -0) </details> ### 📄 Description ## 🎟️ Tracking PM-19779 ## 📔 Objective This commit introduces an expanding header component, `AuthenticatorExpandingHeader`, and integrates it into the item listing screen. - The `AuthenticatorExpandingHeader` allows sections like "Local codes" and shared account sections to be expanded or collapsed by the user. - The item listing screen now uses this new header for both local codes and shared code sections. - The local codes section is expanded by default, while shared code sections are collapsed by default. - Item counts are now displayed in the headers for both local codes and shared accounts (e.g., "Local codes (3)", "user@example.com | bitwarden.com (5)"). - Corresponding string resources for expand/collapse actions and updated header formats have been added. - Tests in `ItemListingScreenTest.kt` have been updated and new tests added to verify the functionality of the expanding headers and correct display of items based on header state. ## 📸 Screenshots Coming soon! ## ⏰ Reminders before review - Contributor guidelines followed - All formatters and local linters executed and passed - Written new unit and / or integration tests where applicable - Protected functional changes with optionality (feature flags) - Used internationalization (i18n) for all UI strings - CI builds passed - Communicated to DevOps any deployment requirements - Updated any necessary documentation (Confluence, contributing docs) 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-27 00:14:09 -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#5778