Skip to content

Commit b9341ee

Browse files
committed
Make advanced editing tabs header sticky and update styles
1 parent 1b7770e commit b9341ee

2 files changed

Lines changed: 34 additions & 12 deletions

File tree

src/app/authoring-tool/edit-component-advanced/edit-component-advanced.component.html

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
1-
<h2 mat-dialog-title i18n>Advanced Activity Settings</h2>
2-
<mat-divider />
3-
<div mat-dialog-content>
4-
<div #component></div>
1+
<div class="edit-component-advanced">
2+
<h2 mat-dialog-title i18n>Advanced Activity Settings</h2>
3+
<mat-divider />
4+
<div mat-dialog-content>
5+
<div #component></div>
6+
</div>
7+
<mat-divider />
8+
<mat-dialog-actions align="end">
9+
<button class="enable-in-translation" mat-button mat-dialog-close cdkFocusRegionstart i18n>
10+
Close
11+
</button>
12+
</mat-dialog-actions>
513
</div>
6-
<mat-divider />
7-
<mat-dialog-actions align="end">
8-
<button class="enable-in-translation" mat-button mat-dialog-close cdkFocusRegionstart i18n>
9-
Close
10-
</button>
11-
</mat-dialog-actions>

src/app/authoring-tool/edit-component-advanced/edit-component-advanced.component.ts

Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import {
66
ElementRef,
77
EnvironmentInjector,
88
Inject,
9-
ViewChild
9+
ViewChild,
10+
ViewEncapsulation
1011
} from '@angular/core';
1112
import { MatButtonModule } from '@angular/material/button';
1213
import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
@@ -15,9 +16,28 @@ import { Component as WISEComponent } from '../../../assets/wise5/common/Compone
1516
import { components } from '../../../assets/wise5/components/Components';
1617

1718
@Component({
19+
encapsulation: ViewEncapsulation.None,
1820
imports: [MatDivider, MatDialogModule, MatButtonModule],
1921
styles: [
20-
'.mat-divider { margin: 0 -16px; } .mat-mdc-dialog-content { padding-top: 10px !important; padding-bottom: 10px !important; }'
22+
`
23+
.edit-component-advanced {
24+
--mat-tab-divider-color: var(--mat-divider-color);
25+
--mat-tab-divider-height: 1px;
26+
.mat-divider {
27+
margin: 0 -16px;
28+
}
29+
.mat-mdc-tab-body-content {
30+
padding: 16px 0;
31+
}
32+
.mat-mdc-tab-header {
33+
position: sticky;
34+
top: 0;
35+
z-index: 2;
36+
background-color: white;
37+
margin: 0 -16px;
38+
}
39+
}
40+
`
2141
],
2242
templateUrl: './edit-component-advanced.component.html'
2343
})

0 commit comments

Comments
 (0)