Skip to content

refactor(ui): text styles from QueryaTextStyles, shadcn TextExtension hidden - #1468

Merged
ZhuchkaTriplesix merged 4 commits into
devfrom
issue/1465-text-styles
Oct 11, 2026
Merged

ZhuchkaTriplesix merged 4 commits into
devfrom
issue/1465-text-styles

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Step 2a of #1465 (text styles; Gap is the next PR).

shadcn's TextExtension (Text('x').small().muted(), ~1000 call sites) is replaced by QueryaTextStyles in lib/shared/widgets/querya_text.dart: xSmall, small, base, large, medium, semiBold, bold, muted, foreground. They merge a TextStyle into the ambient DefaultTextStyle exactly as shadcn's WrappedText did, with the sizes the app already used (12 / 14 / 16 / 18); the UI scale still comes through the MediaQuery text scaler. Colours are read from the theme colour scheme for now (step 3 moves them to our own types).

Call sites do not change. To avoid an ambiguous extension, widgets.dart and every unprefixed package:shadcn_flutter/shadcn_flutter.dart import (91 files incl. tests) now say hide TextExtension; files that used the extensions through a direct shadcn import got an import of querya_text.dart.

Tests: querya_text_test.dart (sizes, weights, chaining, colours).

…xtension hidden

xSmall / small / base / large / medium / semiBold / bold / muted /
foreground are a kit extension over DefaultTextStyle with the sizes the
app already used. The widgets.dart barrel and every direct shadcn import
hide shadcn's TextExtension, so call sites are unchanged.

Refs #1465
@github-actions github-actions Bot added epic Epic / umbrella issue frontend Theme parser epic label: frontend ui User interface components and widgets labels Oct 11, 2026
An extension from a prefixed import still applies implicitly, so the 27
files importing shadcn as shadcn saw both extensions and every chained
modifier was ambiguous. They now hide it too. QueryaTextStyles also gets
ellipsis() (one line, cut), which one call site used.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit edbb109 into dev Oct 11, 2026
15 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/1465-text-styles branch October 11, 2026 15:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

epic Epic / umbrella issue frontend Theme parser epic label: frontend ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant