-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Show unanswered questions to the users on product page. #922
Conversation
…h to sign in if they answer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, it was actually reviewing it when you merged it. Didn't finish.
Feel free to read my unfinished comments ;)
@@ -20,20 +20,22 @@ class SmoothCard extends StatelessWidget { | |||
bottom: VERY_SMALL_SPACE, | |||
), | |||
this.padding = const EdgeInsets.all(5.0), | |||
this.elevation = 8, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about SMALL_SPACE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought about it, but I feel like elevation
is not "Space" so I think it doesn't fit.
final List<RobotoffQuestion> questions = | ||
snapshot.data ?? <RobotoffQuestion>[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about a CircularProgressIndicator
while waiting?
What if an error occurs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is a tiny widget embedded inside the summary card, I don't think the circular progress indicator makes sense (the user won't know what it's for), if there's an error we just won't show the question prompt. The user still sees the product as they would before this change
final RobotoffQuestionResult result = | ||
await OpenFoodAPIClient.getRobotoffQuestionsForProduct( | ||
barcode, | ||
ProductQuery.getLanguage().code, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cc @M123-dev That's typically something we need to address in off-dart v2.0.0: always use language
instead of language.code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
woops, sorry, feel free to do a full review, I can make any requested changes. |
TODO -
Outputs ->
Small screen:
Large screen: