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

10074 bug: Auto Scroll Issues on Petitions Clerk Create Case Form (and more) -- Updates #5419

Merged
merged 6 commits into from
Oct 11, 2024

Conversation

Mwindo
Copy link
Contributor

@Mwindo Mwindo commented Oct 2, 2024

10074 became "fix a bunch of validation quirks." (See original PR.) UX discovered a few other validation quirks that this PR addresses.

Comment on lines +125 to +134
.description('The first name of the practitioner.')
.messages({
'*': 'Enter first name',
}),
lastName: JoiValidationConstants.STRING.max(100)
.required()
.description('The last name of the practitioner.'),
.description('The last name of the practitioner.')
.messages({
'*': 'Enter last name',
}),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise, this will say, e.g., "firstname" is required

@@ -18,11 +18,9 @@ export const filingPartiesFormHelper = (
PARTY_TYPES,
} = applicationContext.getConstants();

const partyValidationError =
const partyValidationCheckboxError =
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We were displaying the validationErrors.otherFilingParty twice, once in the general form and again in the nested child form. We now just show it in the latter.

@@ -10,7 +11,7 @@ export const validateAddPractitionerSequence = [
validate: [
validateAddPractitionerAction,
{
error: [setValidationErrorsAction],
error: [setValidationErrorsAction, setValidationAlertErrorsAction],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sync the error banner with the validation errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This happens in a few other places in this PR.

import { shouldValidateAction } from '@web-client/presenter/actions/shouldValidateAction';
import { validateCustomCaseReportFiltersAction } from '@web-client/presenter/actions/validateCustomCaseReportFiltersAction';

export const validateCustomCaseReportSequence = [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The custom case report wasn't live validating.

@@ -77,7 +75,7 @@ export const StartCaseInternal = connect(
>
<div className="blue-container">
<IRSNotice
validateFormData={validateCaseDetailSequence}
validateFormData={validatePetitionFromPaperSequence}
Copy link
Contributor Author

@Mwindo Mwindo Oct 2, 2024

Choose a reason for hiding this comment

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

We're using this everywhere else in this component, and I saw no good reason for the mismatch. Instead, it led to errors not syncing correctly in the ErrorNotification banner,

@Mwindo Mwindo added the to test label Oct 2, 2024
@Mwindo Mwindo marked this pull request as ready for review October 3, 2024 11:40
@Mwindo Mwindo merged commit 0913420 into ustaxcourt:test Oct 11, 2024
44 checks passed
@Mwindo Mwindo mentioned this pull request Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants