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

feat: 1421 refactor text #1427

Merged
merged 37 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8fb93cf
feat: remove subtitle
ngunner15 Jul 18, 2024
3b9a649
feat: remove apostrophe
ngunner15 Jul 18, 2024
1eef1e7
feat: remove text in client search modal
ngunner15 Jul 18, 2024
68cd610
feat: update text
ngunner15 Jul 18, 2024
517d2df
feat: update text
ngunner15 Jul 18, 2024
edd4c34
feat: update text
ngunner15 Jul 18, 2024
f6d8d1b
feat: add comma
ngunner15 Jul 18, 2024
448a195
feat: update text
ngunner15 Jul 18, 2024
e71f743
feat: lowercase text
ngunner15 Jul 18, 2024
88a97af
feat: update text
ngunner15 Jul 18, 2024
3c08813
feat: remove subtitle
ngunner15 Jul 18, 2024
2cb5b63
feat: sort by alphabetical order
ngunner15 Jul 22, 2024
85f1e85
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Jul 22, 2024
18bbd6f
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Jul 22, 2024
2616ce1
feat: change client search text
ngunner15 Jul 26, 2024
fd413ca
feat: add (*required)
ngunner15 Jul 26, 2024
f66f1ce
feat: add parent to heading and remove subheading
ngunner15 Jul 26, 2024
43f336a
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Jul 26, 2024
da494e6
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Jul 31, 2024
16a8c73
feat: 1361 add cancel button at seedlot review page (#1452)
craigyu Aug 1, 2024
a03531b
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Aug 1, 2024
626f56f
Merge branch 'main' into feat/1421-refactor-text
craigyu Aug 6, 2024
c75c9c2
feat: remove description prop
ngunner15 Aug 6, 2024
e08e82b
feat: remove description code
ngunner15 Aug 6, 2024
c6cd0dc
feat: update subtitle prop
ngunner15 Aug 6, 2024
d3448e2
feat: remove subtitle
ngunner15 Aug 7, 2024
a77ce4b
feat: remove subtitle test
ngunner15 Aug 7, 2024
8f655ab
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Aug 7, 2024
da99f21
Merge branch 'main' into feat/1421-refactor-text
DerekRoberts Aug 7, 2024
55c78e8
feat: make subtitle prop optional
ngunner15 Aug 7, 2024
2a6e746
feat: remove subtitle null
ngunner15 Aug 7, 2024
1ebef3b
feat: remove description
ngunner15 Aug 9, 2024
e253fa9
Merge branch 'main' into feat/1421-refactor-text
ngunner15 Aug 9, 2024
f832acc
feat: remove subtitle
ngunner15 Aug 9, 2024
e31dbbb
feat: update text
ngunner15 Aug 9, 2024
f0a1739
feat: remove subtitle
ngunner15 Aug 9, 2024
ff65aa9
fix: remove unwanted code
ngunner15 Aug 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions frontend/cypress/fixtures/aclass-reg-form.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@
},
"extraction": {
"extrationTitle": "Extraction information",
"extrationSubtitle": "Enter the extractory agency information and extraction's star and end dates for this seedlot",
"extrationSubtitle": "Enter the extractory agency information and extraction's start and end dates for this seedlot",
"storageTitle": "Temporary seed storage",
"storageSubtitle": "Enter the seed storage agency information and storage's star and end dates for this seedlot",
"extractionCheckboxText": "The extractory agency is the Tree Seed Center (TSC)",
"storageCheckboxText": "The seed storage agency is the Tree Seed Center (TSC)",
"storageSubtitle": "Enter the seed storage agency information and storage's start and end dates for this seedlot",
"extractionCheckboxText": "The extractory agency is the Tree Seed Centre (TSC)",
"storageCheckboxText": "The seed storage agency is the Tree Seed Centre (TSC)",
"agencyErrorMsg": "Please enter a valid acronym that identifies the agency",
"agencyValidationMsg": "Agency validation failed. Please retry verification",
"locationErrorMsg": "This location code is not valid for the selected agency, please enter a valid one or change the agency",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ describe.skip('Extraction and Storage Step test', () => {
it('should have the correct labels', () => {
const content = {
title: 'Extraction information',
subtitle: 'Enter the extractory agency information and extraction’s star and end dates for this seedlot',
subtitle: 'Enter the extractory agency information and extraction’s start and end dates for this seedlot',
titleTemporary: 'Temporary seed storage',
subtitleTemporary: 'Enter the seed storage agency information and storage’s star and end dates for this seedlot'
subtitleTemporary: 'Enter the seed storage agency information and storage’s start and end dates for this seedlot'
}
const titleBox = component.getElementsByClassName('extraction-information-title')[0];
expect(titleBox).toHaveTextContent(content.title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ const ClientSearchFields = ({
<Column sm={4} md={4} lg={16} xlg={16}>
<p className="client-modal-description">
Search for a specific client or agency, you can search by name, acronym or number.
To view more information about the client, you can
To view more information about the client,
{' '}
<Link to="">
go to client search screen.
go to the client search screen.
</Link>
</p>
</Column>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/BCHeader/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const navItems = [
disabled: true
},
{
name: 'Tree seed center',
name: 'Tree seed centre',
icon: 'Enterprise',
link: '#',
disabled: true
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/PageTitle/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import './styles.scss';

interface PageTitleProps {
title: string;
subtitle: string | React.ReactNode;
subtitle?: string | React.ReactNode;
craigyu marked this conversation as resolved.
Show resolved Hide resolved
enableFavourite?: boolean;
activity?: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,16 +301,18 @@ const CollectionStep = ({ isReview }: CollectionStepProps) => {
id={state.selectedCollectionCodes.id}
>
{
(coneCollectionMethodsQuery.data as MultiOptionsObj[]).map((method) => (
<Checkbox
key={method.code}
id={`cone-collection-method-checkbox-${method.code}`}
name={method.label}
labelText={method.description}
readOnly={isFormSubmitted && !isReview}
checked={state.selectedCollectionCodes.value.includes(method.code)}
onChange={() => handleCollectionMethods(method.code)}
/>
(coneCollectionMethodsQuery.data as MultiOptionsObj[])
.sort((a,b) => a.description.localeCompare(b.description))
.map((method) => (
<Checkbox
key={method.code}
id={`cone-collection-method-checkbox-${method.code}`}
name={method.label}
labelText={method.description}
readOnly={isFormSubmitted && !isReview}
checked={state.selectedCollectionCodes.value.includes(method.code)}
onChange={() => handleCollectionMethods(method.code)}
/>
))
}
</CheckboxGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const DATE_FORMAT = 'Y/m/d';
export const extractorAgencyFields: AgencyTextPropsType = {
useDefaultCheckbox: {
name: 'extractor-use-tsc',
labelText: 'The extractory agency is the Tree Seed Center (TSC)'
labelText: 'The extractory agency is the Tree Seed Centre (TSC)'
},
agencyInput: {
titleText: 'Extractory agency acronym',
Expand All @@ -20,7 +20,7 @@ export const extractorAgencyFields: AgencyTextPropsType = {
export const storageAgencyFields: AgencyTextPropsType = {
useDefaultCheckbox: {
name: 'storage-use-tsc',
labelText: 'The seed storage agency is the Tree Seed Center (TSC)'
labelText: 'The seed storage agency is the Tree Seed Centre (TSC)'
},
agencyInput: {
titleText: 'Seed storage agency acronym',
Expand All @@ -35,7 +35,7 @@ export const storageAgencyFields: AgencyTextPropsType = {
export const inputText = {
extractionTitle: {
titleText: 'Extraction information',
subtitleText: 'Enter the extractory agency information and extraction\'s star and end dates for this seedlot'
subtitleText: 'Enter the extractory agency information and extraction\'s start and end dates for this seedlot'
},
date: {
extraction: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const textConfig = {
uploadedFileIconDesc: 'Delete file',
notification: {
title: 'Note:',
description: 'When uploading a file all previously filled data within the table will be replaced'
description: 'When uploading a file, all previously filled data in the table will be replaced.'
},
buttons: {
cancel: 'Cancel',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,16 +145,16 @@ const getPageText = () => ({
errorDescription,
coneTab: {
tabTitle: 'Cone and pollen count',
tableDescription: "Enter the estimative of Cone and pollen count for the orchard's seedlot (*required)",
tableDescription: "Enter the cone and pollen count estimate for the orchard's seedlot (*required)",
toggleName: 'Show breeding value',
cleanModalHeading: getCleanTableDesc('Cone and pollen count')
},
successTab: {
tabTitle: 'SMP success on parent',
tableDescription: "Enter the estimative of SMP success for the orchard's seedlot",
tableDescription: "Enter the SMP success estimate for the orchard's seedlot",
toggleName: 'Show SMP mix used on parent',
cleanModalHeading: getCleanTableDesc('SMP success on parent'),
defaultCheckBoxDesc: 'Enter the same SMP success on parent or Non-orchard pollen contaminant to all parent trees',
defaultCheckBoxDesc: 'Enter the same SMP success on parent or non-orchard pollen contaminant to all parent trees',
smpInputLabel: 'SMP Success on parent (%)',
pollenCotamInputLabel: 'Non-orchard pollen contaminant (%)'
},
Expand Down Expand Up @@ -689,8 +689,7 @@ export const SummarySectionConfig = {
}
},
mixTab: {
title: 'Breeding value SMP mix used',
description: 'Check the breeding value of SMP mix used on parent',
title: 'Breeding value SMP mix used on parent',
infoItems: {
parentsOutside: {
name: 'Number of SMP parents from outside',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -471,8 +471,7 @@ const ParentTreeStep = ({ isReviewDisplay, isReviewRead }: ParentTreeStepProps)
<>
<DetailSection>
<DescriptionBox
header="Breeding value of SMP mix used"
description="Check the breeding value of SMP mix used on parent"
header="Breeding value of SMP mix used on parent"
/>
<InfoSection
infoItems={
Expand All @@ -492,7 +491,7 @@ const ParentTreeStep = ({ isReviewDisplay, isReviewRead }: ParentTreeStepProps)
{/* -------- SMP mix mean geospatial data -------- */}
<Row className="info-section-sub-title">
<DescriptionBox
header="SMP Mix geospatial summary"
header="SMP mix geospatial summary"
/>
</Row>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const inputText = {
checkboxLabelText: 'I hereby declare that the information provided in this application is true and correct, and that I am the owner of the seedlot or have been authorized by the owner(s) of the seedlot to submit this application.',
notification: {
title: 'Review the form:',
subtitle: 'Please, be sure to review the content and check if everything is correct with your seedlot registration.',
link: 'Go to first step and review the form'
subtitle: 'Please review this form to ensure the information is correct for this seedlot registration.',
link: 'Click here to go back to the first step.'
}
}
};
Expand Down
1 change: 0 additions & 1 deletion frontend/src/config/FavouriteActivitiyMap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ const FavouriteActivityMap: Record<string, FavActivityType> = {
type: 'registerAClass',
image: 'TaskAdd',
header: 'Create A-class seedlot',
description: 'Register a new A-class seedlot',
link: ROUTES.SEEDLOTS_A_CLASS_CREATION,
highlighted: false
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/types/FavActivityTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export type FavActivityType = {
type: string;
image: string;
header: string;
description: string;
description?: string;
craigyu marked this conversation as resolved.
Show resolved Hide resolved
link: string;
highlighted: boolean;
}
Expand Down
1 change: 0 additions & 1 deletion frontend/src/views/Seedlot/CreateAClass/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ const CreateAClass = () => {
<Row className="page-title-row">
<PageTitle
title="Create A-class seedlot"
subtitle="Register a new A-class seedlot"
enableFavourite
activity="registerAClass"
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const SeedlotCreatedFeedback = () => {
size="lg"
className="btn-scf"
>
Seedlot&apos;s main screen
Seedlots main screen
</Button>
</Column>
</Row>
Expand Down
Loading