Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redesign #1079

Merged
merged 101 commits into from
Sep 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
101 commits
Select commit Hold shift + click to select a range
823cb9b
Redesign - Header Style
Arnei Jun 9, 2023
caecebc
Redesign - Main Menu Text
Arnei Jun 9, 2023
9496b55
Redesign - Main Menu Button Shape
Arnei Jun 9, 2023
05de968
Redesign: Replace fontawesome with react-icons
Arnei Jun 13, 2023
ebcf6b7
Redesign: Change background color
Arnei Jun 13, 2023
fca437d
Redesign: Reorder Cutting components
Arnei Jun 14, 2023
3a1b4ea
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Jun 14, 2023
df91647
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Jun 14, 2023
5ff9461
Redesign: General cutting view appearance
Arnei Jun 14, 2023
52638d8
Redesign: Timeline color
Arnei Jun 15, 2023
bd35e07
Redesign: Scrubber basic idea
Arnei Jun 15, 2023
fcefd54
Redesign: Cutting Buttons
Arnei Jun 15, 2023
9098782
Redesign: VideoControls Layout
Arnei Jun 15, 2023
1d301ab
Redesign: Rounded edges for videos
Arnei Jun 15, 2023
b193c39
Redesign: Fix boxshadow on videoPlayers
Arnei Jun 15, 2023
bb20602
Redesign: Fix vertical scrollbar appearing
Arnei Jun 15, 2023
0883783
Redesign: Metadata Layout
Arnei Jun 15, 2023
2d84a8f
Redesign: Metadata colors
Arnei Jun 15, 2023
4097ca1
Fix no scrollbars in MainContent
Arnei Jun 16, 2023
a99b16d
Redesign: Track Selection
Arnei Jun 16, 2023
c0c5444
Redesign: Center track selection
Arnei Jun 16, 2023
5494c0e
Redesign: Finish Menu
Arnei Jun 16, 2023
a9c32a5
Redesign: Settings page
Arnei Jun 16, 2023
8455695
Redesign: Fix various visual clarity issues
Arnei Jun 16, 2023
e577222
Redesign: Fixes minor details in dark mode
Arnei Jun 16, 2023
8456bb7
Redesign: Fix High Contrast colors
Arnei Jun 19, 2023
ce99310
Fix titles overlapping
Arnei Jun 19, 2023
6aa443b
Redesign: More text color
Arnei Jun 19, 2023
1114bf8
Redesign: Display less milliseconds
Arnei Jun 19, 2023
591597a
Redesign: Move Settings button to Header
Arnei Jun 19, 2023
825db79
Fix color value
Arnei Jun 20, 2023
d1ee591
Redesign: Save Modal
Arnei Jun 20, 2023
94961f5
Redesign: Fix settings button visibility in high contrast mode
Arnei Jun 21, 2023
672ecbf
Redesign - Switch font to Roboto Flex
Arnei Jun 28, 2023
8d6a915
Introduce Appkit & Go to Greyscale
Arnei Jul 7, 2023
f3b27d2
Replace more fontawesome icons
Arnei Jul 7, 2023
573a690
Fix system design
Arnei Jul 7, 2023
e62a975
Make play icon feel more centered
Arnei Jul 7, 2023
dbf8ce6
Removed useless comment
Arnei Jul 7, 2023
2514d43
Soften boxshadow for keys in KeyboardControls
Arnei Jul 7, 2023
d225a54
Improve highlighting of selected Metadata elements
Arnei Jul 7, 2023
58c0a55
Fix text color in main menu for high contrast modes
Arnei Jul 7, 2023
4bf6ac3
Set tooltip font to Roboto
Arnei Jul 11, 2023
1b837d9
Add missing translation strings for save modal
Arnei Jul 11, 2023
2142693
Set video background color to background color
Arnei Jul 11, 2023
a39b836
Slightly up contrast for video controls
Arnei Jul 11, 2023
af6a61c
Fix Metadata textarea vertical resize
Arnei Jul 11, 2023
62a76b7
Make dropdown background white
Arnei Jul 11, 2023
d9fad5b
Stop datetime field underline from changing
Arnei Jul 11, 2023
c84fb0b
Fix up color picker bg colors
Arnei Jul 11, 2023
4008e45
Make subtitle select buttons behave like finish menu buttons
Arnei Jul 11, 2023
66f986b
Put subtitle flags into grey circle
Arnei Jul 11, 2023
9196c48
Remove info text in thumbnail view
Arnei Jul 11, 2023
98a75ad
Fix es-lint warnings
Arnei Jul 11, 2023
ac69aa7
Fix various color contrast issues
Arnei Jul 11, 2023
6dc3689
Replace hover animation with color change
Arnei Jul 12, 2023
f421358
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Jul 12, 2023
c9202d9
Turn Header logo into a button
Arnei Jul 12, 2023
abc99c6
Add back accidentally deleted line of CSS
Arnei Jul 12, 2023
73f4f61
Rewrite video players CSS for keeping aspect ratio
Arnei Jul 12, 2023
e6f4f1e
Make back button less overly large in Finish
Arnei Jul 13, 2023
2e37326
Revert "Redesign: Save Modal"
Arnei Jul 13, 2023
f8ed66b
Dont display Settings when done
Arnei Jul 13, 2023
89362f4
Fix scrollbar showing onthe finish page
Arnei Jul 13, 2023
747c741
Make track select button display more consistent
Arnei Jul 13, 2023
22000ff
Attempt at making thumbnail page fit redesign
Arnei Jul 13, 2023
9539e1f
Change striping of deleted elements in timeline
Arnei Jul 14, 2023
ca1903d
Remove blue from timeline
Arnei Jul 14, 2023
9469d12
Reduce timelineheight in cutting view to 260
Arnei Jul 14, 2023
735955c
Increase contrast in dark mode for various buttons
Arnei Jul 14, 2023
3800f4f
Get rid of glowing boxShadows in darkmode
Arnei Jul 14, 2023
856544a
Replace datetimepickers
Arnei Jul 14, 2023
a9ce708
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Jul 14, 2023
50c40ed
Removes playwright test for datetime picker
Arnei Jul 14, 2023
8223516
Generalize some CSS
Arnei Jul 14, 2023
9d73c8d
Various small DarkMode improvements
Arnei Jul 17, 2023
c869b41
Fix Main Menu Overflow
Arnei Jul 17, 2023
09dd6ab
Background color matching with Studio
Arnei Jul 20, 2023
92d2840
Remove visual box from Thumbnail view
Arnei Jul 20, 2023
56fd3c6
Put a white canvas around videos
Arnei Jul 20, 2023
6f839c5
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Jul 25, 2023
1978e74
Add basic language switcher component
Arnei Jul 26, 2023
b43685e
Fix custom icon style size
Arnei Aug 14, 2023
89cb06f
Make disabled metadata fields look more disabled
Arnei Aug 14, 2023
4d6624e
Style track selection similar to cutting
Arnei Aug 21, 2023
1cb40b9
Style thumbnail view more like cutting view
Arnei Aug 21, 2023
1a2359c
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Aug 21, 2023
c9fa56e
Get rid of flag icons in dev toml
Arnei Aug 21, 2023
0233462
Fix capitalization
Arnei Aug 21, 2023
ea4fd13
Use appkits theme switching
Arnei Aug 24, 2023
f9db316
Move language selector to header
Arnei Aug 24, 2023
50b9a9f
Rename "settings" to "keyboard controls"
Arnei Aug 24, 2023
c568ba7
Use lucide icon for keyboard controls
Arnei Aug 24, 2023
d683f66
Switch feather icons for lucide icons
Arnei Aug 24, 2023
e463b5d
Fix theme selector auto preference
Arnei Aug 28, 2023
9b904c0
Style header more exactly like Studio
Arnei Aug 28, 2023
ec68a04
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Aug 31, 2023
c1eb1ca
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Aug 31, 2023
9a70d50
Merge remote-tracking branch 'upstream/main' into redesign
Arnei Sep 4, 2023
ad5f1d5
High Contrast: Fix subtitle select hover color
Arnei Sep 12, 2023
52b0ac7
Fix language key for portugese
Arnei Sep 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ spanish = { lang = "es" }
# A list of icons to be displayed for languages defined above.
# Values are strings but should preferably be Unicode icons.
# These are optional and you can also choose to have no icons.
"de-DE" = "🇩🇪"
"en-US" = "🇺🇸"
"es" = "🇪🇸"
"de-DE" = "DE"
"en-US" = "EN"
"es" = "ES"

