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(dh): minor style update in calculations #2014

Merged
merged 4 commits into from
Sep 4, 2023
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
2 changes: 1 addition & 1 deletion build/infrastructure/eo/configuration.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: eo-frontend
version: 0.3.339
version: 0.3.340
repo: ghcr.io/energinet-datahub
references:
- file: k8s/energy-origin-apps/frontend/base/deployment.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import {
GetGridAreasDocument,
} from '@energinet-datahub/dh/shared/domain/graphql';
import { executionStates, processTypes } from '@energinet-datahub/dh/wholesale/domain';
import { VaterSpacerComponent, VaterStackComponent } from '@energinet-datahub/watt/vater';

// Map query variables type to object of form controls type
type FormControls<T> = { [P in keyof T]: FormControl<T[P] | null> };
Expand All @@ -54,9 +55,11 @@ const makeFormControl = <T>(value: T = null as T) =>
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
CommonModule,
RxPush,
ReactiveFormsModule,
RxPush,
TranslocoModule,
VaterSpacerComponent,
VaterStackComponent,
WATT_FORM_FIELD,
WattButtonComponent,
WattDateRangeChipComponent,
Expand All @@ -66,27 +69,21 @@ const makeFormControl = <T>(value: T = null as T) =>
selector: 'dh-calculations-filters',
styles: [
`
:host {
display: block;
}

form {
display: flex;
gap: 1rem;
align-items: center;
overflow: auto;
overflow-y: hidden;
}

watt-button {
margin-left: auto;
}
`,
],
template: `
<form [formGroup]="_formGroup" *transloco="let t; read: 'wholesale.calculations.filters'">
<form
vater-stack
direction="row"
gap="m"
tabindex="-1"
[formGroup]="_formGroup"
*transloco="let t; read: 'wholesale.calculations.filters'"
>
<watt-date-range-chip formControlName="period">{{ t('period') }}</watt-date-range-chip>

<watt-form-field>
<watt-dropdown
formControlName="processTypes"
Expand All @@ -96,7 +93,6 @@ const makeFormControl = <T>(value: T = null as T) =>
[placeholder]="t('processType')"
/>
</watt-form-field>

<watt-form-field>
<watt-dropdown
formControlName="gridAreaCodes"
Expand All @@ -106,11 +102,9 @@ const makeFormControl = <T>(value: T = null as T) =>
[placeholder]="t('gridAreas')"
/>
</watt-form-field>

<watt-date-range-chip formControlName="executionTime">
{{ t('executionTime') }}
</watt-date-range-chip>

<watt-form-field>
<watt-dropdown
formControlName="executionStates"
Expand All @@ -120,7 +114,7 @@ const makeFormControl = <T>(value: T = null as T) =>
[placeholder]="t('executionStates')"
/>
</watt-form-field>

<vater-spacer />
<watt-button variant="text" icon="undo" type="reset">{{ t('reset') }}</watt-button>
</form>
`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ export type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialo
display: block;
}

button {
all: unset;
pointer-events: none;
overflow: hidden;
text-overflow: ellipsis;
flex: 1 1 auto;
}

.menu-icon {
margin-left: var(--watt-space-xs);
transition: linear 0.2s all;
Expand All @@ -67,6 +59,7 @@ export type WattMenuChipHasPopup = 'menu' | 'listbox' | 'tree' | 'grid' | 'dialo
template: `
<watt-chip [disabled]="disabled" [selected]="selected">
<button
class="cdk-visually-hidden"
[attr.aria-haspopup]="hasPopup"
[attr.aria-expanded]="opened"
[attr.aria-pressed]="selected"
Expand Down
1 change: 1 addition & 0 deletions libs/watt/src/lib/components/vater/vater-flex.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { VaterUtilityDirective } from './vater-utility.directive';
vater-flex,
[vater-flex] {
display: flex;
line-height: normal;
}

vater-flex > *,
Expand Down
Loading