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

Sync polls rules error handling (PSG-1126) #7324

Merged
merged 5 commits into from
Feb 1, 2023

Conversation

alfogrillo
Copy link
Contributor

Description

This PR adds an error state in the notification settings to be seen whenever the normal messages rules don't match the one of polls.

Dependency

#7320

Result

poc-error

@alfogrillo alfogrillo changed the title Sync polls rulles error handling (PSG-1126) Sync polls rules error handling (PSG-1126) Jan 31, 2023
@alfogrillo alfogrillo requested review from a team, phloux and pixlwave and removed request for a team and phloux January 31, 2023 14:31
@codecov
Copy link

codecov bot commented Jan 31, 2023

Codecov Report

Base: 12.00% // Head: 11.99% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (4f5dfe3) compared to base (2ead5ed).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #7324      +/-   ##
===========================================
- Coverage    12.00%   11.99%   -0.01%     
===========================================
  Files         1630     1630              
  Lines       161448   161481      +33     
  Branches     66234    66263      +29     
===========================================
- Hits         19377    19374       -3     
- Misses      141427   141463      +36     
  Partials       644      644              
Flag Coverage Δ
uitests 55.26% <0.00%> (-0.11%) ⬇️
unittests 5.92% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...ings/Notifications/View/NotificationSettings.swift 0.00% <0.00%> (ø)
...ions/ViewModel/NotificationSettingsViewModel.swift 0.00% <0.00%> (ø)
...ions/ViewModel/NotificationSettingsViewState.swift 0.00% <0.00%> (ø)
...ojiPicker/Data/EmojiMart/EmojiItem+EmojiMart.swift 95.34% <0.00%> (-0.31%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Member

@pixlwave pixlwave left a comment

Choose a reason for hiding this comment

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

Ok, code looks good to me, but it seems like a really weird change to me.

If another client added more granular support for changing push rules (which iirc are per account rather than per device), and a user decided to let users disable notifications for polls (seems a valid thing to not care about your day being interrupted by), then we're going to show errors for that user when they chose it configure it that way.

Did we consider running a one-time update of the rules to our new defaults, and then letting the user set them as they would like without considering it to be an error?

@alfogrillo
Copy link
Contributor Author

Ok, code looks good to me, but it seems like a really weird change to me.

If another client added more granular support for changing push rules (which iirc are per account rather than per device), and a user decided to let users disable notifications for polls (seems a valid thing to not care about your day being interrupted by), then we're going to show errors for that user when they chose it configure it that way.

Did we consider running a one-time update of the rules to our new defaults, and then letting the user set them as they would like without considering it to be an error?

I think the rational was to make the Element's UX easier for the user.
There is a related discussion here if you want to contribute! 🙏🏻
I'm not considering this a blocker for now anyway.

@pixlwave
Copy link
Member

No, not a blocker for sure, just felt it doesn't look at the wider picture of Matrix as a whole :)

@alfogrillo alfogrillo force-pushed the alfogrillo/sync_polls_rulles_error_handling branch from 54404a0 to 241a1fc Compare February 1, 2023 10:43
Base automatically changed from alfogrillo/sync_polls_rules to develop February 1, 2023 11:47
@sonarcloud
Copy link

sonarcloud bot commented Feb 1, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@alfogrillo alfogrillo merged commit c6ea789 into develop Feb 1, 2023
@alfogrillo alfogrillo deleted the alfogrillo/sync_polls_rulles_error_handling branch February 1, 2023 13:58
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.

2 participants