From 82ac8f1ba554a8bca9559d41ec97aa27429c65e1 Mon Sep 17 00:00:00 2001 From: Carlos Valente <34649812+cpvalente@users.noreply.github.com> Date: Fri, 26 May 2023 13:18:44 +0200 Subject: [PATCH] style v2 tweaks (#415) * fix: reset rundown on upload * style: facilitate reaching event id * fix: show rundown on half screens * style: prevent tab overflow * style: remove redundant information * style: improve editor in small screens * style: small tweaks to editor sizes --- .../timer-display/TimerDisplay.scss | 2 +- .../PlaybackButtons.module.scss | 4 +- .../playback-timer/PlaybackTimer.module.scss | 8 ++-- .../playback/tap-button/TapButton.module.scss | 10 ++--- .../src/features/editors/Editor.module.scss | 37 +++++++++++-------- .../event-editor/EventEditor.module.scss | 34 +++++++++-------- .../src/features/event-editor/EventEditor.tsx | 4 +- .../client/src/features/info/Info.module.scss | 2 +- apps/client/src/features/info/Info.tsx | 1 - apps/client/src/features/menu/MenuBar.tsx | 9 ++++- .../modals/settings-modal/SettingsModal.tsx | 2 +- .../src/features/rundown/_blockMixins.scss | 16 ++++---- .../rundown/common/TitleEditor.module.scss | 2 +- .../event-block/EventBlock.module.scss | 32 +++++++--------- apps/client/src/index.scss | 9 +++++ apps/client/src/theme/_mixins.scss | 1 - apps/client/src/theme/_v2Styles.scss | 8 ++-- 17 files changed, 98 insertions(+), 83 deletions(-) diff --git a/apps/client/src/common/components/timer-display/TimerDisplay.scss b/apps/client/src/common/components/timer-display/TimerDisplay.scss index 59db74db7..a55325c1a 100644 --- a/apps/client/src/common/components/timer-display/TimerDisplay.scss +++ b/apps/client/src/common/components/timer-display/TimerDisplay.scss @@ -7,7 +7,7 @@ text-align: center; letter-spacing: 0.1em; font-weight: 600; - font-size: 3.75em; + font-size: 3.5rem; &--finished { color: $timer-finished-color; diff --git a/apps/client/src/features/control/playback/playback-buttons/PlaybackButtons.module.scss b/apps/client/src/features/control/playback/playback-buttons/PlaybackButtons.module.scss index fd7c39347..18b7b68a0 100644 --- a/apps/client/src/features/control/playback/playback-buttons/PlaybackButtons.module.scss +++ b/apps/client/src/features/control/playback/playback-buttons/PlaybackButtons.module.scss @@ -7,13 +7,13 @@ "go playback" "go transport" "extra extra"; - grid-template-rows: repeat(3, 32px); + grid-template-rows: repeat(3, 2rem); gap: $element-spacing; } .go { grid-area: go; - font-size: 5em; + font-size: 5rem; } @mixin spaced-flex { diff --git a/apps/client/src/features/control/playback/playback-timer/PlaybackTimer.module.scss b/apps/client/src/features/control/playback/playback-timer/PlaybackTimer.module.scss index b25c9d0ad..f232ee115 100644 --- a/apps/client/src/features/control/playback/playback-timer/PlaybackTimer.module.scss +++ b/apps/client/src/features/control/playback/playback-timer/PlaybackTimer.module.scss @@ -7,7 +7,7 @@ 'ind clk clk btn' '... sta fin btn'; grid-template-rows: 1fr auto; - grid-template-columns: 1.5em 1fr 1fr 5em; + grid-template-columns: 1.25rem 1fr 1fr 5rem; gap: $element-inner-spacing; justify-items: start; } @@ -15,7 +15,7 @@ .timer { grid-area: clk; white-space: nowrap; - max-width: 300px; + max-width: 18.75rem; } .indicators { @@ -51,7 +51,7 @@ .indNegativeActive { margin: 0 auto; width: 90%; - height: 4px; + height: 0.25rem; } .indNegativeActive { @@ -80,7 +80,7 @@ .start, .finish, .roll { - height: 24px; + height: 1.5rem; } .start { diff --git a/apps/client/src/features/control/playback/tap-button/TapButton.module.scss b/apps/client/src/features/control/playback/tap-button/TapButton.module.scss index 473f4ccc7..ce0c25901 100644 --- a/apps/client/src/features/control/playback/tap-button/TapButton.module.scss +++ b/apps/client/src/features/control/playback/tap-button/TapButton.module.scss @@ -6,7 +6,7 @@ $button-color-white: $gray-50; @mixin tap-factory($theme-color) { font-family: $ontime-font-family; - font-size: 18px; + font-size: calc(1rem + 2px); border-radius: $component-border-radius-md; width: 100%; transition-property: color, background-color; @@ -77,17 +77,13 @@ $button-color-white: $gray-50; @include tap-factory($ontime-stop); } -.tapButton.normal { - aspect-ratio: 3/1; -} - .tapButton.square { aspect-ratio: 1; - font-size: 14px; + font-size: calc(1rem - 2px); } .tapButton.fill { aspect-ratio: unset; height: 100%; - font-size: 1.5em; + font-size: 1.5rem; } diff --git a/apps/client/src/features/editors/Editor.module.scss b/apps/client/src/features/editors/Editor.module.scss index 2f3415de6..c36839856 100644 --- a/apps/client/src/features/editors/Editor.module.scss +++ b/apps/client/src/features/editors/Editor.module.scss @@ -1,9 +1,9 @@ @use '../../theme/ontimeColours' as *; @use '../../theme/v2Styles' as *; -$menu-width: 48px; -$rundown-width: 46em; -$playback-width: 450px; +$menu-width: 2.75rem; +$rundown-width: 44.5rem; +$playback-width: 26rem; @mixin absolute-top-right($distance) { position: absolute; @@ -20,7 +20,7 @@ $playback-width: 450px; .corner { display: none; - @include absolute-top-right(8px); + @include absolute-top-right(0.5rem); transform: rotate(45deg); } @@ -30,7 +30,7 @@ $playback-width: 450px; height: 100%; margin: auto; color: $ui-white; - padding: 16px 8px; + padding: 1rem 0.5rem; font-family: $ontime-font-family; display: grid; @@ -39,7 +39,7 @@ $playback-width: 450px; grid-template-areas: 'sett rundown play info' 'sett rundown mess info'; - gap: 8px; + gap: 0.5rem; .rundown, .playback, @@ -59,7 +59,8 @@ $playback-width: 450px; .mainContainer { height: 100%; grid-template-rows: auto 1fr; - grid-template-columns: $menu-width $rundown-width auto; + grid-template-columns: $menu-width 1fr $playback-width; + background-color: pink; .info { visibility: hidden; @@ -74,7 +75,7 @@ $playback-width: 450px; grid-template-rows: 100%; grid-template-columns: $menu-width $rundown-width; grid-template-areas: - 'sett even'; + 'sett rundown'; .info, .messages, @@ -135,7 +136,7 @@ $playback-width: 450px; border-radius: 8px; height: 100%; background-color: $bg-container-l2; - padding: 0.8em 1.5em; + padding: 1rem; display: flex; flex-direction: column; } @@ -165,7 +166,7 @@ $playback-width: 450px; .header { background-color: $gray-1200; - padding: 8px; + padding: 0.5rem; border-left: 1px solid $white-10; border-radius: 0 8px 0 0; } @@ -176,14 +177,14 @@ $playback-width: 450px; height: 100%; .content { - height: calc(100% - 24px); + height: calc(100% - 1.5rem); overflow: hidden; } } .info { grid-area: info; - min-width: 17em; + min-width: 17rem; max-width: 800px; .content { @@ -199,16 +200,14 @@ $playback-width: 450px; .playback { grid-area: play; - min-height: 250px; max-height: 380px; - min-width: 450px; } .mainContainer > .settings { grid-area: sett; background-color: transparent; margin: 0; - padding: 0 8px 0 0; + padding: 0 0.5rem 0 0; width: fit-content; display: flex; @@ -216,5 +215,11 @@ $playback-width: 450px; } .content { - padding-top: 24px; + padding-top: 1.5rem; +} + +.rundown { + .content { + padding-top: 0.5rem; + } } diff --git a/apps/client/src/features/event-editor/EventEditor.module.scss b/apps/client/src/features/event-editor/EventEditor.module.scss index d5b499454..f759b40c0 100644 --- a/apps/client/src/features/event-editor/EventEditor.module.scss +++ b/apps/client/src/features/event-editor/EventEditor.module.scss @@ -1,9 +1,9 @@ @use '../../theme/v2Styles' as *; .eventEditor { - padding: 16px 32px 32px 32px; + padding: 1rem 2rem 2rem 2rem; width: 100%; - gap: max(16px, 2vh); + gap: max(1rem, 2vh); display: grid; grid-template-areas: @@ -15,15 +15,17 @@ .timeSettings { display: flex; flex-direction: column; - gap: 8px; + gap: 0.5rem; } } .eventInfo { grid-area: eventInfo; - .eventId { - margin-left: $element-inner-spacing; - user-select: text; + display: flex; + align-items: center; + + .eventId { + margin-left:$element-spacing; } } @@ -35,7 +37,7 @@ .timeOptions { grid-area: timeOptions; display: flex; - gap: 24px; + gap: 1.5rem; } .titles { @@ -53,19 +55,19 @@ .left { grid-area: left; - padding: 0 16px; + padding: 0 1rem; border-left: 1px solid $border-color-ondark; } .right { - padding-left: 16px; + padding-left: 1rem; grid-area: right; border-left: 1px solid $border-color-ondark; } } @mixin input-label() { - font-size: 13px; + font-size: calc(1rem - 3px); color: $label-gray; } @@ -84,32 +86,32 @@ } &.publicToggle { - height: 32px; + height: 2rem; display: flex; align-items: center; justify-items: center; - gap: 8px; + gap: 0.5rem; } } .spacer { - height: 20px; + height: 1.25rem; } .inline { display: flex; align-items: center; - gap: 16px; + gap: 1rem; } .column { display: flex; flex-direction: column; - gap: 8px; + gap: 0.5rem; } .padTop { - margin-top: 8px; + margin-top: 0.5rem; } .fullHeight { diff --git a/apps/client/src/features/event-editor/EventEditor.tsx b/apps/client/src/features/event-editor/EventEditor.tsx index 251244549..24848c4e8 100644 --- a/apps/client/src/features/event-editor/EventEditor.tsx +++ b/apps/client/src/features/event-editor/EventEditor.tsx @@ -42,7 +42,9 @@ export default function EventEditor() {