-
Notifications
You must be signed in to change notification settings - Fork 44
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
Redesign #1079
Conversation
Styles header according to redesgin
Changes the main menu text to blue and bold. Tries to keep text black where suggested.
This pull request is deployed at test.editor.opencast.org/1079/2023-06-12_06-42-42/ . |
Replaces the fontawesome packages with the react-icons package. React-icons also includes fontawesome icons, but also has feather icons which we want to predominantly use in the redesign. Attempts to replace fontawesome icons with appropriate feather icons. Also grabs a subtitle icon from material-ui- icons.
This pull request has conflicts ☹ |
This pull request is deployed at test.editor.opencast.org/1079/2023-06-13_11-50-11/ . |
This pull request is deployed at test.editor.opencast.org/1079/2023-06-13_11-56-34/ . |
Splits `Video.tsx` into three new files. `Cutting.tsx` now is in charge of the cutting view (before this was awkwardly split between MainContent.tsx and Video.tsx). VideoPlayers and VideoControls now each have their own files so they can be arranged flexibly.
Works on the appearance of the cutting view, mostly concerned with boxes and boxshadows.
This pull request is deployed at test.editor.opencast.org/1079/2023-06-14_14-55-48/ . |
Attempts to fit the timeline to the colors of the redesign. Uses a hacky filter.
Reshapes the scrubber to fit the basic idea of the redesign. For a better fit somebody with artistic skills would have to create an SVG.
Now centered and boxShado-less!
Also aim at improving the general layout of the cutting view again.
The videos now have rounded edges. Finally.
This pull request is deployed at test.editor.opencast.org/1079/2023-06-15_14-18-09/ . |
boxshadow did not conform to the borderradius
General Metadata Layout. Also some color changes where easy to make. More color changes to come.
Fixes an invalid overflow value in MainContent. Would previously only have scrollbars for the whole page, which would leave the main menu looking awkwardly cut off. Now scrolls properly.
Changes the design for the track selection
If people are happy with this PR in general and there are no more requests for large scale changes, it would be great if we could get it approved and merged. Since this PR touches most parts of the editor, it also blocks a lot of other PRs. Getting this PR merged would free those up. And getting this PR merged does not mean the redesign has to be done and over with, we can still make follow-up PRs for smaller scale changes. |
This pull request has conflicts ☹ |
This pull request is deployed at test.editor.opencast.org/1079/2023-08-31_10-35-29/ . |
This pull request is deployed at test.editor.opencast.org/1079/2023-08-31_10-51-23/ . |
If I remember correctly, it does support that to some extent: It already selects the language automatically, if none is stored in the local storage. So maybe just store to auto-mode separately and make sure to remove the stored i18m language before loading i18m. But I'm absolutely fine with moving that to a separate patch. |
This pull request has conflicts ☹ |
This pull request is deployed at test.editor.opencast.org/1079/2023-09-04_13-39-17/ . |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok so I've looked over the code changes and left some comments, but tbh these are just personal preferences and I wouldn't say that you actually need to address any of these.
I also took another look at the deployment and noticed a few small things that should probably get fixed:
- High contrast mode:
- Metadata:
- Subtitle editor:
<Timeline | ||
timelineHeight={260} | ||
selectIsPlaying={selectIsPlaying} | ||
selectCurrentlyAt={selectCurrentlyAt} | ||
setIsPlaying={setIsPlaying} | ||
setCurrentlyAt={setCurrentlyAt} | ||
setClickTriggered={setClickTriggered} | ||
/> | ||
<CuttingActions /> | ||
<VideoControls | ||
selectCurrentlyAt={selectCurrentlyAt} | ||
selectIsPlaying={selectIsPlaying} | ||
selectIsPlayPreview={selectIsPlayPreview} | ||
setIsPlaying={setIsPlaying} | ||
setIsPlayPreview={setIsPlayPreview} | ||
/> |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
<CuttingActionsButton Icon={LuScissors} | ||
actionName={t("cuttingActions.cut-button")} actionHandler={dispatchAction} action={cut} | ||
tooltip={t('cuttingActions.cut-tooltip', { hotkeyName: (cuttingKeyMap[handlers.cut.name] as KeyMapOptions).sequence })} | ||
ariaLabelText={t('cuttingActions.cut-tooltip-aria', { hotkeyName: (cuttingKeyMap[handlers.cut.name] as KeyMapOptions).sequence })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would generally list one prop per line for every component, if they don't fit in one line. I think that improves readability. Something like
<CuttingActionsButton
Icon={LuScissors}
actionName={t("cuttingActions.cut-button")}
actionHandler={dispatchAction}
action={cut}
tooltip={t('cuttingActions.cut-tooltip', {
hotkeyName: (cuttingKeyMap[handlers.cut.name] as KeyMapOptions).sequence
})}
ariaLabelText={t('cuttingActions.cut-tooltip-aria', {
hotkeyName: (cuttingKeyMap[handlers.cut.name] as KeyMapOptions).sequence
})}
/>
Though as with my other comment, I see that this is done in many other places as well. So I think if that's how you like doing it, there is nothing wrong with it.
first={true} | ||
last={true} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can pass true
boolean props without the ={true}
and spread some of the other props like I suggested in one of my other comments.
marginTop: (scheme === 'dark-high-contrast' || scheme === 'light-high-contrast' ? '3%' : '0%'), | ||
marginBottom: (scheme === 'dark-high-contrast' || scheme === 'light-high-contrast' ? '3%' : '0%'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You couuuld use the shorthand for these:
margin:
`${(scheme === 'dark-high-contrast' || scheme === 'light-high-contrast' ? '3%' : '0%')} 0`,
and also above that (not strictly part of this review), from line 310 to 319, you could bunch the hover and focus style together, like:
"&:hover, &:focus-within": {
"& .functionButtonAreaStyle": {
visibility: "visible",
}
},
height: timelineHeight - 20 + 'px', // CHECK IF height: '100%', | ||
paddingTop: '10px', | ||
height: timelineHeight + 'px', // CHECK IF height: '100%', | ||
// paddingTop: '10px', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just remove this commented-out padding? Same for line 348. Though maybe there's a reason these are commented out and not removed.
ref.current.seekTo(currentlyAt, "seconds") | ||
dispatch(setClickTriggered(false)) | ||
} | ||
if (!isAspectRatioUpdated && ready) { // if (!isAspectRatioUpdated && ref.current && ready) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably also remove that comment on the right.
// return ( | ||
// <div title="Video Player"> | ||
// <video width="320" height="240" controls ref={vidRef}> | ||
// <source src="https://media.geeksforgeeks.org/wp-content/uploads/20190616234019/Canvas.move_.mp4" type="video/mp4" /> | ||
// Your browser does not support the video tag. | ||
// </video> | ||
// </div> | ||
// ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Another one, though as with the others, maybe you have a reason for keeping this around.
return ( | ||
<> | ||
{render()} | ||
</> | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing wrong with this, but you could do sth like
return errorState
? <div css={errorBoxStyle} role="alert">
<span>{t("video.loadError-text")} </span>
</div>
: <ReactPlayer (...) />
In high contrast mode, hovering the button containing the subtitle dropdown would color all elements, making it unreadable. Should now be more readable
Language key for portugese changed in Opencast, so we need to change it in our translation files as well.
Thanks for the review Ole
Agreed, will look into that. Will likely have to fix it in appkit though. Could this also be done in a follow-up PR or would you consider this a blocker?
Should be better now.
Should be fixed now (for english)
While these are valid concerns, most of these already exists prior to this PR. Thus, it should not be the responsibility of this PR to fix them, let alone discuss which code styles we want to pursue. We can address these topics in separate issues. |
This pull request is deployed at test.editor.opencast.org/1079/2023-09-12_15-46-17/ . |
While I haven't looked at the code, the UI itself looks good to me. |
I know I'm late to the game, but I'm still struggeling with the diversity of canvasses, cf. #1106. Title ("Presenter" or "Presentation) or not? Functions/symbols below or to the right? And, as a consequence, size, resolution, and appearance are very diverse over only three "elements" ("Cutting", "Tracks", "Thumbnail") |
PS: I'm in favor of titles in every canvas and symbols to the right, a vertical alignment as a consequence. |
Created a new issue for the symbols below/to the right in #1157 (trying to move discussions out of this really long thread). |
Resolves #1076.
Currently a draft due to still being worked on.
Changes the appearance of the editor to bring it more in line with Opencast Studio and Tobira. Focuses on visual changes, functional changes should be minimal.
The focus of the redesign lies in the color scheme for the light mode. Furthermore, elements should be more distinct and intuitive through the use of additional backgrounds and rearrangement.
Does not aim to make major changes to:
What this will aspire to look like
Incidentally resolves #897.
Incidentally resolves #898.
Incidentally resolves #65.
Graciously sponsored by the ETH.