Skip to content

Commit 06ade5c

Browse files
committed
Fine vertical layout scroll and overflow over all /user routes #12519
1 parent d0c996e commit 06ade5c

11 files changed

Lines changed: 255 additions & 280 deletions

File tree

client/app/profile/components/family-member/family-member.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h2 class="mat-font-title-lg">Coordonnées</h2>
5353
placeholder="Genre"
5454
(selectionChange)="update()"
5555
/>
56-
<app-address [form]="form" [vertical]="true" (addressChange)="update()" />
56+
<app-address [form]="form" (addressChange)="update()" />
5757
<mat-form-field>
5858
<mat-label>Téléphone fixe</mat-label>
5959
<input matInput formControlName="phone" (change)="update()" />
Lines changed: 20 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1-
<div class="nat-vertical" [formGroup]="form()">
1+
<form class="nat-vertical" [formGroup]="form()">
22
<mat-form-field>
33
<mat-label>Rue</mat-label>
44
<input matInput formControlName="street" (change)="update()" />
55
<mat-error>{{ form().get('street')?.errors | errorMessage }}</mat-error>
66
</mat-form-field>
77

8-
<div class="nat-vertical nat-horizontal-gap-10" [class.nat-sm-horizontal]="!vertical()">
9-
<div class="nat-horizontal nat-gap-10" [class.nat-expand]="!vertical()">
10-
<mat-form-field [style.width.px]="120">
11-
<mat-label>Code postal</mat-label>
12-
<input matInput formControlName="postcode" (change)="update()" />
13-
<mat-error>{{ form().get('postcode')?.errors | errorMessage }}</mat-error>
14-
</mat-form-field>
8+
<mat-form-field>
9+
<mat-label>Code postal</mat-label>
10+
<input matInput formControlName="postcode" (change)="update()" />
11+
<mat-error>{{ form().get('postcode')?.errors | errorMessage }}</mat-error>
12+
</mat-form-field>
1513

16-
<mat-form-field class="nat-expand">
17-
<mat-label>Localité</mat-label>
18-
<input matInput formControlName="locality" (change)="update()" />
19-
<mat-error>{{ form().get('locality')?.errors | errorMessage }}</mat-error>
20-
</mat-form-field>
21-
</div>
14+
<mat-form-field>
15+
<mat-label>Localité</mat-label>
16+
<input matInput formControlName="locality" (change)="update()" />
17+
<mat-error>{{ form().get('locality')?.errors | errorMessage }}</mat-error>
18+
</mat-form-field>
2219

23-
<natural-select
24-
formControlName="country"
25-
searchField="name"
26-
placeholder="Pays"
27-
[service]="countryService"
28-
[showIcon]="false"
29-
(selectionChange)="update()"
30-
/>
31-
</div>
32-
</div>
20+
<natural-select
21+
formControlName="country"
22+
searchField="name"
23+
placeholder="Pays"
24+
[service]="countryService"
25+
[showIcon]="false"
26+
(selectionChange)="update()"
27+
/>
28+
</form>

client/app/shared/components/address/address.component.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ import {MatError, MatFormField, MatLabel} from '@angular/material/form-field';
2222
})
2323
export class AddressComponent {
2424
protected readonly countryService = inject(CountryService);
25-
26-
public readonly vertical = input(false);
2725
public readonly form = input.required<FormGroup>();
2826
protected readonly addressChange = output();
2927

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
1-
<div class="body nat-padding nat-gap nat-vertical nat-center nat-expand" [formGroup]="form">
2-
<div class="nat-vertical nat-gap-15">
3-
<h1 class="mat-font-headline-sm">Changement de mot de passe</h1>
1+
<form class="body nat-vertical nat-margin-standard" [formGroup]="form">
2+
<h1 class="mat-font-headline-sm" i18n>Changement de mot de passe</h1>
43

5-
<app-password [form]="form" />
6-
<!-- Spacer-->
7-
<div></div>
8-
9-
<div class="nat-horizontal nat-center">
10-
<button matButton="filled" [disabled]="form.disabled || !form.valid" (click)="maybeConfirm()">
11-
Changer le mot de passe
12-
</button>
13-
</div>
4+
<app-password [form]="form" />
5+
<div class="nat-horizontal nat-center">
6+
<button matButton="filled" [disabled]="form.disabled || !form.valid" (click)="maybeConfirm()">
7+
Changer le mot de passe
8+
</button>
149
</div>
15-
</div>
10+
</form>
Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
1-
:host {
2-
display: flex;
3-
flex: 1;
4-
flex-direction: row;
5-
justify-content: center;
6-
align-items: center;
7-
height: 100%;
8-
min-height: 100%;
9-
overflow-x: auto;
10-
}
1+
@use '@ecodev/natural-layout' as nat;
2+
113
.body {
4+
box-sizing: border-box;
125
margin: auto;
13-
max-width: 940px;
6+
padding: 10px;
7+
width: 100%;
8+
max-width: 460px;
9+
}
10+
11+
@include nat.media(sm) {
12+
.body {
13+
padding: 20px;
14+
}
15+
}
16+
17+
.mat-button {
18+
align-self: center;
1419
}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
#form {
2-
max-width: 304px;
3-
}

0 commit comments

Comments
 (0)