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

Open
opened 2025-11-27 00:14:36 -06: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: 🔄 Open

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


📝 Commits (1)

  • 7325f53 custom fields: hide or show move up or down actions depending on the items' index

📊 Changes

3 files changed (+30 additions, -24 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 (+24 -14)
📝 app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt (+0 -6)

📄 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:** 🔄 Open **Base:** `main` ← **Head:** `custom-field-move-actions-visibility` --- ### 📝 Commits (1) - [`7325f53`](https://github.com/bitwarden/android/commit/7325f53fe225226a933abe645f99c62adfb40499) custom fields: hide or show move up or down actions depending on the items' index ### 📊 Changes **3 files changed** (+30 additions, -24 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` (+24 -14) 📝 `app/src/main/kotlin/com/x8bit/bitwarden/ui/vault/feature/addedit/VaultAddEditViewModel.kt` (+0 -6) </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 2025-11-27 00:14: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#5803