prologin / concours-site

Source code of the Prologin contest website
https://gitlab.com/prologin/concours/site
GNU General Public License v3.0
10 stars 6 forks source link

dev_forumtification: added backend for notification system #345

Closed TheoHollender closed 2 years ago

TheoHollender commented 3 years ago

Beggining of work for the #294 issue, added backend code to calculate notifications for subscribed threads.

codecov[bot] commented 3 years ago

Codecov Report

Merging #345 (f78ccfb) into master (4da0c9d) will increase coverage by 0.19%. The diff coverage is 79.09%.

:exclamation: Current head f78ccfb differs from pull request most recent head da4960e. Consider uploading reports for the commit da4960e to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #345      +/-   ##
==========================================
+ Coverage   51.45%   51.64%   +0.19%     
==========================================
  Files         197      210      +13     
  Lines        9632     9788     +156     
==========================================
+ Hits         4956     5055      +99     
- Misses       4676     4733      +57     
Impacted Files Coverage Δ
prologin/forum/urls.py 100.00% <ø> (ø)
prologin/oidc_policy/apps.py 0.00% <0.00%> (ø)
prologin/oidc_policy/oidc_authz.py 100.00% <ø> (ø)
prologin/oidc_policy/oidc_scopes.py 0.00% <ø> (ø)
prologin/users/admin.py 100.00% <ø> (ø)
prologin/users/tests.py 100.00% <ø> (ø)
prologin/forum/views.py 65.50% <37.73%> (-5.71%) :arrow_down:
prologin/users/rules.py 72.00% <50.00%> (+12.62%) :arrow_up:
prologin/forum/models.py 79.77% <50.90%> (-7.79%) :arrow_down:
prologin/oidc_policy/models.py 96.42% <96.42%> (ø)
... and 28 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4da0c9d...da4960e. Read the comment docs.

TheoHollender commented 3 years ago

Actual Look of the System : When there is no notifications : image Notification with one message : image Notification with two : image Notification with three or more : image

TheoHollender commented 3 years ago

And the look of the subscribe to a thread part (might need an adjustement for the image cause i haden't any to pick) Unsubscribe : image Subscribe : image

lportemo commented 3 years ago

I also see that you used the @cached_property on a method that returns a queryset. You should not do that as it may intefere with the django caching backend.

juli0z commented 2 years ago

Migrated to https://gitlab.com/prologin/concours/site/-/merge_requests/345