-
Notifications
You must be signed in to change notification settings - Fork 119
fix: replace hand-rolled badges with DS::Pill in admin users view #1988
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,10 +74,7 @@ | |
| <%= t(".table.trial_ends_at") %>: <%= sub.trial_ends_at&.to_fs(:long) || t(".not_available") %> | ||
| </span> | ||
| <% elsif sub %> | ||
| <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium | ||
| <%= sub.active? ? "bg-success/10 text-success" : "bg-surface text-secondary" %>"> | ||
| <%= sub.status.humanize %> | ||
| </span> | ||
| <%= render DS::Pill.new(label: sub.status.humanize, tone: sub.active? ? :success : :neutral) %> | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use badge mode for these pills ( At Line 77 and Lines 191-203, Proposed patch-<%= render DS::Pill.new(label: sub.status.humanize, tone: sub.active? ? :success : :neutral) %>
+<%= render DS::Pill.new(label: sub.status.humanize, tone: sub.active? ? :success : :neutral, marker: false, size: :sm) %>
-<%= render DS::Pill.new(label: t(".roles.guest"), tone: :neutral) %>
+<%= render DS::Pill.new(label: t(".roles.guest"), tone: :neutral, marker: false, size: :sm) %>
-<%= render DS::Pill.new(label: t(".roles.member"), tone: :neutral) %>
+<%= render DS::Pill.new(label: t(".roles.member"), tone: :neutral, marker: false, size: :sm) %>
-<%= render DS::Pill.new(label: t(".roles.admin"), tone: :neutral) %>
+<%= render DS::Pill.new(label: t(".roles.admin"), tone: :neutral, marker: false, size: :sm) %>
-<%= render DS::Pill.new(label: t(".roles.super_admin"), tone: :success) %>
+<%= render DS::Pill.new(label: t(".roles.super_admin"), tone: :success, marker: false, size: :sm) %>Also applies to: 191-191, 195-195, 199-199, 203-203 🤖 Prompt for AI Agents |
||
| <% else %> | ||
| <span class="text-xs text-secondary"><%= t(".no_subscription") %></span> | ||
| <% end %> | ||
|
|
@@ -191,27 +188,19 @@ | |
| <%= settings_section title: t(".role_descriptions_title"), collapsible: true, open: true do %> | ||
| <div class="space-y-3 text-sm"> | ||
| <div class="flex items-start gap-3"> | ||
| <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-surface text-primary shrink-0"> | ||
| <%= t(".roles.guest") %> | ||
| </span> | ||
| <%= render DS::Pill.new(label: t(".roles.guest"), tone: :neutral) %> | ||
| <p class="text-secondary"><%= t(".role_descriptions.guest") %></p> | ||
| </div> | ||
| <div class="flex items-start gap-3"> | ||
| <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-surface text-primary shrink-0"> | ||
| <%= t(".roles.member") %> | ||
| </span> | ||
| <%= render DS::Pill.new(label: t(".roles.member"), tone: :neutral) %> | ||
| <p class="text-secondary"><%= t(".role_descriptions.member") %></p> | ||
| </div> | ||
| <div class="flex items-start gap-3"> | ||
| <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-surface text-primary shrink-0"> | ||
| <%= t(".roles.admin") %> | ||
| </span> | ||
| <%= render DS::Pill.new(label: t(".roles.admin"), tone: :neutral) %> | ||
| <p class="text-secondary"><%= t(".role_descriptions.admin") %></p> | ||
| </div> | ||
| <div class="flex items-start gap-3"> | ||
| <span class="inline-flex items-center px-2 py-0.5 rounded text-xs font-medium bg-success/10 text-success shrink-0"> | ||
| <%= t(".roles.super_admin") %> | ||
| </span> | ||
| <%= render DS::Pill.new(label: t(".roles.super_admin"), tone: :success) %> | ||
| <p class="text-secondary"><%= t(".role_descriptions.super_admin") %></p> | ||
| </div> | ||
| </div> | ||
|
|
||
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.
DS::Pilldefaults to marker mode (marker: true) with a visible dot (show_dot: true), but these replacements are for plain badges that previously rendered normal-case text without a dot. As written, labels like subscription status and role names now render as marker chips (uppercase styling + dot), which is a visible regression from the prior UI and inconsistent with existing badge usages that passmarker: false(and oftenshow_dot: false).Useful? React with 👍 / 👎.