-
Notifications
You must be signed in to change notification settings - Fork 927
Add optional buttons to BitwardenEmptyContent #6022
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add optional buttons to BitwardenEmptyContent #6022
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6022 +/- ##
=======================================
Coverage 84.59% 84.59%
=======================================
Files 722 722
Lines 54897 54919 +22
Branches 7581 7583 +2
=======================================
+ Hits 46440 46461 +21
Misses 5800 5800
- Partials 2657 2658 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| * @param testTag The test tag for the button | ||
| * @param onClick The click listener for the button | ||
| */ | ||
| data class EmptyContentButton( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make this more generic?
I could see this being used elsewhere.
| */ | ||
| data class EmptyContentButton( | ||
| val label: Text, | ||
| val testTag: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could default null?
I can go either way.
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.
a902621 to
ce5fa9f
Compare

🎟️ Tracking
N/A
📔 Objective
This commit enhances the
BitwardenEmptyContentcomposable 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
BitwardenEmptyContentcomposable has been updated to accept optionalBitwardenButtonDatafor 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
⏰ Reminders before review
🦮 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