-
Notifications
You must be signed in to change notification settings - Fork 45
[backport 2.4.3] [Datahub] Fix Links Section Display in record #1170
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
base: main
Are you sure you want to change the base?
Conversation
|
|
| allLinks$ = this.metadata$.pipe( | ||
| map((record) => | ||
| record.kind === 'dataset' && 'onlineResources' in record | ||
| (record.kind === 'dataset' || record.kind === 'reuse') && 'onlineResources' in record |
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.
I think you can just remove the condition on the record kind; this was there for historical reasons but now all records have an onlineResources property
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.
Also could you please add a test for this? thanks!
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 as I said, allLinks$ return a Observable<DatasetOnlineResource[]> but if I remove record.kind === 'dataset', it return a Observable<DatasetOnlineResource[] | ServiceOnlineResource[]>.
So everywhere it used it create a typing error.
I could fix that but It's likely to change the code to an extent I'm not familiar with.
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.
Oh right... Then ok your change makes sense. 🙂 Please let us know if you need help for the test
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 I'll see it and let you know !
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.
Hello @jahow I get back to you to find out what type of test to add.
In mdview.facade.spec.ts existing tests seems to cover all requirements and passes correctly.
Description
This PR fix the filter of links section disply in record "reuse".
The application should display the links if they exist in the record, reuse or not, as it worked before v2.4
Linked to issue-1169
Architectural changes
Filter modified in mdview-facade.ts to get links in reuse record.
If needed, the filter can be remove but this implies a change in the typing of the elements returned, and therefore deeper changes in the code.
Screenshots
Before
After
Quality Assurance Checklist
breaking changelabelbackport <release branch>labelHow to test
Open a interactiveMap or map record, see the links displayed in the right section