Merge branch 'main' into relative-tray

* main:
  Use link, not button
  Add notification settings link
This commit is contained in:
Andy Smith
2025-05-22 11:35:58 -05:00
3 changed files with 32 additions and 8 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
@layer components {
.btn {
--transition: 300ms ease;
--transition: 150ms ease;
--btn-border-radius: 2em;
align-items: center;
+21 -3
View File
@@ -80,7 +80,7 @@
.tray__actions {
--hover-size: 0;
align-items: center;
align-items: stretch;
border: 1px dashed color-mix(in srgb, var(--color-white) 40%, var(--color-ink));
border-radius: 0.5em;
color: var(--color-ink-inverted);
@@ -105,6 +105,25 @@
transition: none;
}
/* Get the circle buttons to be full-height without magic numbers */
form {
aspect-ratio: 1;
.btn {
block-size: 100%;
inline-size: 100%;
}
}
.btn {
opacity: 0.66;
&:hover,
&:focus-visible {
opacity: 1;
}
}
@media (prefers-color-scheme: dark) {
.btn--reversed {
color: var(--color-ink);
@@ -123,7 +142,6 @@
inset: auto 0 0 0;
padding: 0;
position: absolute;
z-index: 6;
.tray[open] &,
.tray:not(:has(.tray__item)) &,
@@ -276,7 +294,7 @@
}
&:not(:has(.card--notification)) {
.tray__notification-read_action {
.tray__notification-read-action {
visibility: hidden;
}
}
+10 -4
View File
@@ -15,16 +15,22 @@
<div class="tray__actions">
<%= button_to read_all_notifications_path,
class: "tray__notification-read_action btn btn--reversed fill-transparent borderless flex-item-justify-start shadow txt-xx-small",
class: "tray__notification-read-action btn btn--reversed fill-transparent borderless flex-item-justify-start shadow txt-xx-small",
title: "Mark all as read",
data: { action: "click->dialog#close", turbo_frame: "notifications" } do %>
<%= icon_tag "check" %> <span class="for-screen-reader">Mark all read</span>
<%= icon_tag "check" %>
<% end %>
<%= link_to tag.span("Notifications"), notifications_path,
class: "btn btn--reversed borderless fill-transparent translucent shadow center txt-uppercase txt-x-small full-width",
class: "btn btn--reversed borderless fill-transparent shadow center txt-uppercase txt-x-small full-width",
data: { action: "click->dialog#close" } %>
<span class="btn btn--placeholder txt-xx-small borderless"></span>
<%= link_to settings_notifications_path,
class: "tray__notification-settings-action btn btn--reversed fill-transparent borderless flex-item-justify-start shadow txt-xx-small",
title: "Notification settings",
data: { action: "click->dialog#close" } do %>
<%= icon_tag "settings" %>
<% end %>
</div>
<button class="tray__expander" data-action="dialog#toggle" aria-label="Expand notifications stack"></button>