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

Introduce theming per user and instance #6311

Open
hellcp opened this issue Nov 20, 2018 · 7 comments · May be fixed by #9952
Open

Introduce theming per user and instance #6311

hellcp opened this issue Nov 20, 2018 · 7 comments · May be fixed by #9952
Labels
Feature Frontend Things related to the OBS RoR app

Comments

@hellcp
Copy link
Member

hellcp commented Nov 20, 2018

Is your feature request related to a problem? Please describe.

I heard @simotek complaining about lack of dark theme option in OBS. At the same time @Conan-Kudo would like to be able to use company theme / project theme for instances of OBS. It would be nice to provide users with option to switch between themes that are available on the instance, but also allow instance admins to set default theme

Describe the solution you'd like

Previously it was done with bratwurst, which wasn't a neat solution. However to properly setup theming both stylesheets, layouts and some icons have to be replacable. I would suggest creating a directory where themes would reside (like /src/api/app/themes?) with directories:

  • theme name
    • assets
      • stylesheets
      • images
    • views
      • layouts

(layouts because the most important part of theming will probably be header and footer, although would still be nice if other stuff was expandable, so for example replacing elements in views/packages to include more links in show, for it to better integrate with infrastructure of instance owners)

In addition, this would be a nice way to make webui3 and beyond, because we wouldn't be relying on adding switch_to_webui2 to every view we want to switch, instead opting for existing solution (will also be useful when updating bootstrap 4 to bootstrap 5 etc.)

Describe alternatives you've considered

Make people switch themes by overriding existing code and files (that only works with instance based theming though).

Additional context

Example of quite well executed theming in similar platform would have to go to pagure, although one of differences I would like to see there would be including scss compiling, because we might want to have some of our bootstrap usage expanded:
https://pagure.io/pagure/blob/master/f/pagure/themes

@hennevogel
Copy link
Member

Themeing that requires code changes doesn't really make sense IMHO. If you can do this, you can do this already right now, as Ruby on Rails allows for this to easily happen. We already do it currently with the bootstrap beta feature and it's a no-brainer.

What I would find more interesting is a way to overwrite some of the sass variables (and maybe even introduce more narrow scopes for them) so you can influence the colors from inside the app.

@hennevogel hennevogel added Feature Frontend Things related to the OBS RoR app labels Nov 20, 2018
@hellcp
Copy link
Member Author

hellcp commented Nov 20, 2018

@hennevogel you have to consider how other projects already have themes of their own, where not just variables are used. Heck, even we do with chameleon.

What I would really want is for themes to be drag and drop into a single directory, without overriding what's already in code.

@Conan-Kudo
Copy link
Member

Conan-Kudo commented Jun 18, 2019

So there are two main use-cases I see here:

  • Having a corporate theme instance wide: This, I imagine is easy for OBS to support now.
  • Having a per-user setting for swapping to something like a dark theme or high contrast theme (for vision issues)

@guoyunhe
Copy link
Contributor

@hennevogel may I ask how did you provide beta Bootstrap theme along with the old one? Like doing some if/else condition in page templates?

@hennevogel
Copy link
Member

hennevogel commented Jul 31, 2019

It's basically it's own layout, view and assets path. It's still there see src/api/app/controllers/webui/webui_controller.rb#L309-L339

But this is not what we want to have in our code base for themes.

@hellcp hellcp linked a pull request Jul 24, 2020 that will close this issue
@bluca
Copy link
Contributor

bluca commented Apr 17, 2022

Any update on this? Would love a dark theme

@ahjolinna
Copy link

yeah it would be nice to see some progress on this issue (my eyes 😭)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Frontend Things related to the OBS RoR app
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants