Manage Subscriptions interface#2017
Conversation
# Conflicts: # src/app/shared/shared.module.ts
|
Hi @atarix83, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
# Conflicts: # src/app/shared/shared.module.ts
|
I am not seeing my Community and Collection subscriptions on the subscriptions overview page. Item subscriptions do appear. When I navigate to a Community or Collection to which I have subscribed, the subscriptions dialog shows the subscription as expected. I see the rows I would expect in the |
tdonohue
left a comment
There was a problem hiding this comment.
@atarix83 : I tested & reviewed this today. The basics work, but I found quite a few small bugs.
- A user's "Subscription" page doesn't automatically refresh when new subscriptions are added. How to reproduce:
- Login as a user. Visit the "Subscription" page. It should be empty initially.
- Now, browse to a Community/Collection or Item and subscribe to it.
- Go back to your "Subscription" page. It will still be empty.
- Click reload in your browser window. Now, you'll finally see the subscription.
- (This same issue occurs even if you have subscriptions already and add a new one. The new one won't appear until you reload your browser)
- The Subscription popup modal lists "daily, monthly, weekly" (in that order). Ideally, it should say "Daily, Weekly, Monthly". The options should be capitalized, and "Weekly" should appear before "Monthly" as it's a shorter time period.
- It's possible to add an empty frequency subscription by doing the following:
- Create an existing subscription.
- Go back to that same object and click "Subscription" again. This edits the existing subscription.
- Unselect all of the content options. Click Submit.
- The subscription is saved, but it now has no frequency. This shouldn't be valid, as a frequency currently seems to be required. Instead, the subscription should be deleted.
- When looking at your Subscriptions (Under the user menu), they always have an empty Subject, making them impossible to tell apart. Clicking delete also shows an empty name. Here's a screenshot:

- The Subscription modal popup should include the name of the object you are subscribing too. Otherwise, it's difficult to manage subscriptions from the User menu. Clicking "Edit" action in that list of subscriptions displays a popup that doesn't say which subscription you are editing.
src/app/shared/dso-page/dso-page-subscription-button/dso-page-subscription-button.component.ts
Show resolved
Hide resolved
| @@ -0,0 +1,6 @@ | |||
| <button *ngIf="isAuthorized$ | async" data-test="subscription-button" | |||
| (click)="openSubscriptionModal()" | |||
| [ngbTooltip]="'item.page.subscriptions.tooltip' | translate" | |||
There was a problem hiding this comment.
This button is failing accessibility tests because it has no title or aria-label. Please add one or both. They can simply use the same i18n key.
| import { ResourceType } from '../../../core/shared/resource-type'; | ||
|
|
||
| /** | ||
| * The resource type for Group |
There was a problem hiding this comment.
This comment is obviously wrong. This is a for a Subscription.
src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts
Show resolved
Hide resolved
src/app/shared/subscriptions/subscription-modal/subscription-modal.component.ts
Show resolved
Hide resolved
src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
Show resolved
Hide resolved
| templateUrl: './subscriptions-page.component.html', | ||
| styleUrls: ['./subscriptions-page.component.scss'] | ||
| }) | ||
| export class SubscriptionsPageComponent implements OnInit, OnDestroy { |
There was a problem hiding this comment.
Again, please add description or typedocs to describe where this component is used
src/assets/i18n/en.json5
Outdated
|
|
||
| "item.page.claim.tooltip": "Claim this item as profile", | ||
|
|
||
| "item.page.subscriptions.tooltip": "Subscribe", |
There was a problem hiding this comment.
I find it odd that many of the subscription i18n tags start with "item.page" when they are obviously used for Communities, Collections and Items. These same keys are used for all DSOs.
Maybe these should just be named subscriptions.tooltip", etc (drop the entire "item.page" par, and move these down with the other subscriptions.*` keys)?
I don't think these should start with "item.page" as that implies these are only used for items
|
Hi @atarix83, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
|
Hi @tdonohue, I made the requested changes
Fixed (the page previously used the cached values)
Order fixed
I disabled the "Submit" button when no frequencies are selected. The button is also disabled if the user haven't changed the selected frequencies.
Fixed (some parameters have been renamed on back-end)
The name of the object is now showed in the modal Requested changes to the code (comments and specs) are still in progress |
f03b4d9 to
6bfcc25
Compare
|
Regarding this
I think the edit modal should be intended only for changing the preferences, indeed we've added the validation to check if at least one option is selected. To complete unsubscribe the delete button should be use instead. Now the functionalities are quite separated and could be difficult to refactor it |
|
@atarix83 : It's fine to add a note in that box which says something like:
|
|
Hi @tdonohue, I made the remaining changes:
|
There was a problem hiding this comment.
Thanks @davide-negretti and @atarix83 : This is looking good now. Just one minor usability issue. The new "To remove this subscription..." message should ONLY be displayed when you are editing an existing subscription. Currently, it's always displayed on the popup... for instance this is what it looks like when creating a new subscription:

Obviously, this note makes no sense unless you are editing an existing subscription. It doesn't need to be displayed when you are creating a new subscription.
Beyond this small issue, I'm basically +1 this PR (though I'll have to wait on fixes to the backend PR before I can merge it)
…unavailable items
|
@tdonohue I fixed the issue with the delete message, and also the issue with deleted/unaccessible items |
|
Hi @atarix83, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
|
@atarix83 or @davide-negretti : Could one of you rebase this against main? It now has merge conflicts... so I'm waiting to retest this until those are resolved. Thanks! |
There was a problem hiding this comment.
@davide-negretti and @atarix83 : Overall I'm nearly a +1 on this PR. It's looking great. But, I think my previous request about the "To remove this subscription..." message was misunderstood.
I was asking that this message only be displayed when there is an existing subscription that you are editing. So, here's a screenshot where I've clicked on the Subscription button on a Collection & I already have a subscription. So, in this scenario, I expect the message should be displayed (but it is not).
So, here's when I think it should be displayed vs not displayed:
- Click on Subscribe button on a Collection/Community homepage which you are not currently subscribed to. In this scenario, you are creating a new subscription, so the "To remove this subscription.." should not be displayed, as you have no subscription.
- Click on Subscribe button on a Collection/Community homepage which you are already currently subscribed to. In this scenario, your existing subscription options will appear, and you should see the "To remove this subscription..." message. (Because you will not be able to remove your subscription from this page.. instead you have to go to the "Subscriptions" page to remove it.)
- Click on the "Edit" button on your "Subscriptions" page in the Profile. In this scenario, the "To remove this subscription.." message should likely not be displayed, as you are already on the "Subscriptions page. (That said, if it has to be displayed here, I'm OK with it. I just want the first two bullets to be fixed)
Once this message is displayed properly & this PR has it's merge conflicts resolved, then I'm +1 this feature. Thanks for all the hard work as this is looking good!
# Conflicts: # src/app/collection-page/collection-page.component.html # src/app/community-page/community-page.component.html # src/app/core/core.module.ts # src/app/core/data/feature-authorization/feature-id.ts # src/app/shared/shared.module.ts
|
@tdonohue I fixed the issue with the delete messsage. Your initial request was clear but I made an error in the implementation. |
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @davide-negretti and @atarix83 ! I've re-tested today, and this is now working properly. All prior feedback has been addressed.





References
Description
This PR provides the opportunity to manage subscriptions by UI, in particular :
Instructions for Reviewers
To test this PR you should run the UI against this REST PR.
Navigate to a DSO (community, collection or items) and try to subscribe to it. You can try to change the subscription option once you have alredy subscribed to the DSO.
Navigate to the subscriptions overview page to manage all the active subscriptions created.
List of changes in this PR:
Added to each DSO page a button to subscribe to itself

Created a modal to allow to subscribe daily/weekly/monthly updates

Created a new entry to the user menu to access the subscriptions overview page

Created a page to see the overview of user subscriptions and manage them

Include guidance for how to test or review your PR. This may include: steps to reproduce a bug, screenshots or description of a new feature, or reasons behind specific changes.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
yarn lintyarn check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.