summaryrefslogtreecommitdiff
path: root/Omni/Jr/Web
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-27 10:37:19 -0500
committerBen Sima <ben@bensima.com>2025-11-27 10:37:19 -0500
commita32a0210d17ed78ef653ee07d384041dbd10e5d2 (patch)
tree116ef66628b1e56b0eaec87b5129042f56b0a519 /Omni/Jr/Web
parent1bd4e550255c97180b0af10d28733623bd99e89b (diff)
Add multiline description editing in web UI
The implementation is complete and passing. Here's a summary of what was **Changes made:** 1. **Added POST endpoint** for `/tasks/:id/description` - updates the ta 2. **Added `DescriptionForm` type** with `FromForm` instance to parse th 3. **Added `taskDescriptionHandler`** that: - Receives the description text from the form - Treats empty/whitespace-only descriptions as `Nothing` - Uses `TaskCore.editTask` to update the task description 4. **Updated epic detail page** to include: - A collapsible "Edit Design" section using `<details>` element - A multiline `<textarea>` pre-populated with the current description - A "Save Design" button that submits to the new endpoint - Shows "No design document yet." when there's no description 5. **Added CSS styles** for the new elements: - `.edit-description` - styling for the collapsible edit section - `.description-textarea` - monospace font textarea for markdown edit - `.form-actions` - container for the submit button - Dark mode support for all new elements Task-Id: t-150.2
Diffstat (limited to 'Omni/Jr/Web')
-rw-r--r--Omni/Jr/Web/Style.hs29
1 files changed, 29 insertions, 0 deletions
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs
index d544e25..dbe1daa 100644
--- a/Omni/Jr/Web/Style.hs
+++ b/Omni/Jr/Web/Style.hs
@@ -473,6 +473,29 @@ formStyles = do
borderRadius (px 2) (px 2) (px 2) (px 2)
fontSize (px 13)
Stylesheet.key "resize" ("vertical" :: Text)
+ ".edit-description" ? do
+ marginTop (px 8)
+ padding (px 8) (px 0) (px 0) (px 0)
+ borderTop (px 1) solid "#e5e7eb"
+ (".edit-description" |> "summary") ? do
+ cursor pointer
+ color "#0066cc"
+ fontSize (px 13)
+ fontWeight (weight 500)
+ (".edit-description" |> "summary") # hover ? textDecoration underline
+ ".description-textarea" ? do
+ width (pct 100)
+ minHeight (px 250)
+ padding (px 8) (px 10) (px 8) (px 10)
+ border (px 1) solid "#d1d5db"
+ borderRadius (px 2) (px 2) (px 2) (px 2)
+ fontSize (px 13)
+ fontFamily ["SF Mono", "Monaco", "Consolas", "monospace"] [monospace]
+ lineHeight (em 1.5)
+ Stylesheet.key "resize" ("vertical" :: Text)
+ marginTop (px 8)
+ ".form-actions" ? do
+ marginTop (px 8)
activityTimelineStyles :: Css
activityTimelineStyles = do
@@ -733,6 +756,12 @@ darkModeStyles =
".md-inline-code" ? do
backgroundColor "#374151"
color "#f3f4f6"
+ ".edit-description" ? borderTopColor "#374151"
+ (".edit-description" |> "summary") ? color "#60a5fa"
+ ".description-textarea" ? do
+ backgroundColor "#374151"
+ borderColor "#4b5563"
+ color "#f3f4f6"
prefersDark :: Stylesheet.Feature
prefersDark =