From a4ff97c4acfcb178fe4b8ffefb2067776da01d82 Mon Sep 17 00:00:00 2001 From: Josh Adam Date: Tue, 17 Sep 2024 11:27:04 -0500 Subject: [PATCH] refactor: Updated to use more of a pill style --- app/components/clipboard_component.html.erb | 2 +- .../row/row_contents_component.html.erb | 54 +++++++++++-------- .../viral/page_header_component.html.erb | 15 ++++-- 3 files changed, 44 insertions(+), 27 deletions(-) diff --git a/app/components/clipboard_component.html.erb b/app/components/clipboard_component.html.erb index be59efdb31..d1eadb6c08 100644 --- a/app/components/clipboard_component.html.erb +++ b/app/components/clipboard_component.html.erb @@ -13,7 +13,7 @@ aria-label="<%= t("components.clipboard.title") %>" data-clipboard-target="button" class=" - p-1 text-sm font-medium bg-white border rounded-lg text-slate-900 + p-1 text-sm font-medium bg-white border rounded-full text-slate-900 border-slate-200 focus:outline-none hover:bg-slate-100 hover:text-primary-700 focus:z-10 focus:ring-4 focus:ring-slate-100 dark:focus:ring-slate-700 dark:bg-slate-800 dark:text-slate-400 dark:border-slate-600 diff --git a/app/components/namespace_tree/row/row_contents_component.html.erb b/app/components/namespace_tree/row/row_contents_component.html.erb index 4f44e99271..1044509900 100644 --- a/app/components/namespace_tree/row/row_contents_component.html.erb +++ b/app/components/namespace_tree/row/row_contents_component.html.erb @@ -26,31 +26,41 @@
-
-
- <% if @namespace.type == "Group" %> - <%= link_to @namespace.name, group_path(@namespace), data: { turbo: false } %> - <% else %> - <%= link_to @namespace.name, - project_samples_path(@namespace.project), - data: { - turbo: false, - } %> - <% end %> - <%= viral_pill( - text: - t( - :"members.access_levels.level_#{Member.effective_access_level(@namespace, Current.user)}", - ), - color: "transparent", - border: true, - classes: "ml-2", - ) %>
- <%= render ClipboardComponent.new(value: @namespace.puid) do %> -

<%= @namespace.puid %>

+
+ <% if @namespace.type == "Group" %> + <%= link_to @namespace.name, group_path(@namespace), data: { turbo: false } %> + <% else %> + <%= link_to @namespace.name, + project_samples_path(@namespace.project), + data: { + turbo: false, + } %> <% end %> + + <%= render ClipboardComponent.new(value: @namespace.puid) do %> +

<%= @namespace.puid %>

+ <% end %> +
+ <%= viral_pill( + text: + t( + :"members.access_levels.level_#{Member.effective_access_level(@namespace, Current.user)}", + ), + color: "transparent", + border: true, + classes: "ml-2", + ) %>
+
+

+ <%= @namespace.description %> +

diff --git a/app/components/viral/page_header_component.html.erb b/app/components/viral/page_header_component.html.erb index 200a79866d..d220778737 100644 --- a/app/components/viral/page_header_component.html.erb +++ b/app/components/viral/page_header_component.html.erb @@ -6,15 +6,22 @@
<% if @id %> -
+

<%= title %>

- <%= render ClipboardComponent.new(value: id) do %> - <%= viral_pill(text: id, color: id_color, classes: "ml-2") %> - <% end %> + + <%= render ClipboardComponent.new(value: id) do %> +

<%= id %>

+ <% end %> +
<% else %>