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

[ACS-6211] Fixed UI alignment issues in create rules screen (CardView and child components) #9101

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ import { BaseCardView } from '../base-card-view';

@Component({
selector: 'adf-card-view-boolitem',
templateUrl: './card-view-boolitem.component.html'
templateUrl: './card-view-boolitem.component.html',
styles: [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it better and more clear to move it to .scss file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only reason I added it here is because it's only a single class, and the scss file did not exist. However, if needed, I can create a new file and add the styling to that instead.

`
.adf-property-value {
padding: 15px 0;
}
`
]
})

export class CardViewBoolItemComponent extends BaseCardView<CardViewBoolItemModel> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ describe('CardViewSelectItemComponent', () => {
});

describe('Rendering', () => {
it('should render the label', () => {
AleksanderSklorz marked this conversation as resolved.
Show resolved Hide resolved
it('should render custom label when editable is set to false', () => {
component.property = new CardViewSelectItemModel({
...mockDefaultProps,
editable: false
});
fixture.detectChanges();

const labelValue = fixture.debugElement.query(By.css('.adf-property-label'));
expect(labelValue).not.toBeNull();
expect(labelValue.nativeElement.innerText).toBe('Select box label');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="adf-property-list">
<div *ngFor="let property of properties">
<div *ngFor="let property of properties" class="adf-property-container">
<div [attr.data-automation-id]="'header-'+property.key" class="adf-property">
<adf-card-view-item-dispatcher
[property]="property"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
.adf-property-label {
color: var(--adf-metadata-property-panel-text-color);
display: flex;
padding: 6px 0;
padding: 3px 0;
line-height: 20px;

&.adf-property-value-editable {
Expand All @@ -19,6 +19,10 @@
}
}

.adf-property-container {
margin-bottom: 10px;
}

.adf-property {
.adf-property-field {
width: 100%;
Expand All @@ -30,7 +34,7 @@
.mat-input-element {
text-overflow: ellipsis;
color: var(--adf-metadata-property-panel-title-color);
margin-top: 32px;
margin-top: 20px;
padding: 6px 0;
line-height: 20px;
}
Expand All @@ -57,7 +61,7 @@
}

.mat-form-field-label {
padding: 6px 0;
padding: 0;
justify-content: center;
display: flex;
flex-direction: column;
Expand All @@ -83,7 +87,7 @@
&.mat-input-element {
color: var(--adf-metadata-action-button-clear-color);
padding: 6px 0 6px 12px;
margin: 32px 0 0;
margin: 20px 0 0;
}
}

Expand Down
Loading