-
Notifications
You must be signed in to change notification settings - Fork 43
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
High contrast mode for subtitle editor #841
High contrast mode for subtitle editor #841
Conversation
narickmann
commented
Oct 21, 2022
- subtitle view now has a working high contrast mode
- added some new color-attributes (subtitle_segment_bg, subtitle_segment_border and subtitle_segment_text)
- colors for subtitle elements adjusted (bg-color, text-color, border-color etc)
- subtitle view now has a working high contrast mode - added some new color-attributes (subtitle_segment_bg, subtitle_segment_border and subtitle_segment_text) - colors for subtitle elements adjusted (bg-color, text-color, border-color etc)
This pull request is deployed at test.editor.opencast.org/841/2022-10-21_07-55-18/ . |
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.
The high contrast mode lowers the contrast for the subtitle editor's video selector. The label is not legible at all anymore and the border is also no longer visible, making it hard to understand that this is a dropdown menu:
In high contrast mode, the language selector is literally black on black and you have to mark the text to read it:
The borders of the segment start and end times run into each other in high contrast mode. There should be at least a bit of margin between these fields:
- Added margin as suggested. Margin only applies in high contrast mode
This pull request is deployed at test.editor.opencast.org/841/2022-11-08_14-04-14/ . |
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.
The issues above all seem to have been addressed. Got one more related to the code.
src/main/SubtitleVideoArea.tsx
Outdated
const muiTheme = createTheme({ | ||
palette: { | ||
mode: isDarkPreferred === 'dark' ? 'dark' : 'light', | ||
const muiStyle = makeStyles({ |
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.
This is already defined in SubtitleSelect.tsx. Can we define it in cssStyles.tsx instead to avoid duplication?
This pull request has conflicts ☹ |
This patch removes duplicated style for the two dropdown menus in the subtitle area. Unfortunately, I couldn't easily transfer the style to 'cssStyles.tsx' because the theme was then undefined and I couldn't work with the theme variables. That's why I split it up like the calendar and used the css selectors. I don't know if it would be worth the effort to create an extra component for these two menus (like for the tooltips) and then use that. But we could get rid of some css selectors.
This pull request is deployed at test.editor.opencast.org/841/2022-11-24_15-36-21/ . |
…tle-editor Resolved conflict
This pull request is deployed at test.editor.opencast.org/841/2022-11-25_07-51-22/ . |
The hint for the dropdowns does not show if the dropdown was in focus once and then isn't anymore. Only in dark-high-contrast mode. Probably because the color matches the background-color. Edit: Also applies to conventional dark mode. |
The background-color of the dropdown menus ("Pick a language" and "Video Flavor" in subtitle view) was accidentally transparent on both high-contrast-modes. The label is not visible after the dropdown was in focus once. This is only visible when you use a deploy link (like test.editor.opencast.org/841/2022-11-25_07-51-22/) I can't reproduce this on localhost. Removed some css selectors from index.css that belong to the label but don't seem to have any effect.
This pull request is deployed at test.editor.opencast.org/841/2022-12-01_13-50-28/ . |
Last commit didn't fixed the label-issue. Can't reproduce this on localhost (on localhost it looks "normal" for all color modes). I also noticed that the clock in the calendar (in the metadata view) looks normal via the deploy link (all color modes) but the colors are not correct via localhost (all color modes). Deploy-Link - https://test.editor.opencast.org/841/2022-12-01_13-50-28/ : |
Seems like running the app with It would still be extremely great if we didn't have to rely on hard-coding values for automatically generated class names. |
Removed all hardcoded CSS class names from index.css and added the style for the two dropdown menus in subtitle view in cssStyles.tsx. Did the same for the calendar and clock in metadata view. Now both styles are separated. They should no longer affect each other due to the same CSS class names.
This pull request is deployed at test.editor.opencast.org/841/2022-12-08_09-07-25/ . |
Somewhat nitpicky, but in regarding the clock view in the calendar: In light high contrast mode, for the arrows to switch between hours and minutes, the contrast is not very high (they are black when you can't click them, and dark blue when you can). Looks good otherwise. Very happy you managed to get rid of the hard-coded class names. |
Made the color a little lighter. It should now be more obvious if/that the arrow is disabled.
This pull request is deployed at test.editor.opencast.org/841/2022-12-09_13-47-19/ . |
Eh, good enough for me. Gonna wait a bit with merging to see if anyone else wants to take a look at this, but I'd say this overdue for merging. |