Skip to content

Commit

Permalink
[ACS-6211] Fixed UI alignment issues in create rules screen (CardView…
Browse files Browse the repository at this point in the history
… and child components) (#9101)

* [ACS-6211] Fixed UI alignment issues create rule dialog (changes in card-view and child components)

* [ACS-6211] Removed unneeded test case

* [ACS-6211] Addressed code review findings. Added label div for when card-view-selectitem.component is in non-editable mode. Added corresponding tests

* [ACS-6211] Fixed alignment issue for card-view-selectitem.component

* [ACS-6211] Removed unneeded testcase

* [ACS-6211] Resolved ui alignment issue with card-view-text-item.component
  • Loading branch information
swapnil-verma-gl authored Jan 3, 2024
1 parent bd5e379 commit 5054679
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 8 deletions.
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: [
`
.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', () => {
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

0 comments on commit 5054679

Please sign in to comment.