Skip to content
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

Resourceadm: improve validation #12683

Merged
merged 18 commits into from
Apr 23, 2024
Merged

Conversation

mgunnerud
Copy link
Contributor

Description

  • Resource identifier must be at least 4 characters
  • Trim Resource title, description and rightsDescription before saving
  • Validate that Resource title, description and rightsDescription are not empty strings or whitespace in backend
  • When a resource is of type "Maskinporten skjema", at least one of the references in resourceReference must have referenceType == "MaskinportenScope" validation frontend and backend
  • Save resource reference select fields on change, not on blur
  • Save resource version field on change, not on blur
  • UU improvement for edit button label
  • Fix button sizing so buttons in horizontal button row have consistent sizing

Related Issue(s)

Verification

  • Your code builds clean without any errors or warnings
  • Manual testing done (required)
  • Relevant automated test added (if you find this hard, leave it and we'll help out)

Documentation

  • User documentation is updated with a separate linked PR in altinn-studio-docs. (if applicable)

@mgunnerud mgunnerud linked an issue Apr 18, 2024 that may be closed by this pull request
@mgunnerud mgunnerud marked this pull request as draft April 18, 2024 13:43
@github-actions github-actions bot added the solution/studio/designer Issues related to the Altinn Studio Designer solution. label Apr 18, 2024
Copy link

codecov bot commented Apr 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.19%. Comparing base (3387181) to head (c7f69a6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #12683   +/-   ##
=======================================
  Coverage   90.18%   90.19%           
=======================================
  Files        1299     1299           
  Lines       18573    18588   +15     
  Branches     2261     2261           
=======================================
+ Hits        16750    16765   +15     
  Misses       1564     1564           
  Partials      259      259           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mgunnerud mgunnerud marked this pull request as ready for review April 19, 2024 06:44
@mgunnerud mgunnerud requested a review from a user April 19, 2024 06:44
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! 😄
A few comments added

@mgunnerud mgunnerud merged commit 8322279 into main Apr 23, 2024
16 checks passed
@mgunnerud mgunnerud deleted the 12678-resourceadm-improve-validation branch April 23, 2024 21:17
Jondyr pushed a commit that referenced this pull request Jun 10, 2024
* show error if reference field does not contain MaskinportenScope reference

* trim translation fields before save and validate

* resource identifier must be at least 4 characters

* UU improvement: add aria label to explain which field is edited

* consistent button sizing

* save resource reference select values on change instead of blur

* agressive saving of resource version: save on change, not blur

* add backend validation

* improve accessible labels
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solution/studio/designer Issues related to the Altinn Studio Designer solution.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Resourceadm: improve validation
1 participant