-
-
Notifications
You must be signed in to change notification settings - Fork 287
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
Add contribution counts #2973
Comments
I want to work on this issue but I need some help. |
Hey @prathamsoni11! I think we first need to wait for the SDK to allow fetching the contribution counts. Then we can implement the UI for it. |
@VaiTon @prathamsoni11 Actually we don't need to wait, we can already compute the contribution count with a method like that: /// Returns the number of contributions of a [type] by a [userId].
Future<int?> _getMyCount(
final String userId,
final UserProductSearchType type,
final OpenFoodFactsLanguage language,
) async {
final UserProductSearchQueryConfiguration configuration =
UserProductSearchQueryConfiguration(
type: type,
userId: userId,
pageSize: 1,
language: language,
fields: [],
);
final SearchResult result;
try {
result = await OpenFoodAPIClient.searchProducts(
OpenFoodAPIConfiguration.globalUser,
configuration,
queryType: OpenFoodAPIConfiguration.globalQueryType,
);
} catch (e) {
return null;
}
return result.count;
} |
Can we show a dialogue box for the contribution count for this? |
Inline here ? |
Yes, In this section I think so? |
Or we can add it under username like a subtitle in AppBar section |
We have at least 3 to display |
Should we display these 3 in their section only in AppBar like a subtitle? |
@teolemon I tried this but it is not looking good. Should we go for a dialogue box for all 3? |
I think simply showing within the view, above the items would be good, and that was the intent of my screenshot, which I realize was ambiguous. |
ok, now I understand. Sorry, I thought you were asking for a suggestion it's my bad that I didn't understand. |
Heyy, looks good to me, we have no mockup of a Design so this is good But we now have the "edited products" and "Products I photographed" section twice |
As a trailing or subtitle?? |
Trailing is good 👍🏻 |
@M123-dev Done with the final implementation. Please have a look to |
Look great |
Fixed by #3267. |
What
Part of
The text was updated successfully, but these errors were encountered: