From a621f6566f4413efaa097fdf061a9bf2b83804ae Mon Sep 17 00:00:00 2001 From: Phillip Kelly Date: Fri, 15 Mar 2024 16:34:02 -0400 Subject: [PATCH] DIG-4148: Phone Number field on registration not dynamic --- .../src/__snapshots__/Storyshots.test.ts.snap | 30 +++---- .../DeviceVerificationForm.tsx | 30 ++++++- .../__snapshots__/Storyshots.test.ts.snap | 20 ++--- .../__snapshots__/Storyshots.test.ts.snap | 90 ++++++++++++------- .../__snapshots__/Storyshots.test.ts.snap | 48 +++++----- 5 files changed, 137 insertions(+), 81 deletions(-) diff --git a/modules-js/react-fleet/src/__snapshots__/Storyshots.test.ts.snap b/modules-js/react-fleet/src/__snapshots__/Storyshots.test.ts.snap index 6cc298a2c..b121ee300 100644 --- a/modules-js/react-fleet/src/__snapshots__/Storyshots.test.ts.snap +++ b/modules-js/react-fleet/src/__snapshots__/Storyshots.test.ts.snap @@ -1620,7 +1620,7 @@ exports[`Storyshots Form Elements|Inputs/MemorableDateInput onlyAllowFuture 1`] id="future-year" max="9999" maxLength={4} - min={2023} + min={2024} name="year" onBlur={[Function]} onChange={[Function]} @@ -1770,7 +1770,7 @@ exports[`Storyshots Form Elements|Inputs/MemorableDateInput onlyAllowFuture and id="story-year" max="9999" maxLength={4} - min={2023} + min={2024} name="year" onBlur={[Function]} onChange={[Function]} @@ -1920,7 +1920,7 @@ exports[`Storyshots Form Elements|Inputs/MemorableDateInput onlyAllowFuture and id="story-year" max={2040} maxLength={4} - min={2023} + min={2024} name="year" onBlur={[Function]} onChange={[Function]} @@ -2070,7 +2070,7 @@ exports[`Storyshots Form Elements|Inputs/MemorableDateInput onlyAllowFuture and id="story-year" max={2040} maxLength={4} - min={2023} + min={2024} name="year" onBlur={[Function]} onChange={[Function]} @@ -2218,7 +2218,7 @@ exports[`Storyshots Form Elements|Inputs/MemorableDateInput onlyAllowPast 1`] = @@ -2624,7 +2624,7 @@ exports[`Storyshots Form Elements|Inputs/TextInput error 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -2694,7 +2694,7 @@ exports[`Storyshots Form Elements|Inputs/TextInput variations 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -2875,7 +2875,7 @@ exports[`Storyshots Form Elements|SelectDropdown default 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -2928,7 +2928,7 @@ exports[`Storyshots Form Elements|SelectDropdown variants 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -4450,7 +4450,7 @@ exports[`Storyshots ProgressBar default 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -4511,7 +4511,7 @@ exports[`Storyshots ProgressBar first step (interactive demo) 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -4572,7 +4572,7 @@ exports[`Storyshots ProgressBar last step (interactive demo) 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -4633,7 +4633,7 @@ exports[`Storyshots ProgressBar with task name 1`] = ` style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > diff --git a/services-js/access-boston/src/client/device-verification/DeviceVerificationForm.tsx b/services-js/access-boston/src/client/device-verification/DeviceVerificationForm.tsx index a9c4bbb2d..c5368d507 100644 --- a/services-js/access-boston/src/client/device-verification/DeviceVerificationForm.tsx +++ b/services-js/access-boston/src/client/device-verification/DeviceVerificationForm.tsx @@ -1,4 +1,7 @@ -import React from 'react'; +/** @jsx jsx */ + +import { jsx, css } from '@emotion/core'; + import { FormikProps } from 'formik'; import Link from 'next/link'; @@ -79,7 +82,7 @@ export default function DeviceVerificationForm(props: Props) {
-
+ {phoneOrEmail === 'phone' && ( <>
@@ -181,3 +185,25 @@ export default function DeviceVerificationForm(props: Props) { ); } + +export const FIELD_STYLING = css(` + input.txt-f { + min-width: 10.8rem; + } + + input.txt-email { + min-width: 18rem; + width: 100%; + } + + @media screen and (max-width: 540px) { + input.txt-f { + min-width: 10.7rem; + } + + input.txt-email { + min-width: 12rem; + width: 100%; + } + } +`); diff --git a/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap b/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap index d236b20d6..64a39df93 100644 --- a/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap +++ b/services-js/access-boston/src/stories/__snapshots__/Storyshots.test.ts.snap @@ -3578,7 +3578,7 @@ exports[`Storyshots Confirm-Identity Review 1`] = ` className="txt-f" disabled={true} id="dob-year" - max={2023} + max={2024} maxLength={4} min="1000" name="year" @@ -4005,7 +4005,7 @@ exports[`Storyshots Confirm-Identity Validate 1`] = `

- You’ve got your permit and may begin working. Please contact the Building Inspection unit to schedule an inspection and keep your project on track! -

+ dangerouslySetInnerHTML={ + Object { + "__html": "You’ve got your permit and may begin working. Please contact the Building Inspection unit to schedule an inspection and keep your project on track!", + } + } + />
    @@ -1789,9 +1792,12 @@ Array [

- Thanks for your application! Staff is reviewing your application to ensure that all fees are properly calculated and we have the information needed to start processing it. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "Thanks for your application! Staff is reviewing your application to ensure that all fees are properly calculated and we have the information needed to start processing it.", + } + } + />
    @@ -2322,9 +2328,12 @@ Array [

- Congratulations! Once you get your permit and make sure all fees are paid you will be ready to get to work. Please make sure your permit is posted in a visable location to make sure your commmunity knows your work is allowed. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "Congratulations! Once you get your permit and make sure all fees are paid you will be ready to get to work. Please make sure your permit is posted in a visable location to make sure your commmunity knows your work is allowed.", + } + } + />
    @@ -3374,9 +3383,12 @@ Array [

- You’re almost there. We need one final check to make sure your space is safe to use. Staff is in the process of evaluating your certificate of occupancy. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "You’re almost there. We need one final check to make sure your space is safe to use. Staff is in the process of evaluating your certificate of occupancy.", + } + } + />
    @@ -3893,9 +3905,12 @@ Array [

- Your project plan is under review by a plans examiner familiar with local building and zoning codes. We’re working with agencies throughout the City to ensure your project meets all applicable codes and regulatory requirements. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "Your project plan is under review by a plans examiner familiar with local building and zoning codes. We’re working with agencies throughout the City to ensure your project meets all applicable codes and regulatory requirements.", + } + } + />
    @@ -4436,9 +4451,12 @@ Array [

- You should have received an official letter from ISD informing you of the status of your application. If we have requested more information please contact your plans examiner. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "You should have received an official letter from ISD informing you of the status of your application. If we have requested more information please contact your plans examiner.", + } + } + />
    @@ -5418,9 +5436,12 @@ Array [

- Your application requires an on-site inspection to be processed further. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "Your application requires an on-site inspection to be processed further. ", + } + } + />
    @@ -5867,9 +5888,12 @@ Array [

- Thanks for your application! Staff is reviewing your application to ensure that all fees are properly calculated and we have the information needed to start processing it. -

+ dangerouslySetInnerHTML={ + Object { + "__html": "Thanks for your application! Staff is reviewing your application to ensure that all fees are properly calculated and we have the information needed to start processing it.", + } + } + />
    @@ -6334,9 +6358,12 @@ Array [

    - Congratulations! Once your permit is paid for and you get your fire prevention permit, you’re ready to start your project and get to work. -

    + dangerouslySetInnerHTML={ + Object { + "__html": "Congratulations! Once your permit is paid for and you get your fire prevention permit, you’re ready to start your project and get to work.", + } + } + />
      @@ -7244,9 +7271,12 @@ Array [

      - Your permit application is under review by a team of fire prevention professionals at BFD. Review time varies based on permit type. Asbestos Removal, Bag Smoke Detectors, Construction-Demolition-Renovation, Cutting-Burning-Welding, Tank Removal, Temporary Dumpster and Smoke/CO Inspection are generally completed in 2–4 days. Other requests are generally completed in 10–15 days. -

      + dangerouslySetInnerHTML={ + Object { + "__html": "Your permit application is under review by a team of fire prevention professionals at BFD. Review time varies based on permit type. Asbestos Removal, Bag Smoke Detectors, Construction-Demolition-Renovation, Cutting-Burning-Welding, Tank Removal, Temporary Dumpster and Smoke/CO Inspection are generally completed in 2–4 days. Other requests are generally completed in 10–15 days. ", + } + } + />
        diff --git a/services-js/registry-certs/client/__snapshots__/Storyshots.test.ts.snap b/services-js/registry-certs/client/__snapshots__/Storyshots.test.ts.snap index ffee63e4f..41055a109 100644 --- a/services-js/registry-certs/client/__snapshots__/Storyshots.test.ts.snap +++ b/services-js/registry-certs/client/__snapshots__/Storyshots.test.ts.snap @@ -10066,7 +10066,7 @@ exports[`Storyshots Birth/Question Components/PersonalInformation birth too rece @@ -39236,7 +39236,7 @@ exports[`Storyshots Common Components/DateRangePicker default 1`] = ` @@ -39449,7 +39449,7 @@ exports[`Storyshots Common Components/DateRangePicker range too vast 1`] = ` @@ -39662,7 +39662,7 @@ exports[`Storyshots Common Components/DateRangePicker with values 1`] = ` @@ -39825,7 +39825,7 @@ exports[`Storyshots Common Components/DateRangePicker/DateComponent default 1`] @@ -39928,7 +39928,7 @@ exports[`Storyshots Common Components/DateRangePicker/DateComponent with values @@ -41848,7 +41848,7 @@ exports[`Storyshots Common Components/Question Components/AltSpellings with exis style={ Object { "margin": "2rem auto", - "maxWidth": "768px", + "maxWidth": "600px", } } > @@ -67443,7 +67443,7 @@ exports[`Storyshots Marriage/Question Components/DateOfMarriage date range too v