diff options
| author | Ben Sima <ben@bensima.com> | 2025-11-29 18:57:21 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-11-29 18:57:21 -0500 |
| commit | ddc0ba8090f07a997d7ccb215eaf0a8c7aef6169 (patch) | |
| tree | 5a569be56a45fbdd15913d3713911abd4d995f49 /Omni/Jr/Web | |
| parent | b46cd3444933e54ec2fa095cfeb45913427a44f9 (diff) | |
Inline description editing with HTMX view/edit swap
The implementation is complete. Here's a summary of the changes:
**Omni/Jr/Web.hs:** 1. Added new API routes for
`/tasks/:id/description/view` and `/tasks/:i 2. Added
`DescriptionViewPartial` and `DescriptionEditPartial` data
type 3. Added `ToHtml` instances for both partials with HTMX
attributes for v 4. Added handlers: `descriptionViewHandler`,
`descriptionEditHandler`, ` 5. Updated the TaskDetailPage render to
use the view partial instead of
**Omni/Jr/Web/Style.hs:** 1. Added `.description-block` container
styles 2. Added `.description-header` flex styles for header with
title and edi 3. Added `.edit-link` and `.cancel-link` styles (12px
font, blue for edi 4. Added dark mode overrides for the links
Task-Id: t-175
Diffstat (limited to 'Omni/Jr/Web')
| -rw-r--r-- | Omni/Jr/Web/Style.hs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index 10f7f73..c8bfaa5 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -395,6 +395,19 @@ cardStyles = do margin (px 0) (px 0) (px 0) (px 0) color "#374151" fontSize (px 13) + ".description-block" ? do + pure () + ".description-header" ? do + display flex + justifyContent spaceBetween + alignItems center + marginBottom (px 8) + (".description-header" |> "h3") ? do + margin (px 0) (px 0) (px 0) (px 0) + ".edit-link" <> ".cancel-link" ? do + fontSize (px 12) + color "#0066cc" + ".cancel-link" ? color "#dc2626" ".diff-block" ? do maxHeight (px 600) overflowY auto @@ -1412,6 +1425,8 @@ darkModeStyles = color "#f3f4f6" ".edit-description" ? borderTopColor "#374151" (".edit-description" |> "summary") ? color "#60a5fa" + ".edit-link" ? color "#60a5fa" + ".cancel-link" ? color "#f87171" ".description-textarea" ? do backgroundColor "#374151" borderColor "#4b5563" |
