[PR #5480] [MERGED] [PM-23379] bug: custom fields: hide or show move up or down actions depending on the items' index #25181

Closed
opened 2026-04-17 00:54:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/5480
Author: @gabrbrand
Created: 7/3/2025
Status: Merged
Merged: 4/8/2026
Merged by: @david-livefront

Base: mainHead: custom-field-move-actions-visibility


📝 Commits (8)

  • 7325f53 custom fields: hide or show move up or down actions depending on the items' index
  • c3627b6 Merge branch 'main' into custom-field-move-actions-visibility
  • afb7995 Add back index checks
  • 439ee8c Fix line-limit breakage
  • 7989b7d Use ImmutableList
  • ef6d615 Adjust failing test
  • 5d300dc Add tests
  • 5734daa Add missing comma

📊 Changes

3 files changed (+139 additions, -23 deletions)

View changed files

📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditAdditionalOptions.kt (+6 -4)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditCustomField.kt (+27 -14)
📝 app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt (+106 -5)

📄 Description

📔 Objective

Currently move up and down actions are displayed for all custom fields, although no action is triggered in some scenarios.
This PR hides the corresponding action, if it's not needed for the specific field.

  • When only one custom field is present no move actions are displayed.
  • When two fields are added only move down for the first or move up for the last is displayed.
  • When there are three or more items both actions are displayed for fields between the first and the last.

📸 Screenshots

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/5480 **Author:** [@gabrbrand](https://github.com/gabrbrand) **Created:** 7/3/2025 **Status:** ✅ Merged **Merged:** 4/8/2026 **Merged by:** [@david-livefront](https://github.com/david-livefront) **Base:** `main` ← **Head:** `custom-field-move-actions-visibility` --- ### 📝 Commits (8) - [`7325f53`](https://github.com/bitwarden/android/commit/7325f53fe225226a933abe645f99c62adfb40499) custom fields: hide or show move up or down actions depending on the items' index - [`c3627b6`](https://github.com/bitwarden/android/commit/c3627b60f6c5c76ed0f62ee0c5d4b10e1d742f25) Merge branch 'main' into custom-field-move-actions-visibility - [`afb7995`](https://github.com/bitwarden/android/commit/afb79958443eeb283e284b69e03d6fe53f606b0b) Add back index checks - [`439ee8c`](https://github.com/bitwarden/android/commit/439ee8c3dc1e820ed12fb9439ce834aa7db51dec) Fix line-limit breakage - [`7989b7d`](https://github.com/bitwarden/android/commit/7989b7df4c3b073814364c31298b970a3347c1d1) Use ImmutableList - [`ef6d615`](https://github.com/bitwarden/android/commit/ef6d61595241be470d9db7da9ec4117b42553c9e) Adjust failing test - [`5d300dc`](https://github.com/bitwarden/android/commit/5d300dc81073ef868f48f074c55bf225c883e514) Add tests - [`5734daa`](https://github.com/bitwarden/android/commit/5734daa7224d32231534fa67b77cf545b65a9c85) Add missing comma ### 📊 Changes **3 files changed** (+139 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditAdditionalOptions.kt` (+6 -4) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditCustomField.kt` (+27 -14) 📝 `app/src/test/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditScreenTest.kt` (+106 -5) </details> ### 📄 Description ## 📔 Objective Currently move up and down actions are displayed for all custom fields, although no action is triggered in some scenarios. This PR hides the corresponding action, if it's not needed for the specific field. - When only one custom field is present no move actions are displayed. - When two fields are added only move down for the first or move up for the last is displayed. - When there are three or more items both actions are displayed for fields between the first and the last. ## 📸 Screenshots <img src="https://github.com/user-attachments/assets/f74ee248-87cd-44b8-a1bf-b090410d2e1f" width="250"> <img src="https://github.com/user-attachments/assets/5cffc202-3baa-40b0-8a2c-0e7623d653b6" width="250"> <img src="https://github.com/user-attachments/assets/d76ca22e-035f-48d2-b64d-f3dfb6fbd39c" width="250"> ## ⏰ 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 2026-04-17 00:54:05 -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#25181