-
Notifications
You must be signed in to change notification settings - Fork 75
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
fix: add validation to fileupload and fileuploadwithtag when editing component id #13445
fix: add validation to fileupload and fileuploadwithtag when editing component id #13445
Conversation
8649808
to
1511731
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13445 +/- ##
==========================================
+ Coverage 95.17% 95.19% +0.01%
==========================================
Files 1470 1471 +1
Lines 20223 20284 +61
Branches 2444 2453 +9
==========================================
+ Hits 19248 19310 +62
+ Misses 870 869 -1
Partials 105 105 ☔ View full report in Codecov by Sentry. |
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.
Great job! 🚀
I think we should also perform this check when creating or uploading a datamodel given that if a FileUpload already uses the name, it will override the FileUpload datatype in the application metadata. Here is an example :
datamodel-name.mov
...-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx
Outdated
Show resolved
Hide resolved
...-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx
Outdated
Show resolved
Hide resolved
...-editor/src/components/Properties/PropertiesHeader/EditComponentIdRow/EditComponentIdRow.tsx
Outdated
Show resolved
Hide resolved
…naming-fileupload-components
Co-authored-by: Michael <michael.queyrichon@digdir.no>
Rename validation key in nb.json already used for datamodelnames Update related tests
...elopment/features/dataModelling/SchemaEditorWithToolbar/TopToolbar/CreateNewWrapper.test.tsx
Fixed
Show fixed
Hide fixed
22f66cb
to
feaee36
Compare
d28ffbd
to
202159d
Compare
@mlqn I did some changes based on your feedback. Creating a new datamodel now validates by also checking if the name exists on datatypes in applicationmetadata. I did some refactoring of this popover, making the validation update on change and removing some unnecessary code. |
…naming-fileupload-components
…naming-fileupload-components
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.
Nice work! 🚀
@Jondyr forslag til ny tekst:
Bare ta kontakt på Slack hvis du lurer på noe :-). |
Co-authored-by: Gørild Døhl <gorild.dohl@digdir.no>
@Ildest Bra forslag, tekstnøklene er nå oppdatert 👍 |
Jeg kan også nevne at det er flere andre problemer med dette feltet: #13364, men jeg vil foreslå å fikse det senere i en separat sak |
…naming-fileupload-components
…naming-fileupload-components
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.
Tested ok 🫡
…naming-fileupload-components
Description
Added validation when editing component id for
FileUpload
andFileUploadWithTag
component types in ux-editor. Also moveduseAppMetadataQuery
toapp-shared
, to avoid depending onapp-development
in theux-editor
package.This should fix both issues linked below.
Related Issue(s)
ref-data-as-pdf
should not be allowed as a model or FileUpload/FileUploadWithTag component name #13171Verification
Documentation