Skip to content

Gs/factor out colors use new classh#2

Open
augyg wants to merge 15 commits intomasterfrom
gs/factor-out-colors_use_new_classh
Open

Gs/factor out colors use new classh#2
augyg wants to merge 15 commits intomasterfrom
gs/factor-out-colors_use_new_classh

Conversation

@augyg
Copy link
Copy Markdown
Contributor

@augyg augyg commented Mar 29, 2026

No description provided.

augyg and others added 15 commits February 20, 2026 14:26
Eliminate hardcoded colors throughout template components by adding Color
parameters to all template functions. All functions now have parameterized
versions (suffix ') with default wrappers maintaining backward compatibility.

Components updated:
- Buttons: navyBlueButton', primaryButton', primaryButtonImage', etc.
  - Convert custom CSS to proper ClasshSS properties (outline, ring, shadow)
  - Use transform field for scale animations on hover/active

- Lists: Add 5 color parameters to ListItemConfig
  - hoverColor, unreadColor, borderColor, textColor, subtextColor
  - Use ClasshSS border properties instead of custom CSS

- Dropdown: Add focusColor, bgColor, borderColor parameters
  - Use proper ClasshSS border and outline properties

- Searchbar: Add bgColor and textColor parameters
  - Replace Shadow_Button with Shadow_Md

- Containers: Use ClasshSS transform field for rotations
  - Replace custom "rotate-180" CSS with proper transform . rotate
  - Add smooth transitions with withTransition and withTiming

- Invitebar: Add bgColor, borderColor, textColor parameters
  - Use ClasshSS border and text color properties

- Shapes: Fix circle function to use TWSizeOrFraction instead of string

Technical improvements:
- Fix lens operators: use . for composition, .~ for setters (not C.. or C..~)
- Wrap transitionable values with noTransition or withTransition
- Update cabal version to support default-extensions
- Maintain backward compatibility with default color wrappers

All call sites remain unchanged due to wrapper functions with sensible defaults.
Add nix-shell development environment for local builds with ClasshSS
and reflex-classhss dependencies.

Changes:
- Add shell.nix with local package overrides for ClasshSS and reflex-classhss
- Add default.nix for package definition
- Add .gitignore to exclude dist-newstyle build artifacts
- Use shorthand lenses bw_b and bc_b directly instead of border . bw . b
- Fix bStyle to not use per-side lenses (applies to all borders)
- Change Cursor_Pointer to CursorPointer (correct constructor)
- Fix dropdown to use pattern matching instead of partial head function
- Remove unused emailClass function from invitebar
- Use showTW for color rendering in custom text color class
- Update bgColor params to WhenTW (WithTransition GradientColor)
- Update border color params to WhenTW (WithTransition Color)
- Update text color params to WhenTW Color
- Wrapper functions provide sensible defaults
- Primed functions accept full WhenTW types for user control
- Update type signatures from Color to ColorWithOpacity
- Update border color types from WithTransition Color to WithTransition ColorWithOpacity
- Wrap bare Color values with 'color' helper function
…lors

- Convert iconButton and iconButton' to use Classh instead of raw Tailwind
- Add iconButton' with bgCol and txtCol parameters for customization
- Rename old iconButton' to iconButtonEnabled for enabled/disabled state
- Use bright lavender (#A78BFA) default for better contrast on dark backgrounds
- Update Invitebar to use iconButtonEnabled
Apply text color to expand/collapse icon so it's visible on dark backgrounds
- Buttons.hs: Convert hex colors (00B9DA → Cyan C500), remove raw
  Tailwind from custom fields (hover:bg-primary-rich, ring-primary),
  add type-safe transform/scale setters, remove unused wrapper
  functions (secondaryIconButton, secondaryButton, primaryButtonImageDyn,
  primaryButtonImageText)

- Modal.hs: Convert #00004D → Slate C900, text-rose-500 → Rose C500,
  add parameterized modal' with overlay/content/border/text colors

- Dropdown.hs: Convert hex "00B9DA" → Cyan C500 for focus border

- Errors.hs: Convert text-opacity-70 → withOpacity (Rose C500) 70,
  add parameterized errorMessage'

- Invitebar.hs: Convert hex "E11D48" → Rose C600

- Lists.hs: Convert hex colors to Gray C200/C300
…tate

Add CollapsibleState sum type (Open | Closed) to collapsibleContainerWithImage
allowing callers to specify whether the container starts expanded or collapsed.
ClasshSS BoxMargin fields changed from TWSize to TWSizeOrFraction.
All margin setters (mt, mb, ml, mr, mx, my) now use twSize' N
instead of TWSize N.
Convert margin TWSize to twSize' for TWSizeOrFraction compatibility
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant