Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1695 +/- ##
==========================================
- Coverage 98.64% 98.51% -0.13%
==========================================
Files 1074 1088 +14
Lines 24342 24371 +29
==========================================
- Hits 24013 24010 -3
- Misses 329 361 +32 |
ca6733a to
c2ef201
Compare
358bf8a to
e6f6971
Compare
511d290 to
dd65f19
Compare
| end | ||
| end | ||
| end | ||
| end |
Contributor
There was a problem hiding this comment.
This concern and "participable.rb" should probably be merged together? Also, you can probably find name.demodulize.underscore.pluralize in a method over there :)
Contributor
Author
There was a problem hiding this comment.
Ah yeah, sure! I'll merge them :)
Remove unused pagination and filters
32b7e95 to
3879a2a
Compare
Contributor
Author
|
Closing this, superseded by #1784. Commits are the same, but split in different mini-PRs to ease the reviews. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🎩 What? Why?
WIP
We want users to be able to follow some resources in Decidim, we'll start by Meetings as per #1692 but the implementation should take a polymorphic account so following other resources should be easy to implement.
I'm using
ActiveSupport::Notificationsto notify events to the whole application andActiveJobto act on those events.📌 Related Issues
📋 Subtasks
Followentity, which relates a user and aFollowableresource (unique per user/resource combo)Notificationentity, which is related to a user and aFollowableresource. Not unique. Needs to have annotification_typeso that notification templates can be customized in a per-event basis.Followableconcern/module encapsulating all the logic for followable resources (onlyMeetingsin this PR) and make it includeNotifiableevent_classparam toDecidim::Events. The event class must be a class that wraps the event name and the resource and builds the needed information to publish the event to the different subscribers in the system.Followableresource, for each follower trigger a job to create a notification. This job should check whether the resource is notifiable for the given user or not (by default,true, but this might change for proposals - eg. the proposal author does not want to be notified when they update that proposal). This should be checked in thenotifiable?(context)method in theNotifiableconcern. Also,Followableshould set theusers_to_notifymethod tofollowers.Followableconcern and generate system-wide notifications about things that are not followed by a given user.event_classfor each event.EmailNotificationGenerator, with its needed jobs, so that events can generate emails.event_classto generate the logic needed to render the notificationresource_iconinIconHelperto handle processes and assembliesresource.feature.manifest.icon, or fromresource.manifest.icon, so it can be overwritten for specific event classes.Needs to know whether to useiconorexternal_iconmethods, depending on the value, so it isn't that easy.