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

Stojanovic/fe 103 subjects fieled nr docs #105

Merged
merged 11 commits into from
Nov 16, 2023

Conversation

Ducica
Copy link
Contributor

@Ducica Ducica commented Nov 8, 2023

@mirekys Zdar, please take a look:

  • changed error messages during publishing
  • serialize and show the list of errors in case of FE validation not passing in the form feedback component
  • hook for displaying empty fields on first render (to be used in conjuction with invenio's arrayfield, and ours stringarray potentially. I did not put the hook into every array field that we have in nr-docs (i.e. funding, geolocations etc. as I don't see that this functionality would be needed for such fields and it would only bloat the code, but can be easily added in case it is necessary.

@Ducica Ducica marked this pull request as ready for review November 8, 2023 13:57
@Ducica Ducica requested a review from mirekys November 8, 2023 13:57
return (
<CustomMessage negative color="orange">
<Message.Header>{validationErrors?.errorMessage}</Message.Header>
<Message.Header>{BEvalidationErrors?.errorMessage}</Message.Header>
Copy link
Member

Choose a reason for hiding this comment

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

Can you un-capitalize this please (to avoid confusion with a React component name)?

@@ -20,21 +20,33 @@ const CustomMessage = ({ children, ...uiProps }) => {
};
export const FormFeedback = () => {
const { values } = useFormikContext();
const validationErrors = getIn(values, "validationErrors", {});
const BEvalidationErrors = getIn(values, "BEvalidationErrors", {});
const FEvalidationErrors = getIn(values, "FEvalidationErrors", {});
Copy link
Member

Choose a reason for hiding this comment

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

Can you un-capitalize this please (to avoid confusion with a React component name)?

mirekys
mirekys previously approved these changes Nov 16, 2023
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@mirekys mirekys merged commit f007b17 into main Nov 16, 2023
@mirekys mirekys deleted the stojanovic/fe-103-subjects-fieled-nr-docs branch November 16, 2023 15:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants