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

feat: add 'Discover more' button to banners #1332

Merged
merged 4 commits into from
Aug 14, 2023
Merged

Conversation

d-loose
Copy link
Member

@d-loose d-loose commented Aug 14, 2023

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.

Comment on lines +178 to +184
Row(
mainAxisSize: MainAxisSize.min,
children: snaps.map((snap) => _BannerIcon(snap: snap)).toList(),
),

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?

Copy link
Member Author

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;

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.

Copy link
Member Author

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? :)

@d-loose
Copy link
Member Author

d-loose commented Aug 14, 2023

@CarlosNihelton, sorry - should've made clearer that we're still working on rather short and small UI iterations with lots of loose ends

Copy link

@CarlosNihelton CarlosNihelton left a 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

@CarlosNihelton
Copy link

@CarlosNihelton, sorry - should've made clearer that we're still working on rather short and small UI iterations with lots of loose ends

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.

@d-loose
Copy link
Member Author

d-loose commented Aug 14, 2023

Thanks a lot, that's good advice :)

@d-loose d-loose enabled auto-merge (squash) August 14, 2023 16:24
@d-loose d-loose merged commit 3189fe8 into ubuntu:dev Aug 14, 2023
6 checks passed
@d-loose d-loose deleted the banner-buttons branch August 15, 2023 07:13
kenvandine pushed a commit that referenced this pull request Aug 15, 2023
* add l10n strings

* add button to banner

* hide banner icons in small layout

* add todo notes
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* add l10n strings

* add button to banner

* hide banner icons in small layout

* add todo notes
tim-hm pushed a commit to tim-hm/app-center that referenced this pull request Sep 1, 2023
* add l10n strings

* add button to banner

* hide banner icons in small layout

* add todo notes
ashuntu pushed a commit to ashuntu/app-center that referenced this pull request Feb 28, 2024
* add l10n strings

* add button to banner

* hide banner icons in small layout

* add todo notes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants