refactor(frontend): button and icon components on tailwind-variants - #3985
Open
Kadrian wants to merge 3 commits into
Open
refactor(frontend): button and icon components on tailwind-variants#3985Kadrian wants to merge 3 commits into
Kadrian wants to merge 3 commits into
Conversation
first styled() slice; shared tv in src/js/tv.ts so the class merger knows text-tiny is a font size, not a colour
…ties font-size only matches the previous behaviour: small only shrank the icon, and the emotion theme set font sizes without a line-height
drops the text-tiny token and the createTV merge config it needed
Kadrian
requested review from
awildturtok and
thoniTUB
and removed request for
thoniTUB
August 27, 2026 15:43
thoniTUB
approved these changes
Aug 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second step of the emotion → tailwind migration:
src/js/button/*andsrc/js/icon/FaIconare emotion-free.text-xs…text-2xl), anything else is a literal (text-[11px]). No custom size tokens: tv's class merger classifies unknowntext-*names as colours and would drop them next to a colour class, literals are recognised as sizesBasicButton,IconButton,FaIcon: prop flags → tv variants. Where several flags conflict (tiny/small/large, colour flags) the variant order encodes the old precedence (later wins), noted inline; FaIcon's colour priority stays a small functionPrimaryButton,TransparentButton,DestroyButton,SelectFileButton,BadgeToggleButton,PreviewButton,QueryResultHistoryButton,DownloadButton: real components,classNamemerges through tv.DownloadButtonreads thefiletype-*colours as CSS vars instead ofuseThemeIcon(FaIcon withoutfa-fw) is gone: FaIcon forceswidth: initialanyway, so the 4 consumers useFaIcon--animate-spin-fasttoken keeps the 0.5s spinnertext-xs…text-2xlare font-size only now (--text-*--line-height: initial): the emotion theme never set a line-height, so migrated components would otherwise shift by a few px<button>,SxSelectFileButtongets ashouldForwardPropuntil its file is migrated@ts-ignoreon ref is goneRemaining
styled(IconButton)/styled(FaIcon)overrides in other files keep working: emotion classes are unlayered and beat the utilities.