Created ListableNotificationObject#1936
Conversation
…istableNotificationObjectComponent_contribute-7.2 # Conflicts: # src/app/shared/shared.module.ts # src/assets/i18n/en.json5
tdonohue
left a comment
There was a problem hiding this comment.
@alexandrevryghem : I gave this a review today, and while the code looks reasonable, I'm not understanding how this is supposed to work in the codebase.
I expected that this new ListableNotificationObject would be used elsewhere in our code to automatically trigger a ListableNotificationObject to be created if the corresponding ListableObject could not be loaded (based on the screenshot you show above).
However, it appears this new ListableNotificationObject is unused in our codebase & the only way to use it would be to create custom code. Is that accurate? Or, am I misunderstanding how this is used by our codebease.
If this ListableNotificationObject is unused at this time, then I'd recommend we wait to add it into the codebase until there is a real use case in the DSpace codebase.
| "person.orcid.registry.auth": "ORCID Authorizations", | ||
| "home.recent-submissions.head": "Recent Submissions", | ||
|
|
||
| "idle-modal.extend-session": "Extend session", |
There was a problem hiding this comment.
This appears to be a duplicative i18n key. It already exists on line 4582, so it can be removed from this line
83144cb to
82e588b
Compare
…ully retrieve the next page of DSOs
82e588b to
4897110
Compare
4897110 to
a0c3ca5
Compare
|
The To test this you need to click on add Item/Collection/Community in the admin sidebar and when you see the results you have loaded the first page of results you need to stop Solr. When you scroll down the next page DSO objects won't be successfully retrieved and an error will be displayed in between other DSO objects. If you start Solr back up you can click on the error notification and the error message should disappear and the next DSO objects will be added to the list. |
tdonohue
left a comment
There was a problem hiding this comment.
👍 Thanks @alexandrevryghem ! I gave this another look today & I was able to successfully test it using this "New -> Item" popup (and stopping Solr immediately after loading that page). After I restarted Solr, clicking on the "Something went wrong.." message loaded the next results.
Description
@listableObjectsComponentscould not handle failedRemoteDataobjects. To fix this a new component and his model were created, they can be used to display error messages (also works for success, info and warning messages) in lists in between the successfulRemoteDataobjects.(To display error notifications like above extra configuration is needed. You will need to iterate over your list of
RemoteDataobjects to ensure that you only return the payload of theRemoteData<T>if it exists , if it doesn't exist you need to return a newListableNotificationObject)Instructions for Reviewers
List of changes in this PR:
ListableNotificationObjectLISTABLE_NOTIFICATION_OBJECTExpandableNavbarSectionComponentwas not present in theENTRY_COMPONENTS. This caused it to sometimes load to slow which in turn caused some layout issues)Guidance for how to test or review this PR:
ds-listable-notification-objecton the home page and give with valuenew ListableNotificationObject(NotificationType.Error, 'Error message')for the field object.Checklist
yarn run lintpackage.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.