diff options
| author | Ben Sima <ben@bensima.com> | 2025-12-01 21:38:17 -0500 |
|---|---|---|
| committer | Ben Sima <ben@bensima.com> | 2025-12-01 21:38:17 -0500 |
| commit | 7da1c7e717af3cadf927b5f6efb253f0d10423a8 (patch) | |
| tree | e6d52326215026a5cc1002a06f68cbd6281b1b6f /Omni/Jr/Web/Style.hs | |
| parent | 437a204017c7b357c3fc4dcc8c23151a288d1a8e (diff) | |
Make complexity badge editable on task detail page
- Add ComplexityForm and ComplexityBadgePartial types
- Add /tasks/:id/complexity POST endpoint
- Add complexityBadgeWithForm component with dropdown
- Add complexity dropdown JS for keyboard navigation
- Add CSS styles for complexity dropdown
- Always show complexity badge (Set Complexity if none)
Task-Id: t-219
Diffstat (limited to 'Omni/Jr/Web/Style.hs')
| -rw-r--r-- | Omni/Jr/Web/Style.hs | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/Omni/Jr/Web/Style.hs b/Omni/Jr/Web/Style.hs index c385ac7..0f4b300 100644 --- a/Omni/Jr/Web/Style.hs +++ b/Omni/Jr/Web/Style.hs @@ -714,6 +714,54 @@ statusBadges = do ".badge-complexity-5" ? do backgroundColor "#fee2e2" color "#991b1b" + ".badge-complexity-none" ? do + backgroundColor "#f3f4f6" + color "#6b7280" + ".complexity-badge-dropdown" ? do + position relative + display inlineBlock + ".complexity-badge-clickable" ? do + cursor pointer + Stylesheet.key "user-select" ("none" :: Text) + ".complexity-badge-clickable" # hover ? do + opacity 0.85 + ".complexity-dropdown-menu" ? do + display none + position absolute + left (px 0) + top (pct 100) + marginTop (px 2) + backgroundColor white + borderRadius (px 4) (px 4) (px 4) (px 4) + Stylesheet.key "box-shadow" ("0 2px 8px rgba(0,0,0,0.15)" :: Text) + zIndex 100 + padding (px 4) (px 4) (px 4) (px 4) + minWidth (px 100) + ".complexity-badge-dropdown.open" |> ".complexity-dropdown-menu" ? do + display block + ".complexity-option-form" ? do + margin (px 0) (px 0) (px 0) (px 0) + padding (px 0) (px 0) (px 0) (px 0) + ".complexity-dropdown-option" ? do + display block + width (pct 100) + textAlign (alignSide sideLeft) + margin (px 2) (px 0) (px 2) (px 0) + border (px 0) none transparent + cursor pointer + transition "opacity" (ms 150) ease (sec 0) + ".complexity-dropdown-option" # hover ? do + opacity 0.7 + ".complexity-dropdown-option" # focus ? do + opacity 0.85 + Stylesheet.key "outline" ("2px solid #0066cc" :: Text) + Stylesheet.key "outline-offset" ("1px" :: Text) + ".complexity-dropdown-option.selected" ? do + Stylesheet.key "outline" ("2px solid #0066cc" :: Text) + Stylesheet.key "outline-offset" ("1px" :: Text) + ".complexity-badge-clickable" # focus ? do + Stylesheet.key "outline" ("2px solid #0066cc" :: Text) + Stylesheet.key "outline-offset" ("2px" :: Text) buttonStyles :: Css buttonStyles = do |
