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: Differentiate features available only for moderators #10037

Merged

Conversation

deveshidwivedi
Copy link
Contributor

What

Added visual signals to distinguish features exclusive to moderators. This helps prevent confusion and also makes it easier to spot specific functionalities.

Screenshot

Related issue(s) and discussion

@deveshidwivedi deveshidwivedi requested a review from a team as a code owner March 26, 2024 23:45
@github-actions github-actions bot added ✏️ Editing CSS Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. labels Mar 26, 2024
@stephanegigandet
Copy link
Contributor

Thanks for the PR @deveshidwivedi ! For PRs that change the website, it's a good idea to add a screenshot that show the results of the changes, so that people can see them without having to test your code locally.

image

In the issue @CharlesNepote said "We should visually identify features that are only available for moderators.", but there wasn't any details on how to do this visual differenciation.

With your PR there is a differenciation, but there is no way for users to understand what this visual differenciation is about. I think we should make it more clear, with some text "Moderator feature" maybe.

@teolemon
Copy link
Member

teolemon commented Mar 27, 2024

@stephanegigandet We could use the shield/police material symbols, and also have a distinctive color, like "traffic light orange" or "construction yellow"

@alexfauquette
Copy link
Member

And the shield could have a tooltip explaining why it is here

@deveshidwivedi
Copy link
Contributor Author

@stephanegigandet I have tried to incorporate the above suggestions but am unable to view the edit page as an admin. I have implemented the css on another element to check if it works before committing. Could you please help me resolve this issue so that I could add the screenshot for everyone to view?

@hangy
Copy link
Member

hangy commented Mar 28, 2024

@stephanegigandet I have tried to incorporate the above suggestions but am unable to view the edit page as an admin. I have implemented the css on another element to check if it works before committing. Could you please help me resolve this issue so that I could add the screenshot for everyone to view?

Make yourself a moderator, see #9684 (comment)

@deveshidwivedi
Copy link
Contributor Author

Thank you! @hangy

@deveshidwivedi
Copy link
Contributor Author

Hello everyone! Could you please give feedback on the recent updates based on the suggestions:

Screenshot 2024-03-29 131235

On hovering(specific element):
image

@stephanegigandet @alexfauquette @teolemon @hangy @alexgarel
Thanks!

@stephanegigandet
Copy link
Contributor

. I have implemented the css on another element to check if it works before committing.

Hi @deveshidwivedi , thanks for adding the shield. It looks a bit weird on some of the elements:

image

The first one looks good I think, but on the checkbox and on the "manage images" dropdown, we don't have the yellow color and the shield position could be improved I think.

Have you been able to make yourself an admin and moderator?

@deveshidwivedi
Copy link
Contributor Author

@stephanegigandet I was able to make myself the moderator and hence tested and updated the styling. Could you please take a look at the recent changes?

@codecov-commenter
Copy link

codecov-commenter commented Mar 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.58%. Comparing base (dc04d18) to head (465dc64).
Report is 200 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10037      +/-   ##
==========================================
+ Coverage   49.54%   49.58%   +0.03%     
==========================================
  Files          67       70       +3     
  Lines       20650    20933     +283     
  Branches     4980     5019      +39     
==========================================
+ Hits        10231    10379     +148     
- Misses       9131     9264     +133     
- Partials     1288     1290       +2     

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

Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link
Contributor

@stephanegigandet stephanegigandet left a comment

Choose a reason for hiding this comment

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

It looks good to me, thank you!

@stephanegigandet stephanegigandet enabled auto-merge (squash) April 2, 2024 15:29
@stephanegigandet stephanegigandet merged commit af657f2 into openfoodfacts:main Apr 2, 2024
12 checks passed
@deveshidwivedi deveshidwivedi deleted the featmoderator-only branch April 2, 2024 17:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS ✏️ Editing Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

UI: identify features that are only available for moderators
6 participants