Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
04e609e
Basic thumbnail view idea
Arnei Aug 8, 2022
4e8a390
Basic Thumbnail generation
Arnei Aug 9, 2022
b83e145
Basic thumbnail upload functionality
Arnei Aug 10, 2022
b12cad6
Basic use thumbnail for others functionality
Arnei Aug 10, 2022
f72f8f2
Basic discard thumbnail functionality
Arnei Aug 10, 2022
2e9e5fc
Thumbnail code refactoring and generate all button
Arnei Aug 10, 2022
74bbe64
Display thumbnails gotten from backend, UI changes, translation, acce…
Arnei Aug 15, 2022
82dd6cb
Thumbnail priority system and simple mode
Arnei Aug 16, 2022
c563a1f
Fix tainted canvas issue
Arnei Aug 19, 2022
3e84421
Deactivate buttons that are never used
Arnei Aug 19, 2022
ad0e2f8
Make thumbnail buttons same size
Arnei Aug 19, 2022
d2701bc
Insert (flexGapReplacementStyle
Arnei Aug 19, 2022
1aed306
Have thumbnail image maintain aspect ratio
Arnei Aug 19, 2022
0a38b9c
Fix resizing when generating image
Arnei Aug 19, 2022
a8615f4
Create a bit of distance from the bottom of the page
Arnei Aug 19, 2022
48e0a3b
Add a bit of padding to the main menu buttons
Arnei Aug 19, 2022
35692af
Hardcode placeholder box size
Arnei Aug 19, 2022
7599030
Undo padding that did not actually work as intended
Arnei Aug 19, 2022
b9d18e7
Remove grey boxes around thumbnail rows
Arnei Sep 5, 2022
de30b05
Reflow thumbnail table to allow table entries to fit side by side if …
Arnei Sep 5, 2022
1562f34
Reduce space taken up by thumbnail row buttons and make them responsive
Arnei Sep 5, 2022
c0d1317
Add icons for thumbnail buttons
Arnei Sep 5, 2022
82f383b
Change size of thumbnail placeholder to reflect the changes to the th…
Arnei Sep 6, 2022
4b18c29
Apply previous changes to thumbnail simple mode as well
Arnei Sep 6, 2022
6b85b8c
Fix button remaining bigger size than others after being clicked
Arnei Sep 6, 2022
628bf4f
Hide invisible element from the accessibility tree
Arnei Sep 6, 2022
785a121
Fix missing key prop for thumbnail simple mode buttons
Arnei Sep 6, 2022
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
16 changes: 14 additions & 2 deletions public/editor-settings.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,19 @@ password = "opencast"
[thumbnail]

# If the thumbnail editor appears in the main menu
# Warning: This interface is unfinished
# Type: boolean
# Default: false
#show = false
show = true

# Whether to use "simple" or "professional" mode.
# Professional mode allows users to edit all thumbnails that fit the subflavor
# specified in the Opencast configuration file
# `etc/org.opencastproject.editor.EditorServiceImpl.cfg`. It is useful
# when working with multiple thumbnails.
# Simple mode only allows users to edit the "primary" thumbnail, as specified
# in the Opencast configuration file
# `etc/org.opencastproject.editor.EditorServiceImpl.cfg`. It is useful
# when there is only a single thumbnail to worry about and you want hide
# potential fallbacks from the user. If a primary thumbnail cannot be
# determined, this falls back to professional mode.
simpleMode = false
3 changes: 3 additions & 0 deletions src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ interface iSettings {
},
thumbnail: {
show: boolean,
simpleMode: boolean,
}
}

Expand All @@ -70,6 +71,7 @@ var defaultSettings: iSettings = {
},
thumbnail: {
show: false,
simpleMode: false,
}
}
var configFileSettings: iSettings
Expand Down Expand Up @@ -311,6 +313,7 @@ const SCHEMA = {
},
thumbnail: {
show : types.boolean,
simpleMode: types.boolean,
}
}

Expand Down
22 changes: 22 additions & 0 deletions src/cssStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,28 @@ export const backOrContinueStyle = css(({
...(flexGapReplacementStyle(20, false)),
}))

/**
* CSS for a title
*/
export const titleStyle = css(({
display: 'inline-block',
padding: '15px',
overflow: 'hidden',
whiteSpace: "nowrap",
textOverflow: 'ellipsis',
maxWidth: '500px',
}))

/**
* Addendum for the titleStyle
* Used for page titles
*/
export const titleStyleBold = css({
fontWeight: 'bold',
fontSize: '24px',
verticalAlign: '-2.5px',
})

/**
* CSS for ariaLive regions that should not be visible
*/
Expand Down
29 changes: 29 additions & 0 deletions src/i18n/locales/en-US.json
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,35 @@
}
},

"thumbnail": {
"title": "Thumbnail Editor",
"noThumbnailAvailable": "No Thumbnail set",
"previewImageAlt": "Thumbnail for",
"buttonGenerate": "Generate",
"buttonGenerate-tooltip": "Create a new thumbnail from the current scrubber position",
"buttonGenerate-tooltip-aria": "Create a new thumbnail from the current scrubber position",
"buttonUpload": "Upload",
"buttonUpload-tooltip": "Upload an image",
"buttonUpload-tooltip-aria": "Upload an image",
"buttonUseForOtherThumbnails": "Use for other thumbnails",
"buttonUseForOtherThumbnails-tooltip": "Use the thumbnail for all other videos",
"buttonUseForOtherThumbnails-tooltip-aria": "Use the thumbnail for all other videos",
"buttonDiscard": "Discard",
"buttonDiscard-tooltip": "Undo all changes made to this thumbnail",
"buttonDiscard-tooltip-aria": "Undo all changes made to this thumbnail",
"buttonGenerateAll": "Generate All",
"buttonGenerateAll-tooltip": "Create new thumbnails from the current scrubber position",
"buttonGenerateAll-tooltip-aria": "Create new thumbnails from the current scrubber position",
"explanation": "Here you can set the thumbnail for each video",
"primary": "Primary",
"secondary": "Secondary"
},

"thumbnailSimple": {
"rowTitle": "Change thumbnail here",
"from": "from"
},

"error": {
"generic-message": "A critical error has occurred!",
"details": "Details: ",
Expand Down
14 changes: 14 additions & 0 deletions src/main/MainContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { hasChanges as videoHasChanges } from "../redux/videoSlice";
import { hasChanges as metadataHasChanges} from "../redux/metadataSlice";
import { selectTheme } from "../redux/themeSlice";
import ThemeSwitcher from "./ThemeSwitcher";
import Thumbnail from "./Thumbnail";

/**
* A container for the main functionality
Expand Down Expand Up @@ -82,6 +83,16 @@ const MainContent: React.FC<{}> = () => {
background: `${theme.background}`,
})

const thumbnailSelectStyle = css({
...displayState(MainMenuStateNames.thumbnail),
flexDirection: 'column' as const,
alignContent: 'space-around',
...(flexGapReplacementStyle(20, false)),
paddingRight: '20px',
paddingLeft: '161px',
background: `${theme.background}`,
})

const finishStyle = css({
...displayState(MainMenuStateNames.finish),
flexDirection: 'column' as const,
Expand Down Expand Up @@ -123,6 +134,9 @@ const MainContent: React.FC<{}> = () => {
<div css={trackSelectStyle}>
<TrackSelection />
</div>
<div css={thumbnailSelectStyle}>
<Thumbnail />
</div>
<div css={finishStyle}>
<Finish />
</div>
Expand Down
Loading