Skip to content

Commit

Permalink
[PLAY-1796] Dark Audit Multiple Users (#4139)
Browse files Browse the repository at this point in the history
**What does this PR do?** A clear and concise description with your
runway ticket url.
This PR adds dark mode to the number badge that goes along with Multiple
Users kit. We change the color of the badges halo from light to dark for
both react & rails.

**Screenshots:** Screenshots to visualize your addition/change
![Screenshot 2025-01-20 at 3 27
14 PM](https://github.com/user-attachments/assets/5e464ef7-fe65-4156-a48d-af3fa4380be5)


**How to test?** Steps to confirm the desired behavior:
1. Go to the [deployed
env](https://pr4139.playbook.beta.gm.powerapp.cloud/)
2. Search for 'Multiple Users
3. For both Rails/React switch to dark mode
4. See the badge '+2' change from a light border to dark.


#### Checklist:
- [x] **LABELS** Add a label: `enhancement`, `bug`, `improvement`, `new
kit`, `deprecated`, or `breaking`. See [Changelog &
Labels](https://github.com/powerhome/playbook/wiki/Changelog-&-Labels)
for details.
- [x] **DEPLOY** I have added the `milano` label to show I'm ready for a
review.
- [ ] **TESTS** I have added test coverage to my code.

---------

Co-authored-by: Gary Kang <[email protected]>
  • Loading branch information
yuriyivanenko and kangaree authored Jan 24, 2025
1 parent 57f235b commit b4c2e7f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ $pb_multiple_users_size_xxs: map-get($avatar-sizes, "xxs");
color: $primary;
font-weight: $bold;
font-size: $font_smallest - 1;

&.dark {
border: $pb_multiple_users_border_size solid $bg_dark;
}
}

.multiple_users_badge_xxs {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const MultipleUsers = (props: MultipleUsersProps): React.ReactElement => {

const itemClasses = classnames(
'pb_multiple_users_item',
dark && 'dark',
buildCss('multiple_users_badge', avatarSizeClass)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% end %>

<% if object.more_than_four %>
<div class="pb_multiple_users_item multiple_users_badge_<%= object.size %>">
<div class="pb_multiple_users_item multiple_users_badge_<%= object.size %><%= object.dark ? " dark" : "" %>">
<%= "+#{object.users.count - object.display_count}" %>
</div>
<% end %>
Expand Down

0 comments on commit b4c2e7f

Please sign in to comment.