From a6c692affec63ba5b1b4ebe3fed188fe59d3bbad Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 15 Oct 2025 14:02:08 -0500 Subject: [PATCH] Just close as done --- app/assets/stylesheets/expander.css | 111 -------------------- app/views/cards/container/_closure.html.erb | 17 +-- 2 files changed, 3 insertions(+), 125 deletions(-) delete mode 100644 app/assets/stylesheets/expander.css diff --git a/app/assets/stylesheets/expander.css b/app/assets/stylesheets/expander.css deleted file mode 100644 index 0182f6497..000000000 --- a/app/assets/stylesheets/expander.css +++ /dev/null @@ -1,111 +0,0 @@ -/* https://nerdy.dev/open-and-close-transitions-for-the-details-element */ - -.expander { - --expander-height: calc(1em + 1lh); - --expander-width: 11ch; - --expander-radius: calc(var(--expander-height) / 2); - --expander-duration: 150ms; - - interpolate-size: allow-keywords; - position: relative; - z-index: 1; -} - -.expander__button { - --btn-border-radius: var(--expander-radius); - - align-items: center; - block-size: var(--expander-height); - cursor: pointer; - display: flex; - inline-size: var(--expander-width); - justify-content: flex-start; - padding-inline: 1.5ch; - position: relative; - white-space: nowrap; - z-index: 1; - - &::-webkit-details-marker { - display: none; - } - - [open] & { - filter: none; - } - - .icon { - font-size: 1ch; - } -} - -.expander__content { - --btn-border-radius: var(--expander-radius); - - align-items: stretch; - border-radius: var(--expander-radius); - flex-direction: column; - filter: none; - gap: 0; - padding-block-start: var(--expander-height); - - &:hover { - box-shadow: none; - } -} - -/* For browsers that support animation */ -@supports selector(details::details-content) { - .expander::details-content { - --btn-border-radius: var(--expander-radius); - - block-size: var(--expander-height); - border-radius: var(--expander-radius); - inset: 0 auto auto 0; - inline-size: var(--expander-width); - overflow: clip; - position: absolute; - transition: content-visibility var(--expander-duration) allow-discrete, block-size var(--expander-duration), inline-size var(--expander-duration); - } - - .expander[open]::details-content { - block-size: auto; - inline-size: auto; - } - - .expander__content { - min-inline-size: var(--expander-width); - } -} - -/* Fallback for browsers that don't support animation */ -@supports not selector(details::details-content) { - .expander__content { - border-radius: var(--expander-radius); - inset: 0 auto auto 0; - min-inline-size: var(--expander-width); - position: absolute; - - [open] & { - block-size: auto; - inline-size: auto; - } - } -} - -.expander__item { - --btn-background: var(--card-color); - --btn-border-radius: 0.3em; - --btn-border-size: 0; - --btn-font-weight: 500; - --btn-padding: var(--inline-space-half) var(--inline-space); - - inline-size: calc(100% + var(--inline-space-double)); - margin-inline-start: calc(-1 * var(--inline-space)); - justify-content: flex-start; - white-space: nowrap; - - /* &:hover, - &:focus-visible { - background-color: oklch(var(--lch-canvas) / 15%); - } */ -} diff --git a/app/views/cards/container/_closure.html.erb b/app/views/cards/container/_closure.html.erb index 772b86f5e..80a8751a5 100644 --- a/app/views/cards/container/_closure.html.erb +++ b/app/views/cards/container/_closure.html.erb @@ -7,19 +7,9 @@ <% end %> <% else %> -
- - Close as - <%= icon_tag "caret-down" %> - -
- <% Closure::Reason.labels.each do |label| %> - <%= button_to card_closure_path(card, reason: label), class: "expander__item btn" do %> - <%= label %> - <% end %> - <% end %> -
-
+ <%= button_to card_closure_path(card, reason: "Done"), class: "btn borderless" do %> + Mark as Done + <% end %> <% if card.entropic? && card.open? %>
Closes as “Not Now” <%= local_datetime_tag(card.entropy.auto_clean_at, style: :indays) -%> if there’s no activity. @@ -27,4 +17,3 @@ <% end %> <% end %>
-