Skip to content

Commit

Permalink
Hide Robotoff banner on the onboarding (#5369)
Browse files Browse the repository at this point in the history
  • Loading branch information
g123k authored Jun 14, 2024
1 parent 5786f53 commit 9e3cea3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ class _HelperState extends State<_Helper> {
isRemovable: false,
isSettingVisible: false,
isProductEditable: false,
showQuestionsBanner: false,
),
),
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ class _ProductPageState extends State<ProductPage>
upToDateProduct,
_productPreferences,
isFullVersion: true,
showUnansweredQuestions: true,
),
),
),
Expand Down
9 changes: 5 additions & 4 deletions packages/smooth_app/lib/pages/product/summary_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'package:smooth_app/helpers/product_cards_helper.dart';
import 'package:smooth_app/helpers/ui_helpers.dart';
import 'package:smooth_app/knowledge_panel/knowledge_panels/knowledge_panel_page.dart';
import 'package:smooth_app/knowledge_panel/knowledge_panels_builder.dart';
import 'package:smooth_app/pages/hunger_games/question_card.dart';
import 'package:smooth_app/pages/product/common/product_query_page_helper.dart';
import 'package:smooth_app/pages/product/hideable_container.dart';
import 'package:smooth_app/pages/product/product_compatibility_header.dart';
Expand All @@ -41,7 +42,7 @@ class SummaryCard extends StatefulWidget {
this._product,
this._productPreferences, {
this.isFullVersion = false,
this.showUnansweredQuestions = false,
this.showQuestionsBanner = false,
this.isRemovable = true,
this.isSettingVisible = true,
this.isProductEditable = true,
Expand All @@ -58,9 +59,8 @@ class SummaryCard extends StatefulWidget {
/// Buttons should only be visible in full mode
final bool isFullVersion;

/// If true, the summary card will try to load unanswered questions about this
/// product and give a prompt to answer those questions.
final bool showUnansweredQuestions;
/// If true, show the [QuestionCard] if there are questions for the product.
final bool showQuestionsBanner;

/// If true, there will be a button to remove the product from the carousel.
final bool isRemovable;
Expand Down Expand Up @@ -347,6 +347,7 @@ class _SummaryCardState extends State<SummaryCard> with UpToDateMixin {
ProductIncompleteCard(product: upToDateProduct),
..._getAttributes(scoreAttributes),
if (widget.isFullVersion &&
widget.showQuestionsBanner &&
_questionsLayout == ProductQuestionsLayout.button)
ProductQuestionsWidget(
upToDateProduct,
Expand Down

0 comments on commit 9e3cea3

Please sign in to comment.