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

[#2707] Fix display of notification preferences in profile #1374

Merged
merged 1 commit into from
Aug 30, 2024

Conversation

pi-sigma
Copy link
Contributor

The notification section in the profile did not the admin's choice to enable/disable the relevant notifications. If the admin disabled notifications about "Samenwerken", they would still be listed.

Taiga: https://taiga.maykinmedia.nl/project/open-inwoner/issue/2707

@codecov-commenter
Copy link

codecov-commenter commented Aug 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.21%. Comparing base (b9e1ac8) to head (0bd87ab).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1374   +/-   ##
========================================
  Coverage    95.21%   95.21%           
========================================
  Files         1005     1005           
  Lines        37185    37203   +18     
========================================
+ Hits         35404    35423   +19     
+ Misses        1781     1780    -1     

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

@pi-sigma pi-sigma marked this pull request as ready for review August 28, 2024 09:36
@pi-sigma pi-sigma requested a review from swrichards August 28, 2024 09:36
Copy link
Collaborator

@swrichards swrichards left a comment

Choose a reason for hiding this comment

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

Optional nitpick only!

Comment on lines 396 to 406
if (
config.notifications_messages_enabled
and self.messages_notifications
and inbox_page_is_published()
):
enabled.append(_("messages"))
if self.plans_notifications and collaborate_page_is_published():
if (
config.notifications_plans_enabled
and self.plans_notifications
and collaborate_page_is_published()
):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nitpick, but we can express the grouped nature with:

if config.notifications_messages_enabled:
    if self.messages_notifications and inbox_page_is_published():
        enabled.append(_("messages"))
    if self.plans_notifications and collaborate_page_is_published():
        enabled.append(_("plans"))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea to make the hierarchy between the options explicit. I'll adopt it.

    - The notification section in the profile did not reflect
      the admin's choice to enable/disable the relevant notifications.
      If the admin disabled notifications about "Samenwerken", they
      would still be incorrectly listed.
@pi-sigma pi-sigma force-pushed the issue/2707-profile-notifications branch from 11d0480 to 0bd87ab Compare August 28, 2024 10:46
@alextreme alextreme merged commit 2b1d3a9 into develop Aug 30, 2024
18 checks passed
@alextreme alextreme deleted the issue/2707-profile-notifications branch August 30, 2024 09:56
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.

4 participants