Skip to content

Commit 1e1fb79

Browse files
committed
wip: rework test tools
1 parent 04438b5 commit 1e1fb79

16 files changed

+274
-281
lines changed

packages/webui/src/client/styles/main.scss

+97-47
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ input {
1515

1616
@use 'bootstrap';
1717

18-
ul {
19-
margin: 20px;
20-
padding: 0;
21-
}
22-
23-
h1,
24-
h2,
25-
h3,
26-
h4,
27-
h5,
28-
h6 {
29-
font-weight: 300;
30-
}
31-
h1 {
32-
font-size: 3rem;
33-
}
34-
3518
@import 'colorScheme';
3619
@import '_variables';
3720
@import '_colorScheme';
@@ -63,7 +46,7 @@ h1 {
6346
// @import 'studioScreenSaver';
6447
// @import 'supportAndSwitchboardPanel';
6548
// @import 'systemStatus';
66-
// @import 'testtools';
49+
@import 'testtools';
6750
// @import 'tooltips';
6851
// @import 'utils';
6952
// @import 'elementSelected';
@@ -174,28 +157,82 @@ h1 {
174157
// #render-target {
175158
// font-weight: 300;
176159

177-
// h5,
178-
// .h5,
179-
// .text-s,
180-
// .text-s p,
181-
// .text-s .mod,
182-
// .text-s .table,
183-
// .text-s .action-btn,
184-
// .switch,
185-
// .pill,
186-
// .pills .action-btn,
187-
// .notification,
188-
// .tooltip,
189-
// .btn,
190-
// .btn-tight {
191-
// font-weight: 300;
192-
// }
160+
ul {
161+
margin: 20px;
162+
padding: 0;
163+
}
193164

194-
// p,
195-
// center,
196-
// .table {
197-
// font-weight: 300;
198-
// }
165+
h1,
166+
h2,
167+
h3,
168+
h4,
169+
h5,
170+
h6 {
171+
font-weight: 300;
172+
color: var(--bs-body-color);
173+
}
174+
175+
h1,
176+
.h1 {
177+
letter-spacing: -0.03em;
178+
font-size: 3rem;
179+
line-height: 1.2;
180+
}
181+
182+
h2,
183+
.h2 {
184+
letter-spacing: -0.03em;
185+
font-size: 1.5rem;
186+
line-height: 1.5;
187+
}
188+
189+
h3,
190+
.h3 {
191+
font-size: 0.875rem;
192+
text-transform: uppercase;
193+
font-weight: bold;
194+
line-height: 1.5rem;
195+
letter-spacing: 0.6px;
196+
}
197+
198+
h4,
199+
.h4 {
200+
font-size: 0.875rem;
201+
text-transform: uppercase;
202+
font-weight: normal;
203+
line-height: 1.5rem;
204+
letter-spacing: 0.5px;
205+
}
206+
207+
h5,
208+
.h5,
209+
.text-s,
210+
.text-s p,
211+
.text-s .mod,
212+
.text-s .table,
213+
.text-s .action-btn,
214+
.switch,
215+
.pill,
216+
.pills .action-btn,
217+
.notification,
218+
.tooltip,
219+
.btn,
220+
.btn-tight {
221+
font-weight: 300;
222+
}
223+
224+
p,
225+
center,
226+
.table {
227+
font-weight: 300;
228+
}
229+
230+
.flex-row {
231+
display: flex;
232+
justify-content: flex-start;
233+
align-items: flex-start;
234+
flex-direction: row;
235+
}
199236

200237
// .checkbox {
201238
// vertical-align: top;
@@ -231,15 +268,28 @@ h1 {
231268
// }
232269
// }
233270

234-
// a.selectable {
235-
// display: block;
236-
// text-decoration: inherit;
271+
.selectable {
272+
border-left: 4px solid transparent;
273+
overflow: hidden;
274+
display: block;
275+
text-decoration: inherit;
237276

238-
// &:hover,
239-
// &:active {
240-
// text-decoration: inherit;
241-
// }
242-
// }
277+
padding: 0.25rem;
278+
279+
h3 {
280+
margin: 0;
281+
}
282+
283+
&:hover,
284+
&:active {
285+
text-decoration: inherit;
286+
}
287+
}
288+
289+
.selectable-selected {
290+
background: #e0e3e4;
291+
border-left-color: #1769ff;
292+
}
243293

244294
// .btn > svg.svg-inline--fa + span {
245295
// margin-left: 0.5em;

packages/webui/src/client/styles/testtools.scss

+1-47
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,4 @@
1-
.testtools-timeline {
2-
height: calc(100vh - 220px);
3-
width: calc(100vw - 300px);
4-
position: fixed;
5-
top: 220px;
6-
overflow-x: scroll;
7-
8-
.testtools-timeline-layer-label {
9-
position: sticky;
10-
left: 0;
11-
border: 1px solid #000;
12-
}
13-
14-
.testtools-timeline-layer-row {
15-
position: static;
16-
top: 0px;
17-
left: 0px;
18-
width: 100%;
19-
}
20-
21-
.testtools-timeline-layer-object {
22-
position: absolute;
23-
border: 1px solid #f00;
24-
background: #fff;
25-
overflow-x: hidden;
26-
white-space: nowrap;
27-
text-overflow: ellipsis;
28-
}
29-
30-
.testtools-timeline-scroller {
31-
position: absolute;
32-
top: 0;
33-
left: 0;
34-
height: 100%;
35-
}
36-
37-
.testtools-timeline-marker {
38-
height: 100%;
39-
width: 1px;
40-
border-left: 1px solid #0f0;
41-
position: absolute;
42-
top: 0px;
43-
z-index: 999;
44-
}
45-
}
46-
47-
.testtools-timelinetable {
1+
.testtools-datatable {
482
& > tbody > tr {
493
border-bottom: 1px solid #000;
504

packages/webui/src/client/ui/RundownList/GettingStarted.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export function GettingStarted({ step }: Readonly<IGettingStartedProps>): JSX.El
1010
const { t } = useTranslation()
1111

1212
return (
13-
<div className="mtl gutter has-statusbar">
13+
<div className="mx-5 mt-5 has-statusbar">
1414
<h1>{t('Getting Started')}</h1>
1515
<div>
1616
<ul>

packages/webui/src/client/ui/Settings.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export function Settings(): JSX.Element | null {
2222
useSubscription(CorelibPubSub.blueprints, null)
2323

2424
return (
25-
<div className="mtl gutter has-statusbar">
25+
<div className="mx-5 mt-5 has-statusbar">
2626
<div className="mod mvl mhs">
2727
<div className="row">
2828
<div className="col c12 rm-c3 settings-menu">

packages/webui/src/client/ui/Status.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export default function Status(props: Readonly<IStatusProps>): JSX.Element {
7575
useSubscription(CorelibPubSub.showStyleVariants, null, null)
7676

7777
return (
78-
<div className="mtl gutter has-statusbar">
78+
<div className="mx-5 mt-5 has-statusbar">
7979
{/* <header className='mvs'>
8080
<h1>{t('Status')}</h1>
8181
</header> */}

packages/webui/src/client/ui/Status/Evaluations.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export function EvaluationView(): JSX.Element {
4545
<header className="mbs">
4646
<h1>{t('Evaluations')}</h1>
4747
</header>
48-
<div className="mod mvl">
48+
<div className="my-5">
4949
<div className="paging">
5050
<DatePickerFromTo from={dateFrom} to={dateTo} onChange={handleChangeDate} />
5151
</div>

packages/webui/src/client/ui/Status/ExternalMessages.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function ExternalMessages(): JSX.Element {
3434
<header className="mbs">
3535
<h1>{t('Message Queue')}</h1>
3636
</header>
37-
<div className="mod mvl">
37+
<div className="my-5">
3838
<strong>Studio</strong>
3939
<ul>
4040
{studios.map((studio) => {
@@ -78,7 +78,7 @@ function ExternalMessagesInStudio({ studioId }: Readonly<IExternalMessagesInStud
7878
<div className="paging alc">
7979
<DatePickerFromTo from={dateFrom} to={dateTo} onChange={handleChangeDate} />
8080
</div>
81-
<div className="mod mvl">
81+
<div className="my-5">
8282
<ExternalMessagesQueuedMessages studioId={studioId} />
8383
<ExternalMessagesSentMessages studioId={studioId} />
8484
</div>

packages/webui/src/client/ui/Status/MediaManager.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export function MediaManagerStatus(): JSX.Element {
420420
</React.Fragment>
421421
) : null}
422422
</div>
423-
<div className="mod mvl">
423+
<div className="my-5">
424424
{sortedWorkflows.map((mediaWorkflow) => (
425425
<MediaManagerWorkFlowItem
426426
isExpanded={expandedHelper.isExpanded(mediaWorkflow._id)}

packages/webui/src/client/ui/Status/SystemStatus/SystemStatus.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export function SystemStatus(): JSX.Element {
3131
<header className="mbs">
3232
<h1>{t('System Status')}</h1>
3333
</header>
34-
<div className="mod mvl">
34+
<div className="my-5">
3535
{coreSystem && <CoreItem coreSystem={coreSystem} systemStatus={systemStatus} />}
3636

3737
{devicesHierarchy.map((d) => (

packages/webui/src/client/ui/Status/UserActivity.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function UserActivity(): JSX.Element {
272272
<header className="mbs">
273273
<h1>{t('User Activity Log')}</h1>
274274
</header>
275-
<div className="mod mvl">{renderUserActivity()}</div>
275+
<div className="my-5">{renderUserActivity()}</div>
276276
</div>
277277
)
278278
}

packages/webui/src/client/ui/TestTools/DeviceTriggers.tsx

+22-22
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import {
1313
PeripheralDevicePubSub,
1414
PeripheralDevicePubSubCollectionsNames,
1515
} from '@sofie-automation/shared-lib/dist/pubsub/peripheralDevice'
16+
import Row from 'react-bootstrap/Row'
17+
import Col from 'react-bootstrap/Col'
1618

1719
const MountedTriggers = new Mongo.Collection<DeviceTriggerMountedAction>(
1820
PeripheralDevicePubSubCollectionsNames.mountedTriggers
@@ -30,16 +32,12 @@ const DeviceTriggersView: React.FC = function TimelineDatastoreView() {
3032
const { peripheralDeviceId } = useParams<DeviceTriggersViewRouteParams>()
3133

3234
return (
33-
<div className="mtl gutter">
34-
<header className="mvs">
35+
<div className="mx-5 mt-5">
36+
<header className="my-2">
3537
<h1>{t('Device Triggers')}</h1>
3638
</header>
37-
<div className="mod mvl">
38-
{peripheralDeviceId && (
39-
<div>
40-
<DeviceTriggersControls peripheralDeviceId={protectString(peripheralDeviceId)} />
41-
</div>
42-
)}
39+
<div className="my-5">
40+
{peripheralDeviceId && <DeviceTriggersControls peripheralDeviceId={protectString(peripheralDeviceId)} />}
4341
</div>
4442
</div>
4543
)
@@ -76,18 +74,20 @@ function DeviceTriggersControls({ peripheralDeviceId }: Readonly<IDatastoreContr
7674
)
7775

7876
return (
79-
<div>
80-
<label>
81-
Device Ids:
82-
<input
83-
value={deviceIds.join(', ')}
84-
onChange={(e) => {
85-
setDeviceIds(e.target.value.split(/,\s*/))
86-
}}
87-
/>
88-
</label>
89-
<div>
90-
<table className="testtools-timelinetable">
77+
<Row>
78+
<Col xs={12} className="mb-4">
79+
<label>
80+
Device Ids:&nbsp;
81+
<input
82+
value={deviceIds.join(', ')}
83+
onChange={(e) => {
84+
setDeviceIds(e.target.value.split(/,\s*/))
85+
}}
86+
/>
87+
</label>
88+
</Col>
89+
<Col xs={12}>
90+
<table className="testtools-datatable">
9191
<tbody>
9292
<tr>
9393
<th></th>
@@ -126,8 +126,8 @@ function DeviceTriggersControls({ peripheralDeviceId }: Readonly<IDatastoreContr
126126
))}
127127
</tbody>
128128
</table>
129-
</div>
130-
</div>
129+
</Col>
130+
</Row>
131131
)
132132
}
133133

0 commit comments

Comments
 (0)