Package subscriptions center #644
Open
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.
This PR introduces the subscriptions center. From this page on the user profile (the eye icon), the end goal is to have all the settings for which packages/channels/whatever the user wants to watch and get notifications about.
Resolves #174
Subscription center
For the time being, this is only about subscribing/unsubscribing to packages manually.
I think there may be discussions to have about the approach.
For now, as with the concept of
PackageEditthat is used to customize suggestions before creating issues, here the packages are actually the attributes of derivations. They don't exist as entities inside the database at the moment. Hence why the list of subscribed packages is a simple string array for now. Attributes have been added as an index (hence one of the two migrations you will notice) to optimize searching for an attribute among all the derivations.Automatic notification
When a new suggestion is published, users who have subscribed to one of the packages this suggestion is related to receive a new notification. For now, it uses plain text notifications but in the future we can introduce dedicated notification type to display info in a better rendered way, have links, etc
Individual subscription pages
Each package has its own url
/subscriptions/package/{package_name}to be used externally, and allows the user to subscribe/unsubscribe (and in the future more actions related to the package or finer notification settings).