Skip to content

feat: detail_row value styling (font size/weight/color/family + overflow) - #12

Merged
ajianaz merged 1 commit into
developfrom
feat/detail-row-value-style
Jul 27, 2026
Merged

feat: detail_row value styling (font size/weight/color/family + overflow)#12
ajianaz merged 1 commit into
developfrom
feat/detail-row-value-style

Conversation

@ajianaz

@ajianaz ajianaz commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Makes the value text in detail_row fully styleable — for both hand-written widgets and JSON-driven UI.

🎨 What changed

CofluiDetailRow (native)

New optional props:

  • valueStyle: TextStyle? — base style (full control: family, letterSpacing, decoration, …)
  • valueFontSize: double?
  • valueFontWeight: FontWeight?
  • valueFontFamily: String?
  • valueColor: Color? (kept for backward compat — merges on top of valueStyle)
  • valueMaxLines: int?
  • valueOverflow: TextOverflow?

Merge order: default typography → valueStyle → shorthand overrides → final.

Dynamic-UI detail_row builder

Same options via JSON props:

{
  "type": "detail_row",
  "props": {
    "icon": "payments",
    "label": "Amount",
    "value": "Rp 1.000.000",
    "valueFontSize": 20,
    "valueFontWeight": "bold",
    "valueColor": "#088ECE",
    "valueMaxLines": 1,
    "valueOverflow": "ellipsis"
  }
}
  • valueFontWeight: "bold" | "normal" | "w500" | 600 | "semibold" | …
  • valueOverflow: "ellipsis" | "clip" | "visible" | "fade"

✅ Quality

  • 276/276 tests pass (272 + 4 new)
  • dart analyze lib = 0 issues
  • Backward-compatible (valueColor and highlight still work)

Breaking

None — all new fields are optional with defaults that match prior behavior.

…nes/overflow)

CofluiDetailRow value is now fully styleable for both native + JSON use:
- valueStyle (TextStyle? base) + shorthand merges: valueFontSize,
  valueFontWeight, valueFontFamily, valueColor
- valueMaxLines, valueOverflow (clip/ellipsis/visible/fade)

Dynamic-UI detail_row builder exposes the same via JSON props:
  valueColor (hex), valueFontSize, valueFontWeight (name/number),
  valueMaxLines, valueOverflow (ellipsis/clip/visible/fade)

Tests: 276/276 pass (272 + 4 new). dart analyze lib clean.
Backward-compatible: valueColor still works, highlight still works.
@github-actions

Copy link
Copy Markdown

🌐 Preview deployed: https://3a84afc1.coflui.pages.dev

@ajianaz
ajianaz merged commit 450cec7 into develop Jul 27, 2026
1 check passed
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