Skip to content

feat: 6119 - show edit shortcut in gallery screens #6499

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

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

qq3173732005
Copy link

What

  • Added a small shortcut button to editing mode that displays in the ingredients, nutrition, and packaging gallery screens.

Screenshot

Screenshot_1743393801

Fixes bug(s)

Closes: #6119

@teolemon
Copy link
Member

teolemon commented Apr 1, 2025

Run dart format --set-exit-if-changed .
Formatted packages/smooth_app/lib/pages/product/product_image_swipeable_view.dart
Formatted 572 files (1 changed) in 1.90 seconds.
Error: Process completed with exit code 1.

@qq3173732005
Copy link
Author

qq3173732005 commented Apr 2, 2025

@teolemon Does this mean I need to reformat and push again?

@g123k
Copy link
Collaborator

g123k commented Apr 3, 2025

@teolemon Does this mean I need to reformat and push again?

Yes

Copy link
Collaborator

@g123k g123k left a comment

Choose a reason for hiding this comment

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

I don't understand why you have to hardcode a String.
ImageField is already an enumeration

@github-project-automation github-project-automation bot moved this from 💬 To discuss and validate to 🏗️ In Progress in 🤳🥫 The Open Food Facts mobile app (Android & iOS) Apr 3, 2025
@g123k
Copy link
Collaborator

g123k commented Apr 5, 2025

Also I have some doubts about this icon.
If you are in the Ingredients screen, then you open the photo: what will this button do?

@qq3173732005
Copy link
Author

Also I have some doubts about this icon. If you are in the Ingredients screen, then you open the photo: what will this button do?

If you mean what happens when the user opens the photo from the Edit Ingredients screen, it would take you to another Edit Ingredients screen. Would it be preferable to add the capability to track how the user landed on the photo view, so that it would take the user back to the previous page in this particular case?

@g123k
Copy link
Collaborator

g123k commented Apr 14, 2025

Also I have some doubts about this icon. If you are in the Ingredients screen, then you open the photo: what will this button do?

If you mean what happens when the user opens the photo from the Edit Ingredients screen, it would take you to another Edit Ingredients screen. Would it be preferable to add the capability to track how the user landed on the photo view, so that it would take the user back to the previous page in this particular case?

In that case, the button shouldn't be visible.
But honestly, this feature is really confusing for users, as we already have an Edit button

@qq3173732005
Copy link
Author

qq3173732005 commented Apr 14, 2025

@g123k Maybe I should change this icon to the one displayed in the product information screen (e.g. mixing bowl for ingredients)? That way the only edit icon in the photo view will be for editing the photo.

Or, looking at your Sketch mockup, should I put the edit shortcut in a menu that pops up when selecting the kebab menu in the title bar?

@g123k
Copy link
Collaborator

g123k commented Apr 15, 2025

@g123k Maybe I should change this icon to the one displayed in the product information screen (e.g. mixing bowl for ingredients)? That way the only edit icon in the photo view will be for editing the photo.

Or, looking at your Sketch mockup, should I put the edit shortcut in a menu that pops up when selecting the kebab menu in the title bar?

@teolemon This was your issue.
Any suggestion?

@teolemon
Copy link
Member

The kebab menu would allows craming in Nutri-Patrol as well, and add explicit text in addition to the icon @qq3173732005 @g123k

@codecov-commenter
Copy link

codecov-commenter commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 0% with 40 lines in your changes missing coverage. Please review.

Project coverage is 5.74%. Comparing base (4d9c7fc) to head (6155ae2).
Report is 874 commits behind head on develop.

Files with missing lines Patch % Lines
...ib/pages/product/product_image_swipeable_view.dart 0.00% 40 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           develop   #6499      +/-   ##
==========================================
- Coverage     9.54%   5.74%   -3.81%     
==========================================
  Files          325     511     +186     
  Lines        16411   30371   +13960     
==========================================
+ Hits          1567    1744     +177     
- Misses       14844   28627   +13783     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@qq3173732005
Copy link
Author

Then I'll implement the kebab menu. Is there an issue for the menu that I can link?

@qq3173732005
Copy link
Author

qq3173732005 commented May 11, 2025

What

  • Revised shortcut button to open a popup menu with a button for editing from the gallery screen.

Screenshot

Screenshot_1746929459

Fixes bug(s)

Closes: #6119

At the moment, the menu is empty when pulled up from the Front Packaging screen, with the intention that the report and license buttons from the mockup will be added to it. Is that the preferred way to handle that screen? Should I go ahead and add those buttons too?
Screenshot_1746929532

@g123k
Copy link
Collaborator

g123k commented May 13, 2025

Report and license are implemented in another PR.
So right now, please only show the modal sheet if you have one entry inside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Backlog
Development

Successfully merging this pull request may close these issues.

Add a small shortcut button in the ingredients nutrition and packaging gallery screens to jump into full edit mode
4 participants