-
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
Metadata Editor: constraints fields #1032
Conversation
f1c6829
to
2493b54
Compare
Affected libs:
|
@Angi-Kinas I rebased the branch and added some commits to handle the missing cases. The constraints-shortcuts was reworked quite a bit, hopefully it still makes sense to you. I also introduced separate utilities to check whether a constraint matches the "no applicable constraint" or "no known constraint" type, but this is not yet finished. What's also missing is proper styling of the buttons and maybe improve the layout a bit. |
📷 Screenshots are here! |
2493b54
to
0574472
Compare
b7fe7ba
to
8ab6c5f
Compare
...rm/form-field/form-field-constraints-shortcuts/form-field-constraints-shortcuts.component.ts
Outdated
Show resolved
Hide resolved
...components/record-form/form-field/form-field-constraints/form-field-constraints.component.ts
Outdated
Show resolved
Hide resolved
...components/record-form/form-field/form-field-constraints-shortcuts/constraints.utils.spec.ts
Outdated
Show resolved
Hide resolved
...components/record-form/form-field/form-field-constraints-shortcuts/constraints.utils.spec.ts
Outdated
Show resolved
Hide resolved
a2e96ae
to
54f20e7
Compare
feat(ui-inputs): add possibility to hide the upload arrow in the url input component WIP chore: Divide open data license and available licenses, feat: preselect license if already present in the record, toggle based on presence in the record chore: Visually contain constraints list chore: simplify the form-field-open-data logic WIP: split license and constraints into separate components, add constraints to fields.config WIP: changing editor fields configuration to allow for (helper) components, introduce new editor action that will later help with show/hide components, first working version for constraints shortcuts toggle and displaying existing list of constraints feat(editor): handle constraints text and url change in constraint-card feat(editor): save, update and delete constraints in the record, add attach-button for more constraints chore: Remove sticky title from each constraint (withouWrapper) feat(editor): add logic to constraints shortcuts, handle all three different constraint types, enable/disable buttons based on existing constraints chore: Remove console.log chore: update translations chore(style): add line above each constraint card chore: remove unused ng-onchanges chore: Add header for each constraint, add translations chore: add unit tests for form field constraints feat(editor): add new action to EditorFacade which can set the visibility of a field chore: Make translations work feat(converter): support urls on constraints in ISO schemas feat(constraints): show/hide fuctionality chore: Add icon to button "add constraint" chore: Refactor, add TODO
valueChange now emits whenever the url is changed uploadClick was added to handle click on the upload button accepts nullish input value also adjusted consumers of the component
Also adds utilities for determining whether a constraint falls into the "noKnownConstraint" or "noApplicableConstraint" case
…n/no applicable Also addresses review comments
Also fixes some FR translations
c66740b
to
a944d3f
Compare
Also fix an issue with the ISO converter not saving constraints properly
a944d3f
to
e9b7366
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.
Thanks, @Angi-Kinas and @jahow ! I only tested the PR as you already paired on it. I had the feeling I saw an error on an angular hook in the console once, but I cannot reproduce it. Was maybe just due to switching branches. Everything works fine besides that. You just forgot to extract and translate the hint translation key editor.record.form.constraint.markdown.placeholder
I think.
Thank you for the review! |
Description
This PR introduces the possibility to add legal/security/other constraints to a record in the Metadata-Editor.
TODO:
Architectural changes
Changes have been made in the way we use the
EditorField
in order to be able to have two components, one that actually represents the data that will be saved and the other one to show and hide this component.If the
EditorField
has nomodel
but instead acomponentName
this component will be displayed. This is the component that toggles the visibility of the other component.Screenshots
Quality Assurance Checklist
breaking change
labelbackport <release branch>
label