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

Redesign #1079

merged 101 commits into from
Sep 13, 2023

Conversation

Arnei
Copy link
Member

@Arnei Arnei commented Jun 12, 2023

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:

  • Thumbnail View
  • Subtitle View
  • High Contrast modes

What this will aspire to look like
Bildschirmfoto vom 2023-06-14 08-34-52

Incidentally resolves #897.
Incidentally resolves #898.
Incidentally resolves #65.

Graciously sponsored by the ETH.

Arnei added 3 commits June 9, 2023 15:12
Styles header according to redesgin
Changes the main menu text to blue and bold.
Tries to keep text black where suggested.
@Arnei Arnei added type:enhancement New feature or request type:visual-clarity A part of the UI is not visually readable labels Jun 12, 2023
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-06-12_06-42-42/ .
It might take a few minutes for it to become available.

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.
@github-actions github-actions bot added the status:conflicts Conflicts with another pull request or issue label Jun 13, 2023
@github-actions
Copy link

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-06-13_11-50-11/ .
It might take a few minutes for it to become available.

@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-06-13_11-56-34/ .
It might take a few minutes for it to become available.

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.
@github-actions github-actions bot removed the status:conflicts Conflicts with another pull request or issue label Jun 14, 2023
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-06-14_14-55-48/ .
It might take a few minutes for it to become available.

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.
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-06-15_14-18-09/ .
It might take a few minutes for it to become available.

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
@Arnei
Copy link
Member Author

Arnei commented Aug 31, 2023

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.

@github-actions github-actions bot added the status:conflicts Conflicts with another pull request or issue label Aug 31, 2023
@github-actions
Copy link

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-08-31_10-35-29/ .
It might take a few minutes for it to become available.

@github-actions github-actions bot removed the status:conflicts Conflicts with another pull request or issue label Aug 31, 2023
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-08-31_10-51-23/ .
It might take a few minutes for it to become available.

@lkiesow
Copy link
Member

lkiesow commented Aug 31, 2023

Unfortunately, it seems the translation library we use (react-18next) does not support an auto option out of the box. We certainly could work around that and make our own auto mode somehow, but it seems to me like that would take more time than I am willing to spent on it in this PR. Best left for another time.

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.

@github-actions github-actions bot added the status:conflicts Conflicts with another pull request or issue label Sep 1, 2023
@github-actions
Copy link

github-actions bot commented Sep 1, 2023

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@github-actions github-actions bot removed the status:conflicts Conflicts with another pull request or issue label Sep 4, 2023
@github-actions
Copy link

github-actions bot commented Sep 4, 2023

This pull request is deployed at test.editor.opencast.org/1079/2023-09-04_13-39-17/ .
It might take a few minutes for it to become available.

Copy link

@owi92 owi92 left a 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:
    • (dark only) The menus for language and appearance should have a visible border. Since they have the same background color as the general background, they look a little weird without that: Bildschirmfoto 2023-09-12 um 15 33 59
    • (dark and light) The subtitle picker barely has any contrast on hover: Bildschirmfoto 2023-09-12 um 12 09 21 Bildschirmfoto 2023-09-12 um 12 10 13
  • Metadata:
    • the translation for portugese is missing: Bildschirmfoto 2023-09-12 um 15 38 51
  • Subtitle editor:
    • there's a cut-off button: Bildschirmfoto 2023-09-12 um 15 40 38
    • I think the timeline overview could use some margin on the bottom. Without, it's kind of hard to notice: Bildschirmfoto 2023-09-12 um 15 44 06

Comment on lines +62 to +77
<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.

Comment on lines +73 to +76
<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 })}
Copy link

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.

Comment on lines +122 to +123
first={true}
last={true}
Copy link

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.

Comment on lines +324 to +325
marginTop: (scheme === 'dark-high-contrast' || scheme === 'light-high-contrast' ? '3%' : '0%'),
marginBottom: (scheme === 'dark-high-contrast' || scheme === 'light-high-contrast' ? '3%' : '0%'),
Copy link

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',
Copy link

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) {
Copy link

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.

Comment on lines +374 to +381
// 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>
// );
Copy link

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.

Comment on lines +368 to +372
return (
<>
{render()}
</>
);
Copy link

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.
@Arnei
Copy link
Member Author

Arnei commented Sep 12, 2023

Thanks for the review Ole

(dark only) The menus for language and appearance should have a visible border. Since they have the same background color as the general background, they look a little weird without that:

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?

(dark and light) The subtitle picker barely has any contrast on hover:

Should be better now.

the translation for portugese is missing:

Should be fixed now (for english)

Subtitle Editor and Code style

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.

@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/1079/2023-09-12_15-46-17/ .
It might take a few minutes for it to become available.

@gregorydlogan
Copy link
Member

While I haven't looked at the code, the UI itself looks good to me.

@owi92
Copy link

owi92 commented Sep 12, 2023

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?

Fair point, and I don't consider this a blocker.

(dark and light) The subtitle picker barely has any contrast on hover:

Should be better now.

The contrast is better, though I'd probably prefer sth like this on hover:
(But I would also say this can be moved to another issue and doesn't need to be done in this PR, if at all)
Bildschirmfoto 2023-09-12 um 22 57 11

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.

Yeah I figured as much, especially regarding the code styles.
So I'd say this can be merged.

@Arnei Arnei merged commit 184e15b into opencast:main Sep 13, 2023
6 checks passed
@oas777
Copy link

oas777 commented Sep 13, 2023

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?
grafik
vs.
grafik
vs.
grafik

Functions/symbols below or to the right?
grafik
vs.
grafik

And, as a consequence, size, resolution, and appearance are very diverse over only three "elements" ("Cutting", "Tracks", "Thumbnail")

@oas777
Copy link

oas777 commented Sep 13, 2023

PS: I'm in favor of titles in every canvas and symbols to the right, a vertical alignment as a consequence.

@Arnei
Copy link
Member Author

Arnei commented Sep 13, 2023

Created a new issue for the symbols below/to the right in #1157 (trying to move discussions out of this really long thread).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement New feature or request type:visual-clarity A part of the UI is not visually readable
Projects
None yet
6 participants