Skip to content

LG-10405: Add full address entry form for PO search (behind feature flag)#8815

Closed
sheldon-b wants to merge 13 commits intomainfrom
sbachstein/lg-10405-manual-address-entry-form
Closed

LG-10405: Add full address entry form for PO search (behind feature flag)#8815
sheldon-b wants to merge 13 commits intomainfrom
sbachstein/lg-10405-manual-address-entry-form

Conversation

@sheldon-b
Copy link
Contributor

WIP

🎫 Ticket

LG-10405

🛠 Summary of changes

tbd

Comment on lines -31 to +40
inPersonFullAddressEntryEnabled: Boolean;
}

function DocumentCapture({
onStepChange = () => {},
inPersonFullAddressEntryEnabled,
}: DocumentCaptureProps) {
function DocumentCapture({ onStepChange = () => {} }: DocumentCaptureProps) {
const [formValues, setFormValues] = useState<Record<string, any> | null>(null);
const [submissionError, setSubmissionError] = useState<Error | undefined>(undefined);
const [stepName, setStepName] = useState<string | undefined>(undefined);
const { t } = useI18n();
const { flowPath } = useContext(UploadContext);
const { trackSubmitEvent, trackVisitEvent } = useContext(AnalyticsContext);
const { inPersonURL } = useContext(InPersonContext);
const { inPersonFullAddressEntryEnabled, inPersonURL } = useContext(InPersonContext);
Copy link
Contributor Author

@sheldon-b sheldon-b Jul 20, 2023

Choose a reason for hiding this comment

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

This is addressing Andrew's feedback from the prior PR for a cleaner way to pass the feature flag into the Document Capture context

Comment on lines +18 to +22

/**
* When true users must enter a full address when searching for a Post Office location
*/
inPersonFullAddressEntryEnabled: boolean;
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 is addressing Andrew's feedback from the prior PR for a cleaner way to pass the feature flag into the Document Capture context

inPersonURL,
inPersonOutageMessageEnabled: inPersonOutageMessageEnabled === 'true',
inPersonOutageExpectedUpdateDate,
inPersonFullAddressEntryEnabled: inPersonFullAddressEntryEnabled === 'true',
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 is addressing Andrew's feedback from the prior PR for a cleaner way to pass the feature flag into the Document Capture context

DocumentCapture,
{
onStepChange: extendSession,
inPersonFullAddressEntryEnabled: inPersonFullAddressEntryEnabled === 'true',
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 is addressing Andrew's feedback from the prior PR for a cleaner way to pass the feature flag into the Document Capture context

@sheldon-b sheldon-b force-pushed the sbachstein/lg-10405-manual-address-entry-form branch from bad88a8 to 8b3959b Compare July 20, 2023 20:46
Comment on lines +46 to +54
// ref allows us to avoid a memory leak
const mountedRef = useRef(false);

useEffect(() => {
mountedRef.current = true;
return () => {
mountedRef.current = false;
};
}, []);
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

I created LG-10435 to track this suggestion.

Comment on lines +68 to +72
setTimeout(() => {
if (mountedRef.current) {
setDisabledAddressSearch(false);
}
}, 250);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure I'm following what and why we're disabling and setting a timeout for an arbitrary time period.

Copy link
Contributor

Choose a reason for hiding this comment

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

I created LG-10435 to track this suggestion.

Comment on lines 51 to 58
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there some custom validation errors we're trying to reset with these calls? I don't see where we're doing that custom validation.

Copy link
Contributor

Choose a reason for hiding this comment

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

I created LG-10435 to track this suggestion.

@sheldon-b sheldon-b force-pushed the sbachstein/lg-10405-manual-address-entry-form branch from 8b3959b to f0723db Compare July 20, 2023 20:48
…-10405-manual-address-entry-form"

This reverts commit f0723db, reversing
changes made to bad88a8.
@tomas-nava
Copy link
Contributor

closing in favor of #8824; comments will be addressed there

@tomas-nava tomas-nava closed this Jul 21, 2023
@tomas-nava tomas-nava deleted the sbachstein/lg-10405-manual-address-entry-form branch July 21, 2023 01:35
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.

3 participants