-
Notifications
You must be signed in to change notification settings - Fork 32
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
[ME] Attached resources field #967
Conversation
Affected libs:
|
ec6ddb9
to
5b090ac
Compare
📷 Screenshots are here! |
47c6139
to
7304c54
Compare
27f5a42
to
e074ac0
Compare
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.
Amazing rework!
Tested the attached resources, it's working great. I just saw that when dropping a file you don't get a mime-type, but when giving an URL you do. Is it obtainable only through the http protocol?
@@ -0,0 +1,12 @@ | |||
<gn-ui-file-input | |||
[maxSizeMB]="10" |
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.
Didn't we say this should be read from the server configuration?
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.
right!! I forgot that... I'll do it in another PR as it also applies to the overviews
libs/feature/editor/src/lib/components/record-form/form-field/form-field.component.spec.ts
Outdated
Show resolved
Hide resolved
...orm/form-field/form-field-attached-resources/form-field-attached-resources.component.spec.ts
Outdated
Show resolved
Hide resolved
… records This change renames the "distributions" field to "onlineResources" on dataset records, similarly to the service records This way, both kinds of records have the same property name, which makes sense because this property contains a mix of online resources The type of the online resources is different for datasets and services, but having the property named the same should simplify things down the line
add missing import too
nx g component online-resource-card --project feature-editor --style=css --changeDetection=OnPush --standalone --path=libs/feature/editor/src/lib/components
The attachedResources field is not preset yet in the model and is simply read from the facade. Eventually it might be put in its own field for simplicity Also adjusts the sortable list to use a proper gn-ui-button
The overview form field works similarly to the attached resources one. The intermediary "overview-upload" component was removed and everything is done in form-field-overviews component. Reading the attachments on overview change has been removed as we don't delete the attachments anymore.
…omponentOutlet This should simplify usage and allow binding output events to the sortable items more easily
This includes: attached-resources, temporal-extents and contacts
Renamed the attached-resources form field component to online-link-resources to match the model terminology
5d2233c
to
25cf5fe
Compare
25cf5fe
to
6bf675c
Compare
Description
This PR introduces the "attached resources" field in the editor. This brought several changes:
distributions
field originally used for online resources in the DatasetRecord model has been renamed toonlineResources
; this is now the same as for ServiceRecord, which will make things easier in the future (hopefully)onlineResources
will be used both for attached resources and distributions, endpoints etc; and we don't want to have a separate field for each in the modelRemaining to do:
save file size and mime type in uploaded resourcesArchitectural changes
The platform service now handles reading a record's attachments as well as uploading new files.
The SortableList component was moved to the
ui/layout
lib.Screenshots
Quality Assurance Checklist
breaking change
labelbackport <release branch>
labelThis work is sponsored by Organization ABC.