Skip to content

Added Manager, Contributor targeted logic and collapsible filters#3655

Merged
mathjazz merged 15 commits intomozilla:mainfrom
functionzz:feature/messaging_targeting_managers_translators
Jul 31, 2025
Merged

Added Manager, Contributor targeted logic and collapsible filters#3655
mathjazz merged 15 commits intomozilla:mainfrom
functionzz:feature/messaging_targeting_managers_translators

Conversation

@functionzz
Copy link
Copy Markdown
Collaborator

@functionzz functionzz commented May 27, 2025

Resolves #3453
Resolves #3431

One should now be able to singly target managers, translators and contributors of a specific project, and also singly target likewise of a specific locale. Furthermore, it adds collapsible filters to the messaging center, removes the minimum project/locale form requirements, changes the query logic and alters the form both in visuals and core logic.

This PR also includes some minor syntax changes to reflect a more consistent codebase.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented May 27, 2025

Codecov Report

❌ Patch coverage is 10.52632% with 51 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.42%. Comparing base (04c884f) to head (10122db).

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread pontoon/messaging/views.py Outdated
@mathjazz
Copy link
Copy Markdown
Collaborator

This commit addresses #3453

Please make sure you use the right keyword to link to the corresponding issue. :)

Looks like the Locales and Projects sections always appear on the review page: they shouldn't if Locales / Projects Filters are not used.

Also, in the event that no projects/locales are selected (but the filter is used / expanded), the number of recipients should be zero.

At the very end, I'd like to commit minor CSS changes. I think we'll need to use checkboxes instead of arrows to make it clearer when the filter is used. Then we'll also need to update the docs.

@mathjazz
Copy link
Copy Markdown
Collaborator

mathjazz commented May 29, 2025

Please also reference #3431 in the first comment if the intention is to fix that issue, too.

Relatedly, if I don't enable filtering by locale and project, and target all 3 user roles, I'd expect all users to be recipients of the message. But the count for me locally reads 6,766, while there are 23,098 user accounts.

If I select all locales and all projects, the recipient count is 6,069.

@functionzz
Copy link
Copy Markdown
Collaborator Author

Hmm that is very strange

@functionzz functionzz force-pushed the feature/messaging_targeting_managers_translators branch from e16e912 to aa989df Compare May 31, 2025 21:08
@functionzz functionzz requested a review from mathjazz June 2, 2025 13:41
Comment thread pontoon/base/static/css/check-box.css Outdated
Comment thread pontoon/messaging/static/js/messaging.js
Comment thread pontoon/messaging/static/js/messaging.js
Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/templates/messaging/includes/compose.html Outdated
Comment thread pontoon/messaging/templates/messaging/includes/compose.html Outdated
Comment thread pontoon/base/templates/widgets/checkbox.html Outdated
Comment thread pontoon/base/templates/widgets/checkbox.html Outdated
Comment thread pontoon/messaging/templates/messaging/includes/compose.html Outdated
@mathjazz mathjazz self-requested a review June 6, 2025 07:57
Copy link
Copy Markdown
Collaborator

@mathjazz mathjazz left a comment

Choose a reason for hiding this comment

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

Getting there, just a few more minor things!

Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/static/js/messaging.js
Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/static/js/messaging.js Outdated
Comment thread pontoon/messaging/templates/messaging/includes/compose.html Outdated
@functionzz functionzz requested a review from mathjazz June 10, 2025 01:07
Copy link
Copy Markdown
Collaborator

@mathjazz mathjazz left a comment

Choose a reason for hiding this comment

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

!! Please DO NOT merge !!

The PR looks good, great work!

I'll commit a few CSS fixes as agreed previously.

!! Please DO NOT merge !!

@functionzz
Copy link
Copy Markdown
Collaborator Author

I dunno, the green button is very tempting.......

@flodolo
Copy link
Copy Markdown
Collaborator

flodolo commented Jun 11, 2025

ezgif-6d38c7deb816dd

functionzz and others added 12 commits July 31, 2025 16:30
This commit adds collapsible filters to the messaging center, removes the minimum project/locale form requirements, changes the query logic and alters the form both in visuals and core logic.
This commit adds checkboxes instead of a dropdown for filters. It changes many styles. It edits the logic for filtering recipients and adds multiple form fields.
This commit adds validity checks ensuring that toggles are pressed when users fill out various fields. It addresses the review display and the fetch recipients numbers based on the toggle logic.

Also added some minor css style changes and minor form field order changes.
Co-authored-by: Matjaž Horvat <matjaz.horvat@gmail.com>
Co-authored-by: Matjaž Horvat <matjaz.horvat@gmail.com>
@mathjazz mathjazz force-pushed the feature/messaging_targeting_managers_translators branch from cdb0092 to 777666e Compare July 31, 2025 14:30
@mathjazz
Copy link
Copy Markdown
Collaborator

@functionzz @flodolo Made a couple of CSS changes and simplified the code a little:

  • Widgets in collapsible filters are aligned again
  • Checkboxes for collapsible filters are smaller

Please let me know if changes look good to you on stage:
https://mozilla-pontoon-staging.herokuapp.com/messaging/

@flodolo
Copy link
Copy Markdown
Collaborator

flodolo commented Jul 31, 2025

Looks good, didn't look at the functionality itself though.

@mathjazz mathjazz merged commit 353c103 into mozilla:main Jul 31, 2025
4 checks passed
@functionzz functionzz deleted the feature/messaging_targeting_managers_translators branch July 31, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants