Migrate to @bsky.app/alf package (#9030)

* Add storybook shortcut in dev

* Migrate to alg pkg

* Migrate font_bold to new font_semi_bold

* Migrate font_heavy to font_bold

* Fix old theme refs

* Remove leading util

* Bump

* Revert "Add storybook shortcut in dev"

This reverts commit 7a86195c77fb5d449c7782e64ebabb6addfab919.

* Remove alf script

* Adjust font scale

* Bump

* Bump pkg

* Migrate values from conflicts

* Create default themes outside react

* Use built-in alf utils

* Migrate old font styles

* Remove unused tokens

* Move theme creation to more appropriate file

* Update button colors

* Adjust TextField colors, line heights
This commit is contained in:
Eric Bailey
2025-09-24 11:47:08 -05:00
committed by GitHub
parent bdc58045cf
commit bd17f04810
219 changed files with 645 additions and 2413 deletions
+1 -1
View File
@@ -38,7 +38,7 @@ export function BirthDateSettingsDialog({
label={_(msg`My Birthday`)}
style={web({maxWidth: 400})}>
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_bold]}>
<Text style={[a.text_xl, a.font_semi_bold]}>
<Trans>My Birthday</Trans>
</Text>
<Text style={[a.leading_snug, t.atoms.text_contrast_medium]}>
@@ -108,7 +108,7 @@ function DeviceLocationRequestDialogInner({onLocationAcquired}: Props) {
return (
<View style={[a.gap_md]}>
<Text style={[a.text_xl, a.font_heavy]}>
<Text style={[a.text_xl, a.font_bold]}>
<Trans>Confirm your location</Trans>
</Text>
<View style={[a.gap_sm, a.pb_xs]}>
@@ -153,7 +153,7 @@ export function Disable() {
return (
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_heavy, a.leading_snug]}>
<Text style={[a.text_xl, a.font_bold, a.leading_snug]}>
<Trans>Disable email 2FA</Trans>
</Text>
@@ -163,7 +163,7 @@ export function Disable() {
style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}>
<Trans>
To disable your email 2FA method, please verify your access to{' '}
<Span style={[a.font_bold]}>{currentAccount?.email}</Span>
<Span style={[a.font_semi_bold]}>{currentAccount?.email}</Span>
</Trans>
</Text>
@@ -214,7 +214,7 @@ export function Disable() {
style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}>
<Trans>
To disable your email 2FA method, please verify your access to{' '}
<Span style={[a.font_bold]}>{currentAccount?.email}</Span>
<Span style={[a.font_semi_bold]}>{currentAccount?.email}</Span>
</Trans>
</Text>
@@ -88,7 +88,7 @@ export function Enable() {
return (
<View style={[a.gap_lg]}>
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_heavy, a.leading_snug]}>
<Text style={[a.text_xl, a.font_bold, a.leading_snug]}>
<Trans>Enable email 2FA</Trans>
</Text>
@@ -199,7 +199,7 @@ export function Update(_props: ScreenProps<ScreenID.Update>) {
return (
<View style={[a.gap_lg]}>
<Text style={[a.text_xl, a.font_heavy]}>
<Text style={[a.text_xl, a.font_bold]}>
<Trans>Update your email</Trans>
</Text>
@@ -239,7 +239,7 @@ export function Update(_props: ScreenProps<ScreenID.Update>) {
<>
<Divider />
<View>
<Text style={[a.text_md, a.pb_sm, a.font_bold]}>
<Text style={[a.text_md, a.pb_sm, a.font_semi_bold]}>
<Trans>Security step required</Trans>
</Text>
<Text
@@ -282,7 +282,7 @@ export function Update(_props: ScreenProps<ScreenID.Update>) {
<View style={[a.gap_sm]}>
<View style={[a.flex_row, a.gap_sm, a.align_center]}>
<Check fill={t.palette.positive_600} size="xs" />
<Text style={[a.text_md, a.font_heavy]}>
<Text style={[a.text_md, a.font_bold]}>
<Trans>Success!</Trans>
</Text>
</View>
@@ -58,7 +58,7 @@ export function VerificationReminder({
<View style={[a.mb_xs, {height: 150 - dialogPadding}]} />
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_heavy]}>
<Text style={[a.text_xl, a.font_bold]}>
<Trans>Please verify your email</Trans>
</Text>
<Text style={[a.text_sm, a.leading_snug, t.atoms.text_contrast_medium]}>
@@ -174,7 +174,7 @@ export function Verify({config, showScreen}: ScreenProps<ScreenID.Verify>) {
return (
<View style={[a.gap_lg]}>
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_heavy]}>
<Text style={[a.text_xl, a.font_bold]}>
<Span style={{top: 1}}>
<Check size="sm" fill={t.palette.positive_600} />
</Span>
@@ -197,7 +197,7 @@ export function Verify({config, showScreen}: ScreenProps<ScreenID.Verify>) {
return (
<View style={[a.gap_lg]}>
<View style={[a.gap_sm]}>
<Text style={[a.text_xl, a.font_heavy]}>
<Text style={[a.text_xl, a.font_bold]}>
{state.step === 'email' ? (
state.mutationStatus === 'success' ? (
<>
@@ -239,7 +239,7 @@ export function Verify({config, showScreen}: ScreenProps<ScreenID.Verify>) {
state.mutationStatus === 'success' ? (
<Trans>
We sent an email to{' '}
<Span style={[a.font_bold, t.atoms.text]}>
<Span style={[a.font_semi_bold, t.atoms.text]}>
{currentAccount!.email}
</Span>{' '}
containing a link. Please click on it to complete the email
@@ -248,7 +248,7 @@ export function Verify({config, showScreen}: ScreenProps<ScreenID.Verify>) {
) : (
<Trans>
We'll send an email to{' '}
<Span style={[a.font_bold, t.atoms.text]}>
<Span style={[a.font_semi_bold, t.atoms.text]}>
{currentAccount!.email}
</Span>{' '}
containing a link. Please click on it to complete the email
@@ -258,7 +258,7 @@ export function Verify({config, showScreen}: ScreenProps<ScreenID.Verify>) {
) : (
<Trans>
Please enter the code we sent to{' '}
<Span style={[a.font_bold, t.atoms.text]}>
<Span style={[a.font_semi_bold, t.atoms.text]}>
{currentAccount!.email}
</Span>{' '}
below.
+2 -2
View File
@@ -104,7 +104,7 @@ function EmbedDialogInner({
<Dialog.Inner label={_(msg`Embed post`)} style={[{maxWidth: 500}]}>
<View style={[a.gap_lg]}>
<View style={[a.gap_sm]}>
<Text style={[a.text_2xl, a.font_heavy]}>
<Text style={[a.text_2xl, a.font_bold]}>
<Trans>Embed post</Trans>
</Text>
<Text
@@ -147,7 +147,7 @@ function EmbedDialogInner({
{showCustomisation && (
<View style={[a.gap_sm, a.p_md]}>
<Text style={[t.atoms.text_contrast_medium, a.font_bold]}>
<Text style={[t.atoms.text_contrast_medium, a.font_semi_bold]}>
<Trans>Color theme</Trans>
</Text>
<ToggleButton.Group
+1 -1
View File
@@ -54,7 +54,7 @@ export function EmbedConsentDialog({
label={_(msg`External Media`)}
style={[gtMobile ? {width: 'auto', maxWidth: 400} : a.w_full]}>
<View style={a.gap_sm}>
<Text style={[a.text_2xl, a.font_bold]}>
<Text style={[a.text_2xl, a.font_semi_bold]}>
<Trans>External Media</Trans>
</Text>
@@ -62,7 +62,7 @@ function InAppBrowserConsentInner({href}: {href?: string}) {
<Dialog.ScrollableInner label={_(msg`How should we open this link?`)}>
<View style={[a.gap_2xl]}>
<View style={[a.gap_sm]}>
<Text style={[a.font_heavy, a.text_2xl]}>
<Text style={[a.font_bold, a.text_2xl]}>
<Trans>How should we open this link?</Trans>
</Text>
<Text style={[t.atoms.text_contrast_high, a.leading_snug, a.text_md]}>
+3 -2
View File
@@ -68,7 +68,7 @@ function InAppBrowserConsentInner({
}>
<View style={[a.gap_2xl]}>
<View style={[a.gap_sm]}>
<Text style={[a.font_heavy, a.text_2xl]}>
<Text style={[a.font_bold, a.text_2xl]}>
{potentiallyMisleading ? (
<Trans>Potentially misleading link</Trans>
) : (
@@ -151,7 +151,8 @@ function LinkBox({href}: {href: string}) {
]}>
<Text style={[a.text_md, a.leading_snug, t.atoms.text_contrast_medium]}>
{scheme}
<Text style={[a.text_md, a.leading_snug, t.atoms.text, a.font_bold]}>
<Text
style={[a.text_md, a.leading_snug, t.atoms.text, a.font_semi_bold]}>
{hostname}
</Text>
{rest}
+15 -8
View File
@@ -108,7 +108,12 @@ function MutedWordsInner() {
<Dialog.ScrollableInner label={_(msg`Manage your muted words and tags`)}>
<View>
<Text
style={[a.text_md, a.font_bold, a.pb_sm, t.atoms.text_contrast_high]}>
style={[
a.text_md,
a.font_semi_bold,
a.pb_sm,
t.atoms.text_contrast_high,
]}>
<Trans>Add muted words and tags</Trans>
</Text>
<Text style={[a.pb_lg, a.leading_snug, t.atoms.text_contrast_medium]}>
@@ -147,7 +152,7 @@ function MutedWordsInner() {
style={[
a.pb_xs,
a.text_sm,
a.font_bold,
a.font_semi_bold,
t.atoms.text_contrast_medium,
]}>
<Trans>Duration:</Trans>
@@ -247,7 +252,7 @@ function MutedWordsInner() {
style={[
a.pb_xs,
a.text_sm,
a.font_bold,
a.font_semi_bold,
t.atoms.text_contrast_medium,
]}>
<Trans>Mute in:</Trans>
@@ -293,7 +298,7 @@ function MutedWordsInner() {
style={[
a.pb_xs,
a.text_sm,
a.font_bold,
a.font_semi_bold,
t.atoms.text_contrast_medium,
]}>
<Trans>Options:</Trans>
@@ -362,7 +367,7 @@ function MutedWordsInner() {
<Text
style={[
a.text_md,
a.font_bold,
a.font_semi_bold,
a.pb_md,
t.atoms.text_contrast_high,
]}>
@@ -455,7 +460,7 @@ function MutedWordRow({
style={[
a.flex_1,
a.leading_snug,
a.font_bold,
a.font_semi_bold,
web({
overflowWrap: 'break-word',
wordBreak: 'break-word',
@@ -466,7 +471,8 @@ function MutedWordRow({
{word.value}{' '}
<Text style={[a.font_normal, t.atoms.text_contrast_medium]}>
in{' '}
<Text style={[a.font_bold, t.atoms.text_contrast_medium]}>
<Text
style={[a.font_semi_bold, t.atoms.text_contrast_medium]}>
text & tags
</Text>
</Text>
@@ -476,7 +482,8 @@ function MutedWordRow({
{word.value}{' '}
<Text style={[a.font_normal, t.atoms.text_contrast_medium]}>
in{' '}
<Text style={[a.font_bold, t.atoms.text_contrast_medium]}>
<Text
style={[a.font_semi_bold, t.atoms.text_contrast_medium]}>
tags
</Text>
</Text>
@@ -84,7 +84,7 @@ export function PostInteractionSettingsControlledDialog({
]}>
<Trans>
You can set default interaction settings in{' '}
<Text style={[a.font_bold, t.atoms.text_contrast_medium]}>
<Text style={[a.font_semi_bold, t.atoms.text_contrast_medium]}>
Settings &rarr; Moderation &rarr; Interaction settings
</Text>
.
@@ -100,7 +100,7 @@ export function PostInteractionSettingsControlledDialog({
export function Header() {
return (
<View style={[a.gap_md, a.pb_sm]}>
<Text style={[a.text_2xl, a.font_bold]}>
<Text style={[a.text_2xl, a.font_semi_bold]}>
<Trans>Post interaction settings</Trans>
</Text>
<Text style={[a.text_md, a.pb_xs]}>
@@ -329,7 +329,7 @@ export function PostInteractionSettingsForm({
<View style={[a.flex_1, a.gap_md]}>
<View style={[a.gap_lg]}>
<View style={[a.gap_sm]}>
<Text style={[a.font_bold, a.text_lg]}>
<Text style={[a.font_semi_bold, a.text_lg]}>
<Trans>Quote settings</Trans>
</Text>
@@ -385,7 +385,7 @@ export function PostInteractionSettingsForm({
opacity: replySettingsDisabled ? 0.3 : 1,
},
]}>
<Text style={[a.font_bold, a.text_lg]}>
<Text style={[a.font_semi_bold, a.text_lg]}>
<Trans>Reply settings</Trans>
</Text>
@@ -535,7 +535,9 @@ function Selectable({
},
style,
]}>
<Text style={[a.text_sm, isSelected && a.font_bold]}>{label}</Text>
<Text style={[a.text_sm, isSelected && a.font_semi_bold]}>
{label}
</Text>
{isSelected ? (
<Check size="sm" fill={t.palette.primary_500} />
) : (
@@ -284,7 +284,7 @@ export function SearchablePeopleList({
style={[
a.z_10,
a.text_lg,
a.font_heavy,
a.font_bold,
a.leading_tight,
t.atoms.text_contrast_high,
]}>
+3 -3
View File
@@ -172,7 +172,7 @@ function StarterPackList({
isWeb ? a.mb_2xl : a.my_lg,
a.align_center,
]}>
<Text style={[a.text_lg, a.font_bold]}>
<Text style={[a.text_lg, a.font_semi_bold]}>
<Trans>Add to starter packs</Trans>
</Text>
<Button
@@ -189,7 +189,7 @@ function StarterPackList({
<>
<View
style={[a.flex_row, a.justify_between, a.align_center, a.py_md]}>
<Text style={[a.text_md, a.font_bold]}>
<Text style={[a.text_md, a.font_semi_bold]}>
<Trans>New starter pack</Trans>
</Text>
<Button
@@ -331,7 +331,7 @@ function StarterPackItem({
return (
<View style={[a.flex_row, a.justify_between, a.align_center, a.py_md]}>
<View>
<Text emoji style={[a.text_md, a.font_bold]} numberOfLines={1}>
<Text emoji style={[a.text_md, a.font_semi_bold]} numberOfLines={1}>
{record.name}
</Text>
+1 -1
View File
@@ -45,7 +45,7 @@ export function SwitchAccountDialog({
<Dialog.Handle />
<Dialog.ScrollableInner label={_(msg`Switch Account`)}>
<View style={[a.gap_lg]}>
<Text style={[a.text_2xl, a.font_bold]}>
<Text style={[a.text_2xl, a.font_semi_bold]}>
<Trans>Switch Account</Trans>
</Text>
@@ -66,7 +66,7 @@ export function ActivitySubscriptionsNUX() {
<SparkleIcon fill={t.palette.primary_800} size="sm" />
<Text
style={[
a.font_bold,
a.font_semi_bold,
{
color: t.palette.primary_800,
},
@@ -127,7 +127,7 @@ export function ActivitySubscriptionsNUX() {
style={[
a.text_3xl,
a.leading_tight,
a.font_heavy,
a.font_bold,
a.text_center,
{
fontSize: isWeb ? 28 : 32,
@@ -65,7 +65,7 @@ export function BookmarksAnnouncement() {
<SparkleIcon fill={t.palette.primary_800} size="sm" />
<Text
style={[
a.font_bold,
a.font_semi_bold,
{
color: t.palette.primary_800,
},
@@ -133,7 +133,7 @@ export function BookmarksAnnouncement() {
style={[
a.text_3xl,
a.leading_tight,
a.font_heavy,
a.font_bold,
a.text_center,
{
fontSize: isWeb ? 28 : 32,
@@ -55,7 +55,7 @@ export function InitialVerificationAnnouncement() {
<SparkleIcon fill={t.palette.primary_700} size="sm" />
<Text
style={[
a.font_bold,
a.font_semi_bold,
{
color: t.palette.primary_700,
},
@@ -87,7 +87,7 @@ export function InitialVerificationAnnouncement() {
</View>
<View style={[a.gap_xs]}>
<Text style={[a.text_2xl, a.font_bold, a.leading_snug]}>
<Text style={[a.text_2xl, a.font_semi_bold, a.leading_snug]}>
<Trans>A new form of verification</Trans>
</Text>
<Text style={[a.leading_snug, a.text_md]}>
@@ -123,7 +123,7 @@ export function InitialVerificationAnnouncement() {
<View style={[a.gap_sm]}>
<View style={[a.flex_row, a.align_center, a.gap_xs]}>
<VerifierCheck width={14} />
<Text style={[a.text_lg, a.font_bold, a.leading_snug]}>
<Text style={[a.text_lg, a.font_semi_bold, a.leading_snug]}>
<Trans>Who can verify?</Trans>
</Text>
</View>
@@ -138,7 +138,7 @@ export function InitialVerificationAnnouncement() {
<Trans>
Trust emerges from relationships, communities, and shared
context, so were also enabling{' '}
<Span style={[a.font_bold]}>trusted verifiers</Span>:
<Span style={[a.font_semi_bold]}>trusted verifiers</Span>:
organizations that can directly issue verification.
</Trans>
</Text>