Skip to content

Commit

Permalink
Adds padding above form buttons, fixes scroll behavior (#1138)
Browse files Browse the repository at this point in the history
* Adds padding above form buttons, fixes scroll behavior

* Replaces app ver with rev
  • Loading branch information
daniellemaxwell authored Jan 8, 2024
1 parent 5a5c211 commit b8c9e1b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 14 deletions.
8 changes: 5 additions & 3 deletions web/gds-user-ui/src/components/BasicDetailsForm/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import { VStack, chakra, useDisclosure } from '@chakra-ui/react';
import { Box, VStack, chakra, useDisclosure } from '@chakra-ui/react';
import InputFormControl from 'components/ui/InputFormControl';
import SelectFormControl from 'components/ui/SelectFormControl';
import { getBusinessCategoryOptions, vaspCategories } from 'constants/basic-details';
Expand Down Expand Up @@ -191,7 +191,8 @@ const BasicDetailsForm: React.FC<BasicDetailsFormProps> = ({
)}
/>
</VStack>
<StepButtons
<Box pt={5}>
<StepButtons
handleNextStep={handleNextStepClick}
isFirstStep={true}
onResetModalClose={handleResetClick}
Expand All @@ -201,7 +202,8 @@ const BasicDetailsForm: React.FC<BasicDetailsFormProps> = ({
onClosed={onCloseModalHandler}
handleResetClick={handleResetClick}
shouldShowResetFormModal={shouldShowResetFormModal}
/>
/>
</Box>
</chakra.form>
{!isProdEnv ? <DevTool control={methods.control} /> : null}
</FormProvider>
Expand Down
6 changes: 4 additions & 2 deletions web/gds-user-ui/src/components/Contacts/ContactsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ const ContactsForm: React.FC<ContactsFormProps> = ({ data, shouldResetForm, onRe
description={t`Billing contact for your organization to handle account and invoice requests or queries relating to the operation of the TRISA network.`}
/>
</Box>
<StepButtons
<Box pt={5}>
<StepButtons
handlePreviousStep={handlePreviousStepClick}
handleNextStep={handleNextStepClick}
onResetModalClose={handleResetClick}
Expand All @@ -179,7 +180,8 @@ const ContactsForm: React.FC<ContactsFormProps> = ({ data, shouldResetForm, onRe
onClosed={onCloseModalHandler}
handleResetClick={handleResetClick}
shouldShowResetFormModal={shouldShowResetFormModal}
/>
/>
</Box>
</chakra.form>
{!isProdEnv ? <DevTool control={methods.control} /> : null}
</FormProvider>
Expand Down
8 changes: 5 additions & 3 deletions web/gds-user-ui/src/components/LegalPerson/LegalForm.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useEffect, useState, useRef, Dispatch, SetStateAction } from 'react';
import { chakra, useDisclosure } from '@chakra-ui/react';
import { Box, chakra, useDisclosure } from '@chakra-ui/react';
import CountryOfRegistration from 'components/CountryOfRegistration';
import FormLayout from 'layouts/FormLayout';
import NameIdentifiers from '../NameIdentifiers';
Expand Down Expand Up @@ -155,7 +155,8 @@ const LegalForm: React.FC<LegalFormProps> = ({ data, shouldResetForm, onResetFor
<Address />
<CountryOfRegistration />
<NationalIdentification />
<StepButtons
<Box pt={5}>
<StepButtons
handlePreviousStep={handlePreviousStepClick}
handleNextStep={handleNextStepClick}
onResetModalClose={handleResetClick}
Expand All @@ -165,7 +166,8 @@ const LegalForm: React.FC<LegalFormProps> = ({ data, shouldResetForm, onResetFor
onClosed={onCloseModalHandler}
handleResetClick={handleResetClick}
shouldShowResetFormModal={shouldShowResetFormModal}
/>
/>
</Box>
</chakra.form>
{!isProdEnv ? <DevTool control={methods.control} /> : null}
</FormProvider>
Expand Down
2 changes: 1 addition & 1 deletion web/gds-user-ui/src/components/Sidebar/SidebarContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ const SidebarContent = ({ onClose, ...rest }: SidebarProps) => {
textAlign={'center'}
color="white"
width="100%">
<Text>GIT: {appGitVersion || 'N/A'}</Text>
<Text>App: {appGitVersion || 'N/A'}</Text>
<HDivider />
<Text>BFF & GDS: {bffAndGdsVersion || 'N/A'}</Text>
</HStack>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ const TrisaForm: React.FC<TrisaFormProps> = ({ data, shouldResetForm, onResetFor
headerText={t`TRISA Endpoint: MainNet`}
/>
</Box>
<StepButtons
<Box pt={5}>
<StepButtons
handlePreviousStep={handlePreviousStepClick}
handleNextStep={handleNextStepClick}
onResetModalClose={handleResetClick}
Expand All @@ -160,7 +161,8 @@ const TrisaForm: React.FC<TrisaFormProps> = ({ data, shouldResetForm, onResetFor
onClosed={onCloseModalHandler}
handleResetClick={handleResetClick}
shouldShowResetFormModal={shouldShowResetFormModal}
/>
/>
</Box>
</chakra.form>
{!isProdEnv ? <DevTool control={methods.control} /> : null}
</FormProvider>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState, useRef, Dispatch, SetStateAction } from 'react';
import { Grid, GridItem, Heading, Text, VStack, chakra, useDisclosure } from '@chakra-ui/react';
import { Box, Grid, GridItem, Heading, Text, VStack, chakra, useDisclosure } from '@chakra-ui/react';
import OtherJuridictions from 'components/OtherJuridictions';
import Regulations from 'components/Regulations';
import SwitchFormControl from 'components/SwitchFormControl';
Expand Down Expand Up @@ -455,7 +455,8 @@ const TrixoQuestionnaireForm: React.FC<TrixoFormProps> = ({
/>
</VStack>
</VStack>
<StepButtons
<Box pt={5}>
<StepButtons
handleNextStep={handleNextStepClick}
handlePreviousStep={handlePreviousStepClick}
onResetModalClose={handleResetClick}
Expand All @@ -465,7 +466,8 @@ const TrixoQuestionnaireForm: React.FC<TrixoFormProps> = ({
onClosed={onCloseModalHandler}
handleResetClick={handleResetClick}
shouldShowResetFormModal={shouldShowResetFormModal}
/>
/>
</Box>
</chakra.form>
{!isProdEnv ? <DevTool control={methods.control} /> : null}
</FormProvider>
Expand Down
1 change: 1 addition & 0 deletions web/gds-user-ui/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ body {
height: '100%';
font-family: 'Open sans', sans-serif;
scroll-behavior: smooth;
overflow-anchor: none;
}
body {
background-color: '#F7F8FC' !important;
Expand Down

0 comments on commit b8c9e1b

Please sign in to comment.