Skip to content

Commit

Permalink
fix(cb2-11068): allow unset as form node width so it never hides opti…
Browse files Browse the repository at this point in the history
…on text (#1478)
  • Loading branch information
pbardy2000 authored Apr 18, 2024
1 parent 7663404 commit 8da1e80
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/app/forms/components/select/select.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
min-width: unset;
}

.govuk-input--width-unset {
min-width: unset;
}

#techRecord_vehicleClass_description-hint {
max-width: 32rem;
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/forms/custom-sections/tyres/tyres.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
[type]="types.DROPDOWN"
name="techRecord_tyreUseCode"
label="Tyre Use Code"
[width]="widths.XS"
[width]="widths.UNSET"
[isEditing]="isEditing"
[options]="tyreUseCode"
></app-switchable-input>
Expand Down
1 change: 1 addition & 0 deletions src/app/forms/services/dynamic-form.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ export enum FormNodeWidth {
S = 4,
XS = 3,
XXS = 2,
UNSET = 'unset',
}

export interface FormNodeOption<T> {
Expand Down
2 changes: 1 addition & 1 deletion src/app/forms/templates/hgv/hgv-tyres.template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const tyresTemplateHgv: FormNode = {
value: null,
type: FormNodeTypes.CONTROL,
editType: FormNodeEditTypes.SELECT,
width: FormNodeWidth.XS,
width: FormNodeWidth.UNSET,
options: getOptionsFromEnum(TyreUseCode),
customTags: [{ colour: TagType.PURPLE, label: TagTypeLabels.PLATES }],
},
Expand Down
6 changes: 3 additions & 3 deletions src/app/forms/templates/trl/trl-tyres.template.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { TyreUseCode } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/tyreUseCodeTrl.enum.js';
import { ValidatorNames } from '@forms/models/validators.enum';
import {
FormNode, FormNodeEditTypes, FormNodeTypes, FormNodeWidth, TagTypeLabels,
} from '@forms/services/dynamic-form.types';
import { TagType } from '@shared/components/tag/tag.component';
import { getOptionsFromEnum } from '@forms/utils/enum-map';
import { TyreUseCode } from '@dvsa/cvs-type-definitions/types/v3/tech-record/enums/tyreUseCodeTrl.enum.js';
import { TagType } from '@shared/components/tag/tag.component';

export const tyresTemplateTrl: FormNode = {
name: 'tyreSection',
Expand All @@ -17,7 +17,7 @@ export const tyresTemplateTrl: FormNode = {
value: null,
type: FormNodeTypes.CONTROL,
editType: FormNodeEditTypes.SELECT,
width: FormNodeWidth.XS,
width: FormNodeWidth.UNSET,
options: getOptionsFromEnum(TyreUseCode),
customTags: [{ colour: TagType.PURPLE, label: TagTypeLabels.PLATES }],
},
Expand Down

0 comments on commit 8da1e80

Please sign in to comment.