Skip to content
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

fix: Summary card doesn't honor dark mode #1321 #1323

Merged
merged 2 commits into from
Mar 26, 2022
Merged
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
11 changes: 7 additions & 4 deletions packages/smooth_app/lib/cards/product_cards/question_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class _QuestionCardState extends State<QuestionCard>
return true;
},
child: Scaffold(
backgroundColor: const Color(0xff4f4f4f),
backgroundColor: Theme.of(context).colorScheme.background,
appBar: AppBar(),
body: _buildAnimationSwitcher(),
),
Expand Down Expand Up @@ -170,7 +170,10 @@ class _QuestionCardState extends State<QuestionCard>
padding: const EdgeInsets.only(bottom: SMALL_SPACE),
child: Text(
question.question!,
style: Theme.of(context).textTheme.headline4,
style: Theme.of(context)
.textTheme
.headline4!
.apply(color: Colors.black),
),
),
Container(
Expand Down Expand Up @@ -231,8 +234,8 @@ class _QuestionCardState extends State<QuestionCard>
child: _buildAnswerButton(
insightId: question.insightId,
insightAnnotation: InsightAnnotation.MAYBE,
backgroundColor: Colors.white,
contentColor: Colors.grey,
backgroundColor: const Color(0xFFFFEFB7),
contentColor: Colors.black,
currentQuestionIndex: currentQuestionIndex,
),
),
Expand Down
2 changes: 1 addition & 1 deletion packages/smooth_app/lib/pages/product/summary_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ class _SummaryCardState extends State<SummaryCard> {
},
child: SmoothCard(
margin: EdgeInsets.zero,
color: const Color(0xfff5f6fa),
color: Theme.of(context).colorScheme.primary,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said, we already talked about this here but I have to say the primary color looks way too prominent in my opinion. What about completely removing any color for it and using the standart SmoothCard color

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't followed all the thread but remember that there is a secondary color. Maybe we should agree that secondary is for flashy buttons and primary for quieter larger areas?

From https://material.io/design/color/the-color-system.html#color-theme-creation

Secondary colors are best for:
Floating action buttons
Selection controls, like sliders and switches
Highlighting selected text
Progress bars
Links and headlines

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @monsieurtanuki ,
Initially, I tried secondary color but @teolemon suggested to go with primary color. You can find the thread here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Robotoff, and I'd be tempted to keep the "Robotoff blue" across platforms and versions. @M123-dev @monsieurtanuki @bhattabhi013

Copy link
Contributor Author

@bhattabhi013 bhattabhi013 Mar 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said, we already talked about this here but I have to say the primary color looks way too prominent in my opinion. What about completely removing any color for it and using the standart SmoothCard color

I tried doing it this way, here is the outcome:
image

I think we should either go with primary or secondary color as suggested by @monsieurtanuki .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no special interest in specific colors, I was just pointing out that the flutter standards provide 2 main colors. That should be enough for most apps, but if smoothie needs additional colors, why not?

elevation: 0,
padding: const EdgeInsets.all(
SMALL_SPACE,
Expand Down