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

fix(CB2-11243): prevent SR field in tyres component being cut-off on large screens #1477

Merged
merged 3 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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
4 changes: 2 additions & 2 deletions src/app/forms/custom-sections/tyres/tyres.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<ng-template
*ngIf="isPsv"
[ngTemplateOutlet]="axleTdInput"
[ngTemplateOutletContext]="{ name: 'tyres_speedCategorySymbol', type: types.DROPDOWN, width: widths.XXS, options: speedCategorySymbol }"
[ngTemplateOutletContext]="{ name: 'tyres_speedCategorySymbol', type: types.DROPDOWN, width: widths.UNSET, options: speedCategorySymbol }"
></ng-template>

<ng-template
Expand Down 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
Loading