Skip to content

Commit

Permalink
Improvement/AAE-19176-reapply-selector-changes (#9424)
Browse files Browse the repository at this point in the history
* AAE-19510 remove selector variable

* AAE-19510 poc for card view using variable selectors

* AAE-19176 rename mat selectors file

* AAE-19176 add missing style imports

* AAE-19176 remove remaining mat selectors

* AAE-19176 replaced todo material selectors with variables

* AAE-19176 changes made in meantime

* AAE-19176 conflict fixes
  • Loading branch information
wojd0 authored and VitoAlbano committed Jun 24, 2024
1 parent 885585f commit 09baf41
Show file tree
Hide file tree
Showing 57 changed files with 366 additions and 234 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.app-form-container {
padding: 10px;
}
Expand Down Expand Up @@ -31,7 +33,7 @@
}

.app-form-editor-buttons {
& > .mat-mdc-raised-button {
& > #{$mat-raised-button} {
margin-right: 5px;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.app-cloud-layout-overflow {
overflow: auto;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* stylelint-disable selector-class-pattern */
@import 'styles/mat-selectors';

adf-search-chip-autocomplete-input {
.adf-chip-list {
width: 100%;
}

.mat-mdc-form-field-infix {
#{$mat-form-field-infix} {
border: none;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* stylelint-disable selector-class-pattern */
@import 'styles/mat-selectors';

adf-search-properties {
.adf-search-properties-file-size-label {
display: block;
Expand All @@ -19,14 +21,14 @@ adf-search-properties {

.adf-search-properties-file-size-operator,
.adf-search-properties-file-size-unit {
.mat-mdc-form-field-infix {
#{$mat-form-field-infix} {
border: 1px solid var(--adf-theme-mat-grey-color-a400);
border-radius: 5px;
padding: 9px;
}

&.mat-focused {
.mat-mdc-form-field-infix {
&#{$mat-focused} {
#{$mat-form-field-infix} {
outline: 2px auto -webkit-focus-ring-color;
}
}
Expand All @@ -39,33 +41,31 @@ adf-search-properties {
adf-search-chip-autocomplete-input {
display: block;

.mdc-text-field--outlined {
.mdc-text-field--outlined {
&-start,
&-end {
border-top: 1px solid var(--adf-theme-mat-grey-color-a400);
border-bottom: 1px solid var(--adf-theme-mat-grey-color-a400);
}
#{$mat-text-field-outlined} {
&-start,
&-end {
border-top: 1px solid var(--adf-theme-mat-grey-color-a400);
border-bottom: 1px solid var(--adf-theme-mat-grey-color-a400);
}

&-start {
border-left: 1px solid var(--adf-theme-mat-grey-color-a400);
}
&-start {
border-left: 1px solid var(--adf-theme-mat-grey-color-a400);
}

&-end {
border-right: 1px solid var(--adf-theme-mat-grey-color-a400);
}
&-end {
border-right: 1px solid var(--adf-theme-mat-grey-color-a400);
}
}

.mat-focused {
.mdc-text-field--outlined {
#{$mat-focused} {
#{$mat-text-field-outlined} {
outline: 2px auto -webkit-focus-ring-color;
}
}

.mat-form-field-appearance-outline {
.mdc-text-field--outlined-thick {
.mdc-text-field--outlined {
#{$mat-form-field-appearance-outline} {
#{$mat-text-field-outlined-thick} {
#{$mat-text-field-outlined} {
&-start,
&-end {
border-width: 1px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/* stylelint-disable selector-class-pattern */
@import 'styles/mat-selectors';

.adf-version-list {
&-viewport {
height: 100%;
Expand Down
2 changes: 1 addition & 1 deletion lib/core/src/lib/buttons-menu/buttons-menu.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@

<ng-template #desktop>
<ng-content></ng-content>
</ng-template>
</ng-template>
4 changes: 3 additions & 1 deletion lib/core/src/lib/buttons-menu/buttons-menu.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-buttons-menu {
margin-right: 10px;

Expand All @@ -21,7 +23,7 @@
display: none;
}

button > mat-icon.mat-icon.material-icons {
button > #{$material-icons} {
color: black;
margin: 0 10px;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf {
&-array-item-icon {
font-size: var(--theme-subheading-2-font-size);
Expand All @@ -21,16 +23,15 @@
}

&-array-item-more-chip-container {
&.mat-mdc-card {
&#{$mat-card} {
box-shadow: none;
max-height: 300px;
overflow-y: auto;
}
}

&-property-value {
/* TODO(mdc-migration): The following rule targets internal classes of chips that may no longer apply for the MDC version. */
.mat-chip-list {
#{$mat-chip-list} {
padding-top: 6px;
}
}
Expand All @@ -46,7 +47,7 @@
border-color: var(--adf-card-view-array-item-border-color);
border-radius: var(--adf-card-view-array-item-border-radius);

.mat-mdc-chip:hover {
#{$mat-chip}:hover {
cursor: pointer;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-card-view-dateitem {
.adf-property-value {
padding: 6px 0;
Expand Down Expand Up @@ -43,13 +45,13 @@
justify-content: space-between;
padding-bottom: 6px;

button.mat-mdc-icon-button {
button#{$mat-icon-button} {
line-height: 20px;
height: 20px;
width: 20px;
}

mat-icon {
#{$mat-icon} {
width: 16px;
height: 16px;
opacity: 0.5;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-card-view-key-value-pairs-item {
.adf-property-col-key {
width: 50%;
Expand Down Expand Up @@ -26,19 +28,19 @@
justify-content: center;
}

&__add-btn.mat-mdc-button {
&__add-btn#{$mat-button} {
margin-bottom: 20px;
}

&__read-only {
padding-bottom: 20px;

.mat-mdc-table {
#{$mat-table} {
box-shadow: none;
}

.mat-mdc-header-row,
.mat-mdc-row {
#{$mat-header-row},
#{$mat-row} {
padding: 0;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-card-view-selectitem {
.adf-property-value {
width: 100%;
Expand All @@ -19,8 +21,7 @@
margin-top: 0;
border-radius: 6px;

/* TODO(mdc-migration): The following rule targets internal classes of select that may no longer apply for the MDC version. */
.mat-mdc-select-value {
#{$mat-select-value} {
color: var(--adf-metadata-action-button-clear-color);
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

$select-filter-height: 4em !default;

.adf-select-filter-input {
Expand All @@ -16,12 +18,12 @@ $select-filter-height: 4em !default;
background: var(--adf-theme-background-card-color);
}

.mat-mdc-form-field {
#{$mat-form-field} {
width: 100%;
}
}

.mat-mdc-select-panel.adf-select-filter {
#{$mat-select-panel}.adf-select-filter {
transform: none !important;
overflow-x: hidden !important;
max-height: calc(256px + #{$select-filter-height});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-card-view-textitem {
.adf-property-field {
padding-top: 15px;
Expand Down Expand Up @@ -32,8 +34,7 @@
}

.adf-textitem-chip-list-container {
/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-label {
#{$mat-form-field-label} {
margin-top: 6px;
}
}
Expand All @@ -47,7 +48,7 @@
}

.adf-property-field {
.mat-mdc-input-element {
#{$mat-input-element} {
color: var(--theme-primary-color);
cursor: pointer;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

.adf-property-list {
background: var(--adf-card-view-background);
border: var(--adf-card-view-border);
Expand Down Expand Up @@ -27,51 +29,45 @@
.adf-property-field {
width: 100%;

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-underline {
#{mat-form-field-underline} {
display: none;
}

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-mdc-input-element {
#{mat-input-element} {
text-overflow: ellipsis;
color: var(--adf-metadata-property-panel-title-color);
padding: 6px 0;
line-height: 20px;
}

.adf-card-view__key-value-pairs__row {
.mat-mdc-input-element {
#{$mat-input-element} {
margin-top: 0;
padding-left: 12px;
}
}
/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-mdc-form-field-infix {

#{$mat-form-field-infix} {
border-top-width: 0;
padding: 0;
}

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-flex {
#{$mat-form-field-flex} {
padding-top: 0;
}

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-wrapper {
#{$mat-form-field-wrapper} {
padding-bottom: 0;
}

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
.mat-form-field-label {
#{$mat-form-field-label} {
padding: 0;
justify-content: center;
display: flex;
flex-direction: column;
height: 20px;

/* TODO(mdc-migration): The following rule targets internal classes of form-field that may no longer apply for the MDC version. */
&.mat-form-field-empty {
&.adf-property-field-label--empty {
transform: translateY(-1.3437em) scale(1);
}
}
Expand All @@ -86,7 +82,7 @@
background-color: var(--adf-metadata-buttons-background-color);
border-radius: 6px;

&.mat-mdc-input-element {
#{$mat-input-element} {
color: var(--adf-metadata-action-button-clear-color);
padding: 6px 0 6px 12px;
margin: 5px 0 0;
Expand All @@ -96,7 +92,7 @@
&.adf-property-readonly-value {
color: var(--adf-metadata-property-panel-label-color);

&.mat-mdc-input-element {
#{$mat-input-element} {
color: var(--adf-metadata-property-panel-label-color);
}
}
Expand Down
4 changes: 3 additions & 1 deletion lib/core/src/lib/comments/comments.component.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import 'styles/mat-selectors';

adf-comments {
.adf-comments-container {
height: 100%;
Expand All @@ -24,7 +26,7 @@ adf-comments {
resize: vertical;
}

.mat-mdc-form-field {
#{$mat-form-field} {
width: 100%;
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* stylelint-disable no-descending-specificity */
@use '@angular/material' as mat;
@import '../../../styles/mixins';
@import 'styles/mat-selectors';

$data-table-header-font-size: var(--theme-caption-font-size) !default;
$data-table-header-sort-icon-size: var(--theme-subheading-2-font-size) !default;
Expand Down
Loading

0 comments on commit 09baf41

Please sign in to comment.