Skip to content

chore: implement new color tokens #7818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ class AiPromptCategoryList extends StatelessWidget {
return theme.fillColorScheme.themeSelect;
}
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
}
return Colors.transparent;
return theme.fillColorScheme.content;
},
);
}
Expand Down Expand Up @@ -175,9 +175,9 @@ class AiPromptCategoryItem extends StatelessWidget {
return theme.fillColorScheme.themeSelect;
}
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
}
return Colors.transparent;
return theme.fillColorScheme.content;
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class _PromptContent extends StatelessWidget {
spans.add(
TextSpan(
text: part,
style: TextStyle(color: theme.textColorScheme.purple),
style: TextStyle(color: theme.textColorScheme.featured),
),
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ class _AiPromptListItemState extends State<_AiPromptListItem> {
? theme.borderColorScheme.themeThickHover
: theme.borderColorScheme.themeThick
: isHovering
? theme.borderColorScheme.greyTertiaryHover
: theme.borderColorScheme.greyTertiary,
? theme.borderColorScheme.primaryHover
: theme.borderColorScheme.primary,
),
color: theme.surfaceColorScheme.primary,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ class AiPromptInputTextEditingController extends TextEditingController {
TextSpan(
text: restore(string),
style: theme.textStyle.body.standard().copyWith(
color: theme.textColorScheme.purple,
backgroundColor: theme.fillColorScheme.purpleLight,
color: theme.textColorScheme.featured,
backgroundColor: theme.fillColorScheme.featuredLight,
),
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ class _MobileBottomSheetEditLinkWidgetState
BoxDecoration buildBorderDecoration() {
return BoxDecoration(
borderRadius: BorderRadius.circular(theme.borderRadius.l),
border: Border.all(color: theme.borderColorScheme.greyPrimary),
border: Border.all(color: theme.borderColorScheme.primary),
);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class _MobileSearchTextfieldState extends State<MobileSearchTextfield> {
final showCancelIcon = controller.text.isNotEmpty;
final border = OutlineInputBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0)),
borderSide: BorderSide(color: theme.borderColorScheme.greyTertiary),
borderSide: BorderSide(color: theme.borderColorScheme.primary),
);
final enableBorder = border.copyWith(
borderSide: BorderSide(color: theme.borderColorScheme.themeThick),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class LinkEmbedBlockComponentState
decoration: BoxDecoration(
color: isIdle ? Theme.of(context).cardColor : fillSceme.tertiaryHover,
borderRadius: BorderRadius.all(Radius.circular(16)),
border: Border.all(color: borderScheme.greyTertiary),
border: Border.all(color: borderScheme.primary),
),
child: Stack(
children: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ class CustomLinkPreviewWidget extends StatelessWidget {
decoration: BoxDecoration(
border: Border.all(
color: isHovering || isInDarkCallout
? borderScheme.greyTertiaryHover
: borderScheme.greyTertiary,
? borderScheme.primaryHover
: borderScheme.primary,
),
borderRadius: BorderRadius.circular(16.0),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class _OrDivider extends StatelessWidget {
Flexible(
child: Divider(
thickness: 1,
color: theme.borderColorScheme.greyTertiary,
color: theme.borderColorScheme.primary,
),
),
Padding(
Expand All @@ -159,7 +159,7 @@ class _OrDivider extends StatelessWidget {
Flexible(
child: Divider(
thickness: 1,
color: theme.borderColorScheme.greyTertiary,
color: theme.borderColorScheme.primary,
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,9 @@ class _ContinueWithMagicLinkOrPasscodePageState
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
return theme.textColorScheme.actionHover;
}
return theme.textColorScheme.theme;
return theme.textColorScheme.action;
},
),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ class _ContinueWithPasswordPageState extends State<ContinueWithPasswordPage> {
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
return theme.textColorScheme.actionHover;
}
return theme.textColorScheme.theme;
return theme.textColorScheme.action;
},
),
),
Expand All @@ -186,9 +186,9 @@ class _ContinueWithPasswordPageState extends State<ContinueWithPasswordPage> {
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
return theme.textColorScheme.actionHover;
}
return theme.textColorScheme.theme;
return theme.textColorScheme.action;
},
),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ class _DesktopThirdPartySignInState extends State<_DesktopThirdPartySignIn> {
padding: EdgeInsets.zero,
textColor: (context, isHovering, disabled) {
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
return theme.textColorScheme.actionHover;
}
return theme.textColorScheme.theme;
return theme.textColorScheme.action;
},
onTap: () {
setState(() {
Expand Down Expand Up @@ -189,9 +189,9 @@ class _MobileThirdPartySignInState extends State<_MobileThirdPartySignIn> {
text: 'More options',
textColor: (context, isHovering, disabled) {
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
return theme.textColorScheme.actionHover;
}
return theme.textColorScheme.theme;
return theme.textColorScheme.action;
},
onTap: () {
setState(() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ class SettingsMenuElement extends StatelessWidget {
onTap: () => changeSelectedPage(page),
padding: EdgeInsets.all(theme.spacing.m),
borderRadius: theme.borderRadius.m,
borderColor: (_, __, ___, ____) => theme.fillColorScheme.transparent,
borderColor: (_, __, ___, ____) => Colors.transparent,
backgroundColor: (_, isHovering, __) {
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
} else if (page == selectedPage) {
return theme.fillColorScheme.themeSelect;
}
return theme.fillColorScheme.transparent;
return theme.fillColorScheme.content;
},
builder: (_, __, ___) {
return Row(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class _ModalPageState extends State<ModalPage> {
'S',
style: TextStyle(
color: width == AFModalDimension.S
? theme.textColorScheme.theme
? theme.textColorScheme.action
: theme.textColorScheme.primary,
),
);
Expand All @@ -47,7 +47,7 @@ class _ModalPageState extends State<ModalPage> {
'M',
style: TextStyle(
color: width == AFModalDimension.M
? theme.textColorScheme.theme
? theme.textColorScheme.action
: theme.textColorScheme.primary,
),
);
Expand All @@ -60,7 +60,7 @@ class _ModalPageState extends State<ModalPage> {
'L',
style: TextStyle(
color: width == AFModalDimension.L
? theme.textColorScheme.theme
? theme.textColorScheme.action
: theme.textColorScheme.primary,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,13 +126,13 @@ class _AFBaseButtonState extends State<AFBaseButton> {
final theme = AppFlowyTheme.of(context);
return widget.borderColor
?.call(context, isHovering, widget.disabled, isFocused) ??
theme.borderColorScheme.greyTertiary;
theme.borderColorScheme.primary;
}

Color _buildBackgroundColor(BuildContext context) {
final theme = AppFlowyTheme.of(context);
return widget.backgroundColor?.call(context, isHovering, widget.disabled) ??
theme.fillColorScheme.transparent;
theme.fillColorScheme.content;
}

Color _buildRingColor(BuildContext context) {
Expand All @@ -147,6 +147,6 @@ class _AFBaseButtonState extends State<AFBaseButton> {
return theme.borderColorScheme.themeThick.withAlpha(128);
}

return theme.borderColorScheme.transparent;
return Colors.transparent;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AFFilledButton extends StatelessWidget {
disabled: disabled,
backgroundColor: (context, isHovering, disabled) {
if (disabled) {
return AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5;
return AppFlowyTheme.of(context).fillColorScheme.contentHover;
}
if (isHovering) {
return AppFlowyTheme.of(context).fillColorScheme.themeThickHover;
Expand Down Expand Up @@ -70,7 +70,7 @@ class AFFilledButton extends StatelessWidget {
disabled: disabled,
backgroundColor: (context, isHovering, disabled) {
if (disabled) {
return AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5;
return AppFlowyTheme.of(context).fillColorScheme.contentHover;
}
if (isHovering) {
return AppFlowyTheme.of(context).fillColorScheme.errorThickHover;
Expand All @@ -97,7 +97,7 @@ class AFFilledButton extends StatelessWidget {
padding: padding,
borderRadius: borderRadius,
backgroundColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5,
AppFlowyTheme.of(context).fillColorScheme.contentHover,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class AFFilledIconTextButton extends StatelessWidget {
backgroundColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (disabled) {
return theme.fillColorScheme.tertiary;
return theme.fillColorScheme.contentHover;
}
if (isHovering) {
return theme.fillColorScheme.themeThickHover;
Expand All @@ -51,6 +51,9 @@ class AFFilledIconTextButton extends StatelessWidget {
},
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (disabled) {
return theme.textColorScheme.tertiary;
}
return theme.textColorScheme.onFill;
},
);
Expand All @@ -77,7 +80,7 @@ class AFFilledIconTextButton extends StatelessWidget {
backgroundColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (disabled) {
return theme.fillColorScheme.tertiary;
return theme.fillColorScheme.contentHover;
}
if (isHovering) {
return theme.fillColorScheme.errorThickHover;
Expand Down Expand Up @@ -110,7 +113,7 @@ class AFFilledIconTextButton extends StatelessWidget {
borderRadius: borderRadius,
backgroundColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
return theme.fillColorScheme.tertiary;
return theme.fillColorScheme.contentHover;
},
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class AFFilledTextButton extends AFBaseTextButton {
AppFlowyTheme.of(context).textColorScheme.onFill,
backgroundColor: (context, isHovering, disabled) {
if (disabled) {
return AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5;
return AppFlowyTheme.of(context).fillColorScheme.contentHover;
}
if (isHovering) {
return AppFlowyTheme.of(context).fillColorScheme.themeThickHover;
Expand Down Expand Up @@ -79,7 +79,7 @@ class AFFilledTextButton extends AFBaseTextButton {
AppFlowyTheme.of(context).textColorScheme.onFill,
backgroundColor: (context, isHovering, disabled) {
if (disabled) {
return AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5;
return AppFlowyTheme.of(context).fillColorScheme.contentHover;
}
if (isHovering) {
return AppFlowyTheme.of(context).fillColorScheme.errorThickHover;
Expand Down Expand Up @@ -112,7 +112,7 @@ class AFFilledTextButton extends AFBaseTextButton {
textColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).textColorScheme.tertiary,
backgroundColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).fillColorScheme.primaryAlpha5,
AppFlowyTheme.of(context).fillColorScheme.contentHover,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@ class AFGhostButton extends StatelessWidget {
backgroundColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (disabled) {
return theme.fillColorScheme.transparent;
return theme.fillColorScheme.content;
}
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
}
return theme.fillColorScheme.transparent;
return theme.fillColorScheme.content;
},
);
}
Expand All @@ -68,7 +68,7 @@ class AFGhostButton extends StatelessWidget {
borderRadius: borderRadius,
disabled: true,
backgroundColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).fillColorScheme.transparent,
AppFlowyTheme.of(context).fillColorScheme.content,
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ class AFGhostIconTextButton extends StatelessWidget {
return Colors.transparent;
}
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
}
return Colors.transparent;
return theme.fillColorScheme.content;
},
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ class AFGhostTextButton extends AFBaseTextButton {
backgroundColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
if (isHovering) {
return theme.fillColorScheme.primaryAlpha5;
return theme.fillColorScheme.contentHover;
}
return theme.fillColorScheme.transparent;
return theme.fillColorScheme.content;
},
textColor: (context, isHovering, disabled) {
final theme = AppFlowyTheme.of(context);
Expand Down Expand Up @@ -77,7 +77,7 @@ class AFGhostTextButton extends AFBaseTextButton {
textColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).textColorScheme.tertiary,
backgroundColor: (context, isHovering, disabled) =>
AppFlowyTheme.of(context).fillColorScheme.transparent,
AppFlowyTheme.of(context).fillColorScheme.content,
);
}

Expand Down
Loading
Loading