From 0da84efd01b761157d7b69864b3ccaeafe703ed5 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Thu, 20 Mar 2025 16:52:56 -0500 Subject: [PATCH] Tray pins design --- app/assets/stylesheets/notifications.css | 5 ++ app/assets/stylesheets/pins.css | 59 ++++++++++++++----- app/assets/stylesheets/utilities.css | 7 +-- app/views/bubbles/pins/_pin.html.erb | 34 +++++++---- .../notifications/_notification.html.erb | 2 +- 5 files changed, 76 insertions(+), 31 deletions(-) diff --git a/app/assets/stylesheets/notifications.css b/app/assets/stylesheets/notifications.css index 7da4917b1..4ec8ff567 100644 --- a/app/assets/stylesheets/notifications.css +++ b/app/assets/stylesheets/notifications.css @@ -113,6 +113,11 @@ } } +.notification__meta { + font-size: 0.9em; + font-weight: 500; +} + .notification__title { padding-inline-end: calc(var(--inline-space-half) + 1.2em); } diff --git a/app/assets/stylesheets/pins.css b/app/assets/stylesheets/pins.css index fec7f7a28..2a50192cf 100644 --- a/app/assets/stylesheets/pins.css +++ b/app/assets/stylesheets/pins.css @@ -77,21 +77,6 @@ } } -.pin__content { - color: var(--color-ink); - border: 1px solid; - border-radius: 0.2em; - - .notificiations-list--read & { - border: 1px solid var(--color-subtle); - box-shadow: none; - } -} - -.pin__title { - padding-inline-end: calc(var(--inline-space-half) + 1.2em); -} - .pin-tray__expander { --hover-size: 0; --outline-size: 0; @@ -106,4 +91,48 @@ .pin-tray:has(.pin:only-child) & { display: none; } +} + +.pin__bucket { + background-color: var(--bubble-color); + font-weight: 800; + letter-spacing: 0.5ch; + padding: 0.3em 0.9em 0.3em 1em; +} + +.pin__content { + border: 0; + border-radius: 0.2em; + color: var(--color-ink); + overflow: clip; + padding: 1em 1em 1.2em; + + .notificiations-list--read & { + border: 1px solid var(--color-subtle); + box-shadow: none; + } +} + +.pin__header { + margin: -1em -1em auto; + padding: 0 0.3em 0 0; +} + +.pin__meta { + font-size: 0.9em; + font-weight: 500; +} + +.pin__stage { + --border-color: currentColor; + + padding: 0.2em 0.5em; +} + +.pin__tags { + color: var(--bubble-color); +} + +.pin__title { + margin-block-start: 0.3rem; } \ No newline at end of file diff --git a/app/assets/stylesheets/utilities.css b/app/assets/stylesheets/utilities.css index 76737e142..fab157427 100644 --- a/app/assets/stylesheets/utilities.css +++ b/app/assets/stylesheets/utilities.css @@ -8,8 +8,9 @@ --block-space-double: calc(var(--block-space) * 2); /* Text sizes */ - --text-x-small: 0.6rem; + --text-x-small: 0.7rem; --text-small: 0.8rem; + --txt-normal: 1rem; --text-medium: 1.2rem; --text-large: 1.5rem; --text-x-large: 1.8rem; @@ -35,7 +36,6 @@ .txt-alert { color: var(--color-marker); } .txt-undecorated { text-decoration: none; } .txt-tight-lines { line-height: 1.2; } -.txt-normal { font-weight: 400; font-style: normal; } .txt-nowrap { white-space: nowrap; } .txt-break { word-break: break-word; } .txt-uppercase { text-transform: uppercase; } @@ -102,7 +102,6 @@ -webkit-box-orient: vertical; display: -webkit-box; overflow: hidden; - padding-block-end: 0.2lh; text-overflow: clip; white-space: normal; } @@ -171,7 +170,7 @@ .fill-highlight { background-color: var(--color-highlight); } .fill-transparent { background-color: transparent; } -.translucent { opacity: var(--opacity, 0.5); } +.translucent { opacity: var(--opacity, 0.66); } /* Borders */ .border { border: var(--border-size, 1px) var(--border-style, solid) var(--border-color, var(--color-subtle)); } diff --git a/app/views/bubbles/pins/_pin.html.erb b/app/views/bubbles/pins/_pin.html.erb index ecde0aea1..5bfe6f0f1 100644 --- a/app/views/bubbles/pins/_pin.html.erb +++ b/app/views/bubbles/pins/_pin.html.erb @@ -1,23 +1,35 @@ <% cache pin do %> <%= tag.div id: dom_id(pin), class: "pin flex position-relative" do %> <%= link_to bucket_bubble_path(pin.bubble.bucket, pin.bubble), - class: "pin__content pad pad-inline-double shadow fill-white flex align-start txt-align-start gap flex-item-grow max-width", - style: "border-color: #{ pin.bubble.color }", - data: { action: "click->dialog#close", turbo_frame: "_top" } do %> -
- <%= bubble_title(pin.bubble) %> -
-
- <%= pin.bubble.bucket.name -%> - <%= " · #" if pin.bubble.tags.any? -%><%= pin.bubble.tags.map(&:title).join(", ") -%> + class: "pin__content shadow fill-white flex align-start txt-align-start gap flex-item-grow max-width", + data: { action: "click->dialog#close", turbo_frame: "_top" }, + style: "--bubble-color: #{ pin.bubble.color };" do %> +
+
+
+ <%= pin.bubble.bucket.name %>
<% if pin.bubble&.stage %> -
+ <%= pin.bubble&.stage&.name %> -
+ <% end %>
+ + <%= bubble_title(pin.bubble) %> + +
+
+ Updated <%= local_datetime_tag(pin.bubble.updated_at, style: :ago) -%> +
+ + <%= " · " if pin.bubble.tags.any? %> +
+ <%= "#" if pin.bubble.tags.any? %> + <%= pin.bubble.tags.map(&:title).join(", ") %> +
+
<% end %> <% end %> diff --git a/app/views/notifications/_notification.html.erb b/app/views/notifications/_notification.html.erb index 847e0393b..e0651b82a 100644 --- a/app/views/notifications/_notification.html.erb +++ b/app/views/notifications/_notification.html.erb @@ -13,7 +13,7 @@ <%= notification_body(notification) %> <% end %>
-
<%= notification.bubble.bucket.name %> · <%= local_datetime_tag(notification.created_at, style: :ago) %>
+
<%= notification.bubble.bucket.name %> · <%= local_datetime_tag(notification.created_at, style: :ago) %>
<% end %> <% end %>