-
Notifications
You must be signed in to change notification settings - Fork 116
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
feat: add 'Discover more' button to banners #1332
Conversation
Row( | ||
mainAxisSize: MainAxisSize.min, | ||
children: snaps.map((snap) => _BannerIcon(snap: snap)).toList(), | ||
), |
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.
Can we animate the appearance of the row? Did Design suggested anything to smooth the appearance of those icon buttons?
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.
Currently we're very much focused on the 'M' in 'MVP' :D - we're planning to polish the UI a bit more after the initial release - I'll add some TODO notes!
final String? buttonLabel; | ||
final VoidCallback? onPressed; | ||
|
||
static const _kForegroundColor = Colors.white; |
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.
This constant plays nice with the current selection of banner gradients in both light and dark modes. If eventually a new design arises that breaks that, we'd need the foreground color dependent on the gradient colors, thus IMHO I think we should accept it as a parameter of the widget's constructor even though it will default to this particular value for now.
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.
Thanks - I completely agree. I'm planning to refactor all the private Widgets in that file into their own files, once the design is settled (there'll be tests and no fewer hardcoded values!). Would you be happy with a 'TODO' plan in the code? :)
@CarlosNihelton, sorry - should've made clearer that we're still working on rather short and small UI iterations with lots of loose ends |
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.
LGTM 👍🏽 once the TODO comments are added :D
That's fine. Even though we may have a very complete backlog somewhere else (as GH issues or JIRA cards etc) I still consider the inline comments of great value to show others that happen to be reviewing the code (this is open source, after all) that we considered some aspects of the current implementation and avoid certain kinds of questions. |
Thanks a lot, that's good advice :) |
5d8697a
to
be431b1
Compare
* add l10n strings * add button to banner * hide banner icons in small layout * add todo notes
* add l10n strings * add button to banner * hide banner icons in small layout * add todo notes
* add l10n strings * add button to banner * hide banner icons in small layout * add todo notes
* add l10n strings * add button to banner * hide banner icons in small layout * add todo notes
Screencast.from.2023-08-14.16-58-46.webm
The button label can be customized for each category. Since the button might need a lot of horizontal space - hide the three snap icons in the narrow layout.