-
Notifications
You must be signed in to change notification settings - Fork 438
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enrich local data via the OpenAIRE Graph #1562
Conversation
This pull request introduces 5 alerts when merging a4718b6 into 3ecb3c2 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @LucaGiamminonni! I've just noticed some missing typescript docs. They can be useful if someone tries to override this code to better understand what is the purpose.
selector: 'ds-admin-notifications-broker-source-page-component', | ||
templateUrl: './admin-notifications-broker-source-page.component.html', | ||
}) | ||
export class AdminNotificationsBrokerSourcePageComponent {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing typescript docs
selector: 'ds-notification-broker-page', | ||
templateUrl: './admin-notifications-broker-topics-page.component.html' | ||
}) | ||
export class AdminNotificationsBrokerTopicsPageComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing typescript docs
selector: 'ds-notifications-broker-events-page', | ||
templateUrl: './admin-notifications-broker-events-page.component.html' | ||
}) | ||
export class AdminNotificationsBrokerEventsPageComponent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing typescript docs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LucaGiamminonni : I'm no longer able to test this as the backend doesn't compile & this PR has merge conflicts. But, I did give this a code review today. Overall the code looks well commented & well designed. Obviously we'll need to rename many of these classes eventually to move from "notification broker" (NB) to "quality assurance" (QA) as decided in a dev meeting. Beyond that, I just have a few other inline comments.
Once this & the backend are ready for testing again, I'll gladly give this a test so that I can comment on the UI, user experience, etc.
); | ||
} | ||
|
||
protected computePIDHref(event: OpenaireBrokerEventMessageObject) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This method has many hardcoded URL prefixes which sites may need to occasionally change. I'm wondering if there's a way to move this logic to the backend where it could be more easily configurable? Is there a reason why the prefix needs to be added here in the UI, instead of just making sure the full URL can be sent by the backend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I will modify the rest side resource to include the url in the OpenaireBrokerEventMessageObject
@@ -0,0 +1,21 @@ | |||
.button-rows { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file name has an extra s
before component
. It says .scomponent.scss
templateUrl: './notifications-broker-source.component.html', | ||
styleUrls: ['./notifications-broker-source.component.scss'] | ||
}) | ||
export class NotificationsBrokerSourceComponent implements OnInit { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add TypeDocs
Moving this PR to 7.4 as it won't be possible to review/approve in time for 7.3. We'll instead work to get this merged just after the 7.3 release. |
This pull request introduces 6 alerts when merging a7d2278 into fae355a - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LucaGiamminonni and @frabacche : Gave this a code review today. Overall, it looks great! I found some minor issues and a few questions/suggestions (see inline comments below).
I also wanted to note that some of the bugs I reported in the backend PR are actually frontend issues (e.g. the accessibility issues). So, those will need to be addressed in this PR. See this review for those minor bugs: DSpace/DSpace#8184 (review)
Overall, this looks great. Just minor cleanup necessary and then I'll be +1. Some of this feedback is optional to address...so feel free to let me know if there's anything here you cannot address easily.
...dmin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover.ts
Outdated
Show resolved
Hide resolved
...dmin-quality-assurance-source-page-component/admin-quality-assurance-source-data.reslover.ts
Outdated
Show resolved
Hide resolved
src/app/suggestion-notifications/qa/events/quality-assurance-events.component.html
Fixed
Show resolved
Hide resolved
src/app/suggestion-notifications/qa/events/quality-assurance-events.component.html
Outdated
Show resolved
Hide resolved
...estion-notifications/qa/project-entry-import-modal/project-entry-import-modal.component.html
Outdated
Show resolved
Hide resolved
...estion-notifications/qa/project-entry-import-modal/project-entry-import-modal.component.html
Outdated
Show resolved
Hide resolved
src/app/core/suggestion-notifications/qa/events/quality-assurance-event-data.service.spec.ts
Outdated
Show resolved
Hide resolved
src/app/suggestion-notifications/suggestion-notifications.module.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@frabacche ; I gave this another look today. My prior feedback has been resolved, but there are a few small suggestions I have for the new configurations you've added (see inline below).
I believe the only remaining feedback to address is to try to fix the small bugs mentioned in my review of the backend. The following bugs still exist from that prior report:
- Breadcrumbs are not working properly. They always only have one level. It should be possible to move from a Topic back to the list of topics using the breadcrumbs. (This is visible in the screenshot below where that page doesn't have a parent page in the breadcrumbs)
- All small action buttons (Accept/Ignore/Reject) on a topic page have no accessibility text. This can be easily seen by performing a scan of the page using a browser accessibility plugin like "axe DevTools". See the screenshot.
- I believe the same accessibility issue also exists with the "Actions" buttons on the "Quality Assurance" page. The accessibility text on those buttons is just a number.
- When I visit the page for a topic (like in the screenshot above), I see data logged to my Console window (in Chrome's DevTools). Something looks to be sending all the JSON data to
console.log
?
...
6. The ordering of the "Current Topics" on the initial "Quality Assurance" page (FIXED NOW ON BACKEND/admin/notifications/quality-assurance/openaire
) is unclear & seems to randomly change at times. (WE AGREED it should be alphabetical)
...
9. Finally, ... it'd be nice if there was a way to disable this feature altogether. (By this, I mean that the OpenAIRE quality assurance page should not appear if OpenAIRE integration is somehow disabled. It could be via a boolean setting inFIXED NOW ON BACKENDqaevents.cfg
or maybe it just checks to see if theqaevents.openaire.broker-url
is specified. If so, it's enabled, if not it's disabled.)
All other feedback was addressed. You mentioned the above are being "worked on", so this is just a reminder that I'm waiting on these before giving a +1 vote. Overall, this is nearly ready. The sooner you can get to these changes, the sooner we can get this merged!
src/app/notifications/qa/events/quality-assurance-events.component.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @LucaGiamminonni, for addressing my comments. I'm currently heavily involved in our local projects, and I don't have much time right now, and until the end of the year, to do thorough reviews. Please excuse me for that.
I just want to share with you some concerns I have and what I'm expecting the result to be for this PR:
I expect to have a consistent interface that doesn't break with what the user is used to. So, I expect the site navigation to be consistent.
I also expect the user to be content source-aware. It should be clear at any time that the suggested content came from a specific source (we can have others than OpenAIRE).
This is mainly an admin feature, so perhaps this comment doesn't make sense, but I didn't see themed components. Not sure if needed.
This feature should be source-agnostic, but I saw some references to OpenAIRE (properties, methods).
I'm not intending to block this PR. If @tdonohue understands that this PR can go as is, he can have my +1, and issues can be addressed later on.
src/app/core/notifications/qa/models/quality-assurance-event.model.ts
Outdated
Show resolved
Hide resolved
src/app/core/notifications/qa/models/quality-assurance-event.model.ts
Outdated
Show resolved
Hide resolved
remove console logs Approved-by: Stefano Maffei
add accessibility text Approved-by: Stefano Maffei
CST-12904 breadcrumbs qa Approved-by: Giuseppe Digilio
@frabacche : This appears to have 3 lint errors after the recent updates. Run In the meantime, I'll give it a test in the next few hours and verify everything looks good. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Thanks @frabacche , @FrancescoMolinaro and @LucaGiamminonni ! This all looks good to me now. I gave it another test/review and verified my prior feedback has all been addressed. I also checked @paulo-graca 's feedback and it also looks to be addressed, except for a request for making all components themeable. But, in my opinion, that can be addressed in a later PR as more features will need to be built on this initial PR.
Merging, as this has a +1 from myself, and a prior +1 from @paulo-graca . I've also verified that all of @paulo-graca 's feedback appears to be addressed except for the themed components. But those can be added in later PRs Thanks again to @frabacche , @FrancescoMolinaro , @LucaGiamminonni and the entire 4Science team for their hard work on this new feature! |
References
Description
The features included in this PR are the result of the OpenAIRE Call Innovation funded project "Enrich local data via the OpenAIRE Graph” awarded by 4Science (https://www.openaire.eu/open-call-winner-phase-1-4science). It provides a closer integration between DSpace and two OpenAIRE services, the Notification Broker and the OpenAIRE REST API.
Detailed documentation about the aims of the project, the implementation and the configuration options is available at https://4science.github.io/oaire-eld/#/
This PR regarding only the data correction section. The publication claim will be migrated with other PR.
How to Use / Test
Video: https://github.com/DSpace/DSpace/assets/483997/6db3dd92-1e26-416c-b130-9f5677f7acaa
import-openaire-events
Process (in the Processes Admin UI)Admin menu -> Notifications -> Quality Assurance
page. (The exact number/type of Notifications is defined in the JSON file you imported)