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: Non-aligned button texts and icons on "send anonymous analytics" page #1443

Merged
merged 3 commits into from
Apr 3, 2022
Merged

fix: Non-aligned button texts and icons on "send anonymous analytics" page #1443

merged 3 commits into from
Apr 3, 2022

Conversation

bhattabhi013
Copy link
Contributor

What

Fixes non-aligned button texts and icons on the "send anonymous analytics" page and improve code readability.

Screenshot

image

Fixes bug(s)

Part of

@bhattabhi013 bhattabhi013 requested a review from a team as a code owner April 1, 2022 16:18
@codecov-commenter
Copy link

codecov-commenter commented Apr 1, 2022

Codecov Report

❗ No coverage uploaded for pull request base (develop@35457d3). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             develop   #1443   +/-   ##
=========================================
  Coverage           ?   9.15%           
=========================================
  Files              ?     158           
  Lines              ?    6356           
  Branches           ?       0           
=========================================
  Hits               ?     582           
  Misses             ?    5774           
  Partials           ?       0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35457d3...cd09fb7. Read the comment docs.

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Thank you @bhattabhi013 for your PR!
When I said "we should use methods", I just meant that the 2 similar buttons should use the same method, I didn't mean that every Widget should be turned into a method (1/ that's not a good practice - if really you need to move away the code rather create Widget class instead and 2/ that's more work for code reviewers).
That said, the method for both buttons is exactly what I had in mind.
The problem is that the result is not exactly what I expected (actually I was not very explicit about it).
I expected something like that:

v Authorize
x Refuse

with v and x icons on the same pixel column and A and R starting on the same pixel column too. A bit like radio buttons or check boxes.
In your PR they are centered, just like they were before, but the icon is on the left and not on the right anymore...

@bhattabhi013
Copy link
Contributor Author

Thanks for the review @monsieurtanuki, as per the suggestion I will remove extra widgets and revert them back to their original form. I'll also remove extra spaces in app_en.arb.
Please let me know if you have any suggestions in your mind regarding the desired result with buttons alignment.

@monsieurtanuki
Copy link
Contributor

@bhattabhi013 Let's keep it simple: a ListTile would do the trick. Of course with added decoration and padding.

@teolemon teolemon linked an issue Apr 1, 2022 that may be closed by this pull request
@teolemon teolemon added this to the V1 milestone Apr 2, 2022
@bhattabhi013
Copy link
Contributor Author

Hi @monsieurtanuki,
Can you please review the changes? Let me know if any further changes are required.

Updated Screenshot
image

Copy link
Contributor

@monsieurtanuki monsieurtanuki left a comment

Choose a reason for hiding this comment

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

Thank you @bhattabhi013: now the code and the screenshot look very close to what I had in mind!

@monsieurtanuki monsieurtanuki merged commit e7fe8c8 into openfoodfacts:develop Apr 3, 2022
abhay1821 added a commit to abhay1821/smooth-app-1 that referenced this pull request Apr 4, 2022
… page (openfoodfacts#1443)

* fix: analytics screen
* added extra spaces and elevation
* resolved conflicts
M123-dev pushed a commit that referenced this pull request Apr 7, 2022
* Switched unslecteditemcolor according to theme

* fix: Non-aligned button texts and icons on "send anonymous analytics" page (#1443)

* fix: analytics screen
* added extra spaces and elevation
* resolved conflicts

* Merge branch 'develop' of https://github.com/abhay1821/smooth-app-1 into develop

* removed fitted box
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.

Non-aligned button texts and icons on "send anonymous analytics" page
5 participants