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

Icon Configuration for Languages #860

Merged
merged 1 commit into from
Nov 24, 2022
Merged

Conversation

lkiesow
Copy link
Member

@lkiesow lkiesow commented Oct 28, 2022

This patch allows users to specify icons for languages selectors displayed in the subtitle editor. Users have to specify the selectable languages anyway and the algorithm used before guessed wrong for popular languages like English.

If no icon is specified for a language, the selector will simply omit the icon and display just the label.

This fixes #825

Screenshot from 2022-10-28 18-35-00

@lkiesow lkiesow added type:visual-clarity A part of the UI is not visually readable type:usability Usability improvements labels Oct 28, 2022
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/860/2022-10-28_17-01-49/ .
It might take a few minutes for it to become available.

Copy link
Member

@Arnei Arnei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with this PR. Correctly guessing all the language flags was a pipe dream anyway.

This also allows us to avoid the discussion whether country flags are sensible indicators for languages, which is nice.

Comments below are justodds and ends.

src/config.ts Outdated Show resolved Hide resolved
src/main/SubtitleSelect.tsx Outdated Show resolved Hide resolved
@@ -81,6 +81,13 @@
"captions/source+en" = "English"
"captions/source+es" = "Spanish"

[subtitles.icons]
# A list of icons to be displayed for languages defined above.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could mention that these are totally optional? Arguably that might be obvious, but it might also not be. And in that case, no one feels pressured into thinking up icons when they don't want.

Alternatively comment the list out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll update the description

@Arnei
Copy link
Member

Arnei commented Nov 11, 2022

One more comment: Since the "icons" can now be very long, it might make sense to update the icon css a bit, although I hope we can trust people who are allowed to set the config to choose sensible values :)
Bildschirmfoto vom 2022-11-11 15-05-07

@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/860/2022-11-11_22-31-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/860/2022-11-11_22-32-12/ .
It might take a few minutes for it to become available.

@lkiesow
Copy link
Member Author

lkiesow commented Nov 11, 2022

it might make sense to update the icon css a bit,

I kind of feel like saying that if people want to be stupid, let them be stupid ;-)
But you were thinking about something like overflow: hidden?

@Arnei
Copy link
Member

Arnei commented Nov 14, 2022

it might make sense to update the icon css a bit,

I kind of feel like saying that if people want to be stupid, let them be stupid ;-) But you were thinking about something like overflow: hidden?

Yes, thinking about exactly that. Wouldn't spent any major on time this though if overflow: hidden for some reason does not work as expected or is not enough. Not like admins will intentionally configure the editor to look terrible, right?

@lkiesow
Copy link
Member Author

lkiesow commented Nov 23, 2022

Updated the style. If you now try adding hundreds of flags, you will end up with something like this:

Screenshot from 2022-11-23 18-02-25

@lkiesow lkiesow requested a review from Arnei November 23, 2022 17:06
This patch allows users to specify icons for languages selectors
displayed in the subtitle editor. Users have to specify the selectable
languages anyway and the algorithm used before guessed wrong for popular
languages like English.

If no icon is specified for a language, the selector will simply omit
the icon and display just the label.

This fixes opencast#825
@github-actions
Copy link

This pull request is deployed at test.editor.opencast.org/860/2022-11-23_18-55-28/ .
It might take a few minutes for it to become available.

@Arnei Arnei merged commit d8bac95 into opencast:main Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:usability Usability improvements type:visual-clarity A part of the UI is not visually readable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inconsistent language flags
2 participants