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/Backend] Quick fixes for existing CSV Mapper (#4932) #5152

Merged
merged 9 commits into from
Dec 15, 2023

Conversation

CelineSebe
Copy link
Member

@CelineSebe CelineSebe commented Dec 8, 2023

Proposed changes

  • Fix refresh validity status of required inputs when changing entity type => Need to rework the code of the form
  • Look into why there is two fields abstract in type Note
  • Do not send fields authorized_members, casetemplate, authorized_authorities, grantable_groups

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 marked this pull request as draft December 8, 2023 09:47
@CelineSebe CelineSebe self-assigned this Dec 8, 2023
@CelineSebe CelineSebe added the filigran team use to identify PR from the Filigran team label Dec 11, 2023
@CelineSebe CelineSebe marked this pull request as ready for review December 11, 2023 14:38
@CelineSebe CelineSebe added this to the Release 5.13.0 milestone Dec 11, 2023
@lndrtrbn
Copy link
Member

wip

@labo-flg labo-flg self-requested a review December 12, 2023 09:02
@CelineSebe CelineSebe marked this pull request as draft December 12, 2023 09:09
@CelineSebe CelineSebe marked this pull request as ready for review December 12, 2023 17:59
@lndrtrbn
Copy link
Member

lndrtrbn commented Dec 14, 2023

About the following issue (first bullet in Proposed Changes): when changing the entity type inside a representation bloc, the errors were not reset and kept the state of the previous entity.

We needed to rework a bit how errors were managed inside the form. Initially they were managed using useState directly in components and went through components to components using props. But it wasn't working well, so we change this to use the error system given by Formik. There is still some parts of the code that are a bit strange but we had to go for a solution in a given amount of time.

A next step would be to rework the form to create custom components for Representation blocs using the Formik API to fully integrate Formik errors system easily. Out of scope for our case right now.

@SamuelHassine SamuelHassine removed this from the Release 5.13.0 milestone Dec 15, 2023
Copy link
Member

@labo-flg labo-flg left a comment

Choose a reason for hiding this comment

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

We noticed some performance issues with the changes on form validation.
Once you add a dozen representation, try to update the name or add a new representation : this can take several seconds to update.

Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7c65588) 0.00% compared to head (4ca5e3a) 65.59%.
Report is 13 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #5152       +/-   ##
===========================================
+ Coverage        0   65.59%   +65.59%     
===========================================
  Files           0      472      +472     
  Lines           0    59142    +59142     
  Branches        0     4322     +4322     
===========================================
+ Hits            0    38795    +38795     
- Misses          0    20347    +20347     

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

@lndrtrbn lndrtrbn merged commit 37ce2f6 into master Dec 15, 2023
8 checks passed
@lndrtrbn lndrtrbn deleted the issue/4932-chunk1 branch December 15, 2023 11:10
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.

None yet

4 participants