From 759dece70f40751f0868a0b1cedbe392ed1b5751 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sat, 23 Oct 2021 22:30:00 +0200 Subject: [PATCH 01/45] refract: update notification style Notifications title is app (windows) notifications now have title and message --- server/main.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server/main.js b/server/main.js index f238475c7..865046a19 100644 --- a/server/main.js +++ b/server/main.js @@ -42,9 +42,9 @@ const nodePath = const trayIcon = path.join(__dirname, './assets/background.png'); const appIcon = path.join(__dirname, './assets/logo.png'); -function showNotification(text) { +function showNotification(title, text) { new Notification({ - title: 'ontime', + title: title, body: text, silent: true, }).show(); @@ -113,6 +113,11 @@ function createWindow() { } app.whenReady().then(() => { + // Set app title in windows + if (process.platform === 'win32') { + app.setAppUserModelId(app.name); + } + createWindow(); // register global shortcuts @@ -151,7 +156,6 @@ app.whenReady().then(() => { win.focus(); splash.destroy(); - showNotification(loaded.toString()); // tray stuff // TODO: get IP Address @@ -163,7 +167,7 @@ app.whenReady().then(() => { win.on('close', function (event) { event.preventDefault(); if (!isQuitting) { - showNotification('App running in background'); + showNotification('Window Closed', 'App running in background'); win.hide(); return false; } @@ -209,7 +213,7 @@ app.once('before-quit', () => { // Get messages from react // Test message ipcMain.on('test-message', (event, arg) => { - showNotification('testing 1-2', arg); + showNotification('Test Message', 'test from react', arg); }); // Terminate From a638e5962cbc0d94554e5e26feb01094ca218fe0 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:38:57 +0200 Subject: [PATCH 02/45] style fix: handle long titles long titles would overflow - list editor - info titles - backstage view - public view --- .../src/common/components/views/Paginator.module.css | 4 ++++ .../src/features/editors/list/EventBlock.module.css | 3 +++ client/src/features/info/Info.module.css | 12 ++++++++++++ client/src/features/info/InfoTitle.jsx | 6 +++--- .../viewers/backstage/StageManager.module.css | 4 +++- client/src/features/viewers/foh/Public.module.css | 2 ++ 6 files changed, 27 insertions(+), 4 deletions(-) diff --git a/client/src/common/components/views/Paginator.module.css b/client/src/common/components/views/Paginator.module.css index 5e58e99ad..165f568ed 100644 --- a/client/src/common/components/views/Paginator.module.css +++ b/client/src/common/components/views/Paginator.module.css @@ -37,6 +37,10 @@ .entryTitle { align-self: center; + + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; } .entryPast, diff --git a/client/src/features/editors/list/EventBlock.module.css b/client/src/features/editors/list/EventBlock.module.css index bc7f34764..f74a78ed4 100644 --- a/client/src/features/editors/list/EventBlock.module.css +++ b/client/src/features/editors/list/EventBlock.module.css @@ -144,6 +144,9 @@ border-radius: 4px; width: 100%; display: block; + + white-space: nowrap; + overflow: hidden; } .oscLabel { diff --git a/client/src/features/info/Info.module.css b/client/src/features/info/Info.module.css index c6c63793d..bfafd4303 100644 --- a/client/src/features/info/Info.module.css +++ b/client/src/features/info/Info.module.css @@ -6,6 +6,8 @@ border: 1px solid rgba(0, 0, 0, 0.05); border-radius: 4px; padding: 8px; + + max-width: 90%; } .main { @@ -13,6 +15,8 @@ color: #ff7597; display: flex; justify-content: space-between; + + max-width: 90%; } .header { @@ -24,6 +28,12 @@ justify-content: space-between; } +.labelContainer { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + .label, .emptyLabel { padding: 0; @@ -47,6 +57,8 @@ .notes { color: #d69e2e; + overflow: hidden; + text-overflow: ellipsis; } .if { diff --git a/client/src/features/info/InfoTitle.jsx b/client/src/features/info/InfoTitle.jsx index 31759057e..c27130bb0 100644 --- a/client/src/features/info/InfoTitle.jsx +++ b/client/src/features/info/InfoTitle.jsx @@ -26,19 +26,19 @@ export default function InfoTitle(props) { {!collapsed && ( <> -
+
Title {data.title}
-
+
Presenter {data.presenter}
-
+
Subtitle diff --git a/client/src/features/viewers/backstage/StageManager.module.css b/client/src/features/viewers/backstage/StageManager.module.css index cf9bad51e..484502503 100644 --- a/client/src/features/viewers/backstage/StageManager.module.css +++ b/client/src/features/viewers/backstage/StageManager.module.css @@ -55,6 +55,8 @@ .todayContainer { background-color: rgba(255, 255, 255, 0.05); padding: 1vh 2vw; + + overflow: hidden; } .clockContainer, @@ -163,7 +165,7 @@ .countdownContainer { grid-area: clck; - border-radius: 1vw 1vw 0 0; + border-radius: 1vw 1vw 0 0; } .clock { diff --git a/client/src/features/viewers/foh/Public.module.css b/client/src/features/viewers/foh/Public.module.css index 4110f9c48..905b6d6e6 100644 --- a/client/src/features/viewers/foh/Public.module.css +++ b/client/src/features/viewers/foh/Public.module.css @@ -55,6 +55,8 @@ .todayContainer { background-color: rgba(255, 255, 255, 0.05); padding: 1vh 2vw; + + overflow: hidden; } .clockContainer, From d36adf08ba4e0fb7392fc6b12d82227dc323be0e Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:39:12 +0200 Subject: [PATCH 03/45] style: animate event collapse / expand --- .../src/features/editors/list/EventBlock.jsx | 24 ++++++------------- .../editors/list/EventBlock.module.css | 17 ++++++++++++- 2 files changed, 23 insertions(+), 18 deletions(-) diff --git a/client/src/features/editors/list/EventBlock.jsx b/client/src/features/editors/list/EventBlock.jsx index 7569cce53..f2827d59c 100644 --- a/client/src/features/editors/list/EventBlock.jsx +++ b/client/src/features/editors/list/EventBlock.jsx @@ -1,5 +1,5 @@ import Icon from '@chakra-ui/icon'; -import { FiChevronDown, FiChevronUp, FiMoreVertical } from 'react-icons/fi'; +import { FiChevronUp, FiMoreVertical } from 'react-icons/fi'; import { useMemo } from 'react'; import { Draggable } from 'react-beautiful-dnd'; import EventTimes from 'common/components/eventTimes/EventTimes'; @@ -86,13 +86,6 @@ const ExpandedBlock = (props) => { {`/ontime/goto ${eventIndex + 1} << OSC >> /ontime/gotoid ${oscid}`}
- props.setCollapsed(true)} - />
{ } />
- props.setCollapsed(false)} - />
0 ? millisToMinutes(delay) : null; const handleCollapse = (isCollapsed) => { + console.log('setting collapsed', isCollapsed); setCollapsed({ [data.id]: isCollapsed }); }; @@ -187,6 +174,11 @@ export default function EventBlock(props) { {...provided.draggableProps} ref={provided.innerRef} > + handleCollapse(!collapsed)} + /> {collapsed ? ( ) : ( )}
diff --git a/client/src/features/editors/list/EventBlock.module.css b/client/src/features/editors/list/EventBlock.module.css index f74a78ed4..07a4a8aea 100644 --- a/client/src/features/editors/list/EventBlock.module.css +++ b/client/src/features/editors/list/EventBlock.module.css @@ -160,9 +160,24 @@ /* ================ MORE ================ */ -.more { +.moreExpanded, +.moreCollapsed { cursor: pointer; + color: #fff; + grid-area: more; + margin-top: 0.2em; } + +.moreExpanded { + transform: scaleY(-1); + transition: transform 0.3s; +} + +.moreCollapsed { + transform: scaleY(1); + transition: transform 0.3s; +} + /* ============== ACTION ================ */ .actionOverlay { From abdd2606eea3a0cafebca543a5c27068edb16b5f Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:40:12 +0200 Subject: [PATCH 04/45] style: consistent button style - modify add button to be consistent with main menu colours --- client/src/common/components/buttons/AddIconBtn.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/common/components/buttons/AddIconBtn.jsx b/client/src/common/components/buttons/AddIconBtn.jsx index 9133a1a7b..59153d97c 100644 --- a/client/src/common/components/buttons/AddIconBtn.jsx +++ b/client/src/common/components/buttons/AddIconBtn.jsx @@ -7,9 +7,11 @@ export default function AddIconBtn(props) { } - colorScheme='blue' - onClick={clickhandler} + _expanded={{ bg: 'orange.300', color: 'white' }} _focus={{ boxShadow: 'none' }} + backgroundColor={'orange.200'} + color={'orange.500'} + onClick={clickhandler} {...rest} /> ); From a0f3390ad30d9b9a93d3e925582a678b64a245f8 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:41:30 +0200 Subject: [PATCH 05/45] style: black text --- client/src/App.css | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/client/src/App.css b/client/src/App.css index 71293f8c2..0d8a50abe 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -14,3 +14,7 @@ html, user-select: none; -webkit-app-region: drag; } + +option { + color: black; +} From 310579143eaa34726e38170ba05ca94d073accd3 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sun, 24 Oct 2021 12:57:55 +0200 Subject: [PATCH 06/45] fix: revert css max-width property breaks views --- client/public/index.html | 21 ++++++++++++++------- client/src/features/info/Info.module.css | 4 ---- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/client/public/index.html b/client/public/index.html index 2d5dc5720..f5adcfe95 100644 --- a/client/public/index.html +++ b/client/public/index.html @@ -5,14 +5,21 @@ - + - - - + + +