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

[frontend] Fix error message when attempting to create an artifact without file (#6052) #6090

Merged
merged 13 commits into from
Feb 27, 2024

Conversation

CelineSebe
Copy link
Member

@CelineSebe CelineSebe commented Feb 23, 2024

Proposed changes

  • [Frontend] Add a useEffect to set the errorText in the CustomFileUploader component

Related issues

Checklist

  • I consider the submitted work as finished
  • I tested the code for its functionality
  • I wrote test cases for the relevant uses case
  • I added/update the relevant documentation (either on github or on notion)
  • Where necessary I refactored code to improve the overall quality

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@CelineSebe CelineSebe self-assigned this Feb 23, 2024
@CelineSebe CelineSebe linked an issue Feb 23, 2024 that may be closed by this pull request
@CelineSebe CelineSebe added the filigran team use to identify PR from the Filigran team label Feb 23, 2024
CelineSebe and others added 2 commits February 23, 2024 15:31
Co-authored-by: Laurent Bonnet <146674147+labo-flg@users.noreply.github.com>
@labo-flg
Copy link
Member

Seen in pair review:

it's more like a frontend display issue. The yup validation is working fine as it is in ArtifactCreation. It's just that the error message is not displayed.

We need to pass down the formik errors to the CustomFileUpload so that it's internal error state is updated on formik error received, and not only on the custom error it checks on his own.

This way user gets a good feedback in the form.

As for the observable creation form, it's a lot more work as this is used for all types of observables, without yup validation... and backend errors are not always understandable. See #5454

Copy link

codecov bot commented Feb 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.62%. Comparing base (e1c2692) to head (08195b9).
Report is 46 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6090      +/-   ##
==========================================
+ Coverage   65.71%   67.62%   +1.91%     
==========================================
  Files         539      541       +2     
  Lines       63492    64661    +1169     
  Branches     5131     6094     +963     
==========================================
+ Hits        41722    43726    +2004     
+ Misses      21770    20935     -835     

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

@CelineSebe CelineSebe marked this pull request as ready for review February 23, 2024 16:33
@CelineSebe CelineSebe marked this pull request as draft February 26, 2024 08:21
@CelineSebe CelineSebe marked this pull request as ready for review February 26, 2024 14:19
Copy link
Member

@SarahBocognano SarahBocognano left a comment

Choose a reason for hiding this comment

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

Tested ✅

@CelineSebe
Copy link
Member Author

I just added a createArtifact test. I would appreciate a review of this part if possible.

@SarahBocognano SarahBocognano changed the title [frontend]Fix error message when attempting to create an artifact without file (#6052) [frontend] Fix error message when attempting to create an artifact without file (#6052) Feb 27, 2024
@CelineSebe CelineSebe merged commit c6c2622 into master Feb 27, 2024
8 checks passed
@CelineSebe CelineSebe deleted the issue/6052 branch February 27, 2024 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
filigran team use to identify PR from the Filigran team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No error message when attempting to create an artifact without file
4 participants