[subtitles.defaultVideoFlavor]
# Specify the default video in the subtitle video player by flavor
Expand Down
21,101 changes: 1,851 additions & 19,250 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 4 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@date-io/date-fns": "^2.17.0",
"@emotion/babel-preset-css-prop": "^11.10.0",
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fortawesome/fontawesome-svg-core": "^6.4.2",
"@fortawesome/free-regular-svg-icons": "^6.4.2",
"@fortawesome/free-solid-svg-icons": "^6.4.2",
"@fortawesome/react-fontawesome": "^0.2.0",
"@fontsource-variable/roboto-flex": "^5.0.3",
"@iarna/toml": "^2.2.5",
"@mui/material": "^5.14.7",
"@mui/x-date-pickers": "^5.0.20",
"@opencast/appkit": "^0.2.0",
"@reduxjs/toolkit": "^1.9.5",
"@testing-library/jest-dom": "^6.1.2",
"@types/iarna__toml": "^2.0.2",
Expand All @@ -30,6 +26,7 @@
"lodash": "^4.17.21",
"luxon": "^3.4.2",
"mui-rff": "^6.1.4",
"package-lock-only": "^0.0.4",
"react": "^18.2.0",
"react-app-rewired": "^2.2.1",
"react-beforeunload": "^2.6.0",
Expand All @@ -39,6 +36,7 @@
"react-final-form": "^6.5.9",
"react-hotkeys": "^2.0.0",
"react-i18next": "^13.2.1",
"react-icons": "^4.9.0",
"react-indiana-drag-scroll": "^2.2.0",
"react-player": "git+https://arnei@github.com/Arnei/react-player.git#20fe6c061cf7d71d33d764b4a51c9b9bbb614bf6",
"react-redux": "^8.1.2",
Expand Down
6 changes: 3 additions & 3 deletions public/editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ spanish = { lang = "es" }


