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: #2706 - now we display the "LOG IN!" button only if not logged in #2714

Merged
merged 1 commit into from
Aug 2, 2022

Conversation

monsieurtanuki
Copy link
Contributor

Impacted files:

  • abstract_user_preferences.dart: added an "additional subtitle" method, returning a null widget by default
  • user_preferences_account.dart: (only) implementation of the "additional subtitle", that displays the "LOG IN!" button, but only if not logged in (that's the issue fix)
  • user_preferences_page.dart: now we let each item decide if there's an additional subtitle to display beyond the list tile (and its layout constraints)

What

  • The "LOG IN!" button was always displayed on the main preference page.
  • Now we display the "LOG IN!" only when not logged in.

Screenshot

not logged in logged in
Capture d’écran 2022-08-02 à 18 29 32 Capture d’écran 2022-08-02 à 18 30 58

Fixes bug(s)

…not logged in

Impacted files:
* `abstract_user_preferences.dart`: added an "additional subtitle" method, returning a `null` widget by default
* `user_preferences_account.dart`: (only) implementation of the "additional subtitle", that displays the "LOGIN!" button, but only if not logged in (that's the issue fix)
* `user_preferences_page.dart`: now we let each item decide if there's an additional subtitle to display beyond the list tile (and its layout constraints)
@codecov-commenter
Copy link

Codecov Report

Merging #2714 (a9a88fb) into develop (2ea0da3) will decrease coverage by 1.64%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           develop   #2714      +/-   ##
==========================================
- Coverage     8.86%   7.21%   -1.65%     
==========================================
  Files          161     219      +58     
  Lines         6623   10626    +4003     
==========================================
+ Hits           587     767     +180     
- Misses        6036    9859    +3823     
Impacted Files Coverage Δ
...kages/smooth_app/lib/widgets/attribute_button.dart 0.00% <0.00%> (-92.00%) ⬇️
...s/smooth_app/lib/data_models/user_preferences.dart 8.73% <0.00%> (-23.57%) ⬇️
packages/smooth_app/lib/themes/smooth_theme.dart 60.00% <0.00%> (-22.98%) ⬇️
...p/lib/generic_lib/dialogs/smooth_alert_dialog.dart 15.11% <0.00%> (-19.10%) ⬇️
...mooth_app/lib/data_models/product_preferences.dart 21.68% <0.00%> (-9.75%) ⬇️
packages/smooth_app/lib/main.dart 14.65% <0.00%> (-3.24%) ⬇️
.../smooth_app/lib/pages/onboarding/welcome_page.dart 0.00% <0.00%> (-3.13%) ⬇️
.../smooth_app/lib/pages/onboarding/scan_example.dart 0.00% <0.00%> (-2.28%) ⬇️
...p/lib/pages/onboarding/consent_analytics_page.dart 0.00% <0.00%> (-1.57%) ⬇️
...ackages/smooth_app/lib/pages/scan/scan_header.dart 3.33% <0.00%> (-1.43%) ⬇️
... and 236 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@AshAman999 AshAman999 left a comment

Choose a reason for hiding this comment

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

Looks good and works good :)
👍

@monsieurtanuki monsieurtanuki merged commit a845721 into openfoodfacts:develop Aug 2, 2022
@monsieurtanuki
Copy link
Contributor Author

Thank you @AshAman999!

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.

The sign button stays even when I am signed in already
3 participants