[PR #6022] [MERGED] Add optional buttons to BitwardenEmptyContent #54461

Closed
opened 2026-05-01 19:59:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6022
Author: @SaintPatrck
Created: 10/13/2025
Status: Merged
Merged: 10/14/2025
Merged by: @david-livefront

Base: mainHead: bitwarden-empty-content_optional-buttons


📝 Commits (1)

  • ce5fa9f Add optional buttons to BitwardenEmptyContent

📊 Changes

2 files changed (+79 additions, -0 deletions)

View changed files

ui/src/main/kotlin/com/bitwarden/ui/platform/components/button/model/BitwardenButtonData.kt (+16 -0)
📝 ui/src/main/kotlin/com/bitwarden/ui/platform/components/content/BitwardenEmptyContent.kt (+63 -0)

📄 Description

🎟️ Tracking

N/A

📔 Objective

This commit enhances the BitwardenEmptyContent composable to support optional primary and secondary action buttons.

A new data class, BitwardenButtonData, is introduced to encapsulate the data required for rendering a button, including its label, click action, and test tag.

The BitwardenEmptyContent composable has been updated to accept optional BitwardenButtonData for a primary (filled) and a secondary (outlined) button. When provided, these buttons are displayed below the main content text. The preview for this component has also been updated to demonstrate the new button functionality.

📸 Screenshots

Before After

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/6022 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 10/13/2025 **Status:** ✅ Merged **Merged:** 10/14/2025 **Merged by:** [@david-livefront](https://github.com/david-livefront) **Base:** `main` ← **Head:** `bitwarden-empty-content_optional-buttons` --- ### 📝 Commits (1) - [`ce5fa9f`](https://github.com/bitwarden/android/commit/ce5fa9f510e5330d56cf3b7c14cba28bf208dd52) Add optional buttons to BitwardenEmptyContent ### 📊 Changes **2 files changed** (+79 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `ui/src/main/kotlin/com/bitwarden/ui/platform/components/button/model/BitwardenButtonData.kt` (+16 -0) 📝 `ui/src/main/kotlin/com/bitwarden/ui/platform/components/content/BitwardenEmptyContent.kt` (+63 -0) </details> ### 📄 Description ## 🎟️ Tracking N/A ## 📔 Objective This commit enhances the `BitwardenEmptyContent` composable to support optional primary and secondary action buttons. A new data class, `BitwardenButtonData`, is introduced to encapsulate the data required for rendering a button, including its label, click action, and test tag. The `BitwardenEmptyContent` composable has been updated to accept optional `BitwardenButtonData` for a primary (filled) and a secondary (outlined) button. When provided, these buttons are displayed below the main content text. The preview for this component has also been updated to demonstrate the new button functionality. ## 📸 Screenshots | Before | After | |--------|--------| | <img width="365" src="https://github.com/user-attachments/assets/67290924-4157-4ba6-8a94-2e0ceefaa5a3" /> | <img width="365" src="https://github.com/user-attachments/assets/ff256c39-9ccb-4ca3-921d-ff9f1464c21b" /> | ## ⏰ 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-05-01 19:59: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#54461