[subtitles.icons]
"de-DE" = "🇩🇪"
"en-US" = "🇺🇸"
"es" = "🇪🇸"
"de-DE" = "DE"
"en-US" = "EN"
"es" = "ES"

[thumbnail]
show = true
6 changes: 1 addition & 5 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import Body from './main/Body';
import Header from './main/Header';
import { GlobalStyle } from './cssStyles';
import { useSelector } from 'react-redux';
import { selectThemeState } from './redux/themeSlice';

function App() {
const theme = useSelector(selectThemeState);

return (
<div className="App" css={theme}>
<div className="App">
<GlobalStyle />
<Header />
<Body />
Expand Down
10 changes: 10 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,16 @@ export let settings: iSettings
* 3. Default values
*/
export const init = async () => {

// Get color scheme from local storage, otherwise set auto scheme based on preference
let scheme = window.localStorage.getItem("colorScheme");
if (scheme === null || !["light", "dark", "light-high-contrast", "dark-high-contrast"].includes(scheme)) {
const lightness = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
const contrast = window.matchMedia("(prefers-contrast: more)").matches ? "-high-contrast" : "";
scheme = `${lightness}${contrast}`;
}
document.documentElement.dataset.colorScheme = scheme;

// Get settings from config file
await loadContextSettings().then(result => {
configFileSettings = validate(result, false, SRC_SERVER, "from server settings file")
Expand Down
108 changes: 75 additions & 33 deletions src/cssStyles.tsx
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
/**
* This file contains general css stylings
*/
import { css, Global } from '@emotion/react'
import { css, Global, keyframes } from '@emotion/react'
import React from "react";
import emotionNormalize from 'emotion-normalize';
import { checkFlexGapSupport } from './util/utilityFunctions';
import { useSelector } from 'react-redux';
import { selectTheme, Theme } from './redux/themeSlice';
import { createTheme } from '@mui/material/styles';
import { Theme, useTheme } from './themes';

/**
* An emotion component that inserts styles globally
* Is removed when the styles change or when the Global component unmounts.
*/
export const GlobalStyle: React.FC = () => {
const theme = useSelector(selectTheme);
const theme = useTheme();
return (
<Global styles={globalStyle(theme)} />
);
Expand All @@ -35,6 +34,11 @@ export const globalStyle = (theme: Theme) => css({
});


// When to switch behaviour based on screen width
export const BREAKPOINT_SMALL = 450;
export const BREAKPOINT_MEDIUM = 650;


/**
* CSS for replacing flexbox gap in browers that do not support it
* Does not return a css prop, but is meant as a direct replacement for "gap"
Expand Down Expand Up @@ -75,27 +79,23 @@ export const flexGapReplacementStyle = (flexGapValue: number, flexDirectionIsRow
* CSS for buttons
*/
export const basicButtonStyle = (theme: Theme) => css({
borderRadius: '10px',
borderRadius: '5px',
cursor: "pointer",
// Animation
transitionDuration: "0.3s",
transitionProperty: "transform",
"&:hover": {
transform: 'scale(1.1)',
backgroundColor: `${theme.button_color}`,
color: `${theme.inverted_text}`,
},
"&:focus": {
transform: 'scale(1.1)',
},
"&:active": {
transform: 'scale(0.9)',
backgroundColor: `${theme.button_color}`,
color: `${theme.inverted_text}`,
},
// Flex position child elements
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
...(flexGapReplacementStyle(10, false)),
textAlign: 'center' as const,
outline: `${theme.button_outline}`
outline: `${theme.button_outline}`,
});

/**
Expand All @@ -104,7 +104,7 @@ export const basicButtonStyle = (theme: Theme) => css({
export const deactivatedButtonStyle = css({
borderRadius: '10px',
cursor: "pointer",
opacity: "0.4",
opacity: "0.6",
// Flex position child elements
display: 'flex',
justifyContent: 'center',
Expand All @@ -129,23 +129,22 @@ export const navigationButtonStyle = (theme: Theme) => css({
*/
export const backOrContinueStyle = css(({
display: 'flex',
flexDirection: 'row' as const,
flexDirection: 'row',
...(flexGapReplacementStyle(20, false)),
}))

/**
* CSS for big buttons in a dynamic grid
*/
export const tileButtonStyle = (theme: Theme) => css({
width: '250px',
width: '290px',
height: '220px',
display: 'flex',
flexDirection: 'column' as const,
fontSize: "x-large",
flexDirection: 'column',
fontWeight: "bold",
...(flexGapReplacementStyle(30, false)),
boxShadow: `${theme.boxShadow}`,
boxShadow: `${theme.boxShadow_tiles}`,
background: `${theme.element_bg}`,
alignItems: 'unset', // overwrite from basicButtonStyle to allow for textOverflow to work
placeSelf: 'center',
});

Expand All @@ -167,23 +166,24 @@ export const disableButtonAnimation = css({
/**
* CSS for a title
*/
export const titleStyle = css(({
export const titleStyle = (theme: Theme) => css(({
display: 'inline-block',
padding: '15px',
overflow: 'hidden',
whiteSpace: "nowrap",
textOverflow: 'ellipsis',
maxWidth: '100%',
color: `${theme.text}`,
}))

/**
* Addendum for the titleStyle
* Used for page titles
*/
export const titleStyleBold = css({
export const titleStyleBold = (theme: Theme) => css({
fontWeight: 'bold',
fontSize: '24px',
verticalAlign: '-2.5px',
color: `${theme.text}`,
})

/**
Expand Down Expand Up @@ -214,13 +214,19 @@ export const errorBoxStyle = (errorStatus: boolean, theme: Theme) => {

export function selectFieldStyle(theme: Theme) {
return {
control: (provided: any) => ({
control: (provided: any, state: any) => ({
...provided,
background: theme.element_bg,
background: theme.menu_background,
...(state.isFocused && {borderColor: theme.metadata_highlight}),
...(state.isFocused && {boxShadow: `0 0 0 1px ${theme.metadata_highlight}`}),
"&:hover": {
borderColor: theme.menu_background,
boxShadow: `0 0 0 1px ${theme.metadata_highlight}`
},
}),
menu: (provided: any) => ({
...provided,
background: theme.element_bg,
background: theme.menu_background,
outline: theme.dropdown_border,
// kill the gap
marginTop: 0,
Expand All @@ -231,18 +237,18 @@ export function selectFieldStyle(theme: Theme) {
}),
multiValue: (provided: any) => ({
...provided,
color: theme.selected_text,
color: theme.inverted_text,
background: theme.multiValue,
cursor: 'default',
}),
multiValueLabel: (provided: any) => ({
...provided,
color: theme.selected_text,
color: theme.inverted_text,
}),
option: (provided: any, state: any) => ({
...provided,
background: state.isFocused ? theme.focused : theme.background
&& state.isSelected ? theme.selected : theme.background,
background: state.isFocused ? theme.focused : theme.menu_background
&& state.isSelected ? theme.selected : theme.menu_background,
...(state.isFocused && {color: theme.focus_text}),
color: state.isFocused ? theme.focus_text : theme.text
&& state.isSelected ? theme.selected_text : theme.text,
Expand Down Expand Up @@ -279,7 +285,7 @@ export const calendarStyle = (theme: Theme) => createTheme({
root: {
/* Modal */
outline: `${theme.dropdown_border} !important`,
background: `${theme.background}`,
background: `${theme.menu_background}`,
color: `${theme.text}`,

/* Calendar-modal */
Expand Down Expand Up @@ -323,7 +329,7 @@ export const calendarStyle = (theme: Theme) => createTheme({
styleOverrides: {
root: {
/* Calendar- and Clock-modal -> arrows, icon, days */
color: `${theme.icon_color} !important`,
color: `${theme.text} !important`,
'&.MuiPickersDay-root': {
background: 'transparent !important',
color: `${theme.text} !important`,
Expand Down Expand Up @@ -422,3 +428,39 @@ export const subtitleSelectStyle = (theme: Theme) => createTheme({
}
}
})

export const spinningStyle = css({
animation: `2s linear infinite none ${keyframes({
"0%": { transform: "rotate(0)" },
"100%": { transform: "rotate(360deg)" },
})}`,
})

export const customIconStyle = (theme: Theme) => css(({
maxWidth: '16px',
height: 'auto',
color: theme.text,
}))

export const videosStyle = (theme: Theme) => css(({
display: 'flex',
flexDirection: 'column',

width: '100%',
background: `${theme.menu_background}`,
borderRadius: '5px',
boxShadow: `${theme.boxShadow_tiles}`,
marginTop: '24px',
boxSizing: "border-box",
padding: '10px',
...(flexGapReplacementStyle(10, false)),
}))

export const backgroundBoxStyle = (theme: Theme) => css(({
background: `${theme.menu_background}`,
borderRadius: '7px',
boxShadow: `${theme.boxShadow_tiles}`,
boxSizing: "border-box",
padding: '20px',
...(flexGapReplacementStyle(25, false)),
}))
25 changes: 15 additions & 10 deletions src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@
"info-text": "The video will not be processed but all cutting information will be stored in Opencast. You can continue your edit later.",
"success-text": "Changes saved successfully! You can now close the editor or continue working.",
"success-tooltip-aria": "Saved successfully",
"saveArea-tooltip": "Save Area"
"saveArea-tooltip": "Save Area",
"confirm-success": "Okay",
"cancel-save": "Don't save"
},

"discard": {
Expand Down Expand Up @@ -131,7 +133,7 @@
},
"language": {
"LANGUAGES-SLOVENIAN": "Slovenian",
"LANGUAGES-PORTUGUESE": "Portuguese",
"LANGUAGES-PORTUGESE": "Portuguese",
"LANGUAGES-ROMANSH": "Romansh",
"LANGUAGES-ARABIC": "Arabic",
"LANGUAGES-POLISH": "Polish",
Expand Down Expand Up @@ -218,7 +220,7 @@
},

"trackSelection": {
"description": "Select or deselect which tracks are used for processing and publication.",
"title": "Select track(s) for processing",
"trackInactive": "inactive",
"deleteTrackText": "Delete Track",
"restoreTrackText": "Restore Track",
Expand Down Expand Up @@ -265,7 +267,7 @@
},

"keyboardControls": {
"header": "Keyboard Controls",
"header": "Shortcuts",
"defaultGroupName": "General",
"missingLabel": "Unknown",
"groupVideoPlayer": "Video Player",
Expand All @@ -283,11 +285,14 @@

"theme": {
"appearance": "Appearance",
"selectThemesLabel": "Appearances",
"darkmode": "Dark mode",
"lightmode": "Light mode",
"system": "System design",
"high-contrast-dark": "High contrast (Dark mode)",
"high-contrast-light": "High contrast (Light mode)"
"dark": "Dark",
"light": "Light",
"auto": "Auto",
"dark-high-contrast": "Dark (High contrast)",
"light-high-contrast": "Light (High contrast)"
},

"language": {
"language": "Language"
}
}
Loading
Loading