Bug 1328830 - [RFE] [Horizon] Horizon should support multiple theme configurations
Summary: [RFE] [Horizon] Horizon should support multiple theme configurations
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: python-django-horizon
Version: 9.0 (Mitaka)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ga
: 10.0 (Newton)
Assignee: Radomir Dopieralski
QA Contact: Ido Ovadia
URL:
Whiteboard:
Depends On:
Blocks: 1394655
TreeView+ depends on / blocked
 
Reported: 2016-04-20 11:28 UTC by Itxaka
Modified: 2016-12-14 15:33 UTC (History)
15 users (show)

Fixed In Version: python-django-horizon-10.0.0-0.20160706090804.e3d42c1.el7ost
Doc Type: Enhancement
Doc Text:
This update adds support for multiple theme configurations. This was added to allow a user to change a theme dynamically, using the front end. Some use-cases include the ability to toggle between a light and dark theme, or the ability to turn on a high contrast theme for accessibility reasons. As a result, users can now choose a theme at run time.
Clone Of:
Environment:
Last Closed: 2016-12-14 15:33:09 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2016:2948 normal SHIPPED_LIVE Red Hat OpenStack Platform 10 enhancement update 2016-12-14 19:55:27 UTC

Description Itxaka 2016-04-20 11:28:39 UTC
Cloned from https://blueprints.launchpad.net/horizon/+spec/horizon-dynamic-theme

Currently, the theme can be changed through local_settings.py and is only a single value. This allows for only a single theme to be used while Horizon is running. Many times, a user will want to change a theme dynamically, through the front end. Some use cases of this are the ability to toggle between a light and dark theme, or the ability to turn on a high contrast theme for accessibility reasons. Therefore, it would be beneficial for customization to allow a configuration that supports multiple dynamic themes.

I believe that we may be able to turn the custom theme variable into a tuple, to support multiple configured themes at once. Once in a tuple, we can 'build' multiple theme by wrapping the compress tag with a for loop.

Right now, the theme structure does not currently support building multiple themes, as it has no idea WHAT theme it is building, but only that is it located at /static/custom. Some change around this logic will need to occur to push the actual theme name through the compression loop and into the

This work can be split into two patches:

1. Pull CSS by theme name
2. Angular directive to show available themes and select desired theme

Comment 2 Matthias Runge 2016-05-31 13:35:36 UTC
this is already implemented for rhos-9, see https://bugzilla.redhat.com/show_bug.cgi?id=1340355

Comment 6 RHEL Product and Program Management 2016-08-02 11:38:31 UTC
Quality Engineering Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Comment 7 Matthias Runge 2016-08-02 12:59:30 UTC
This is a significant feature which is often requested by customers.

Comment 20 Jon Schlueter 2016-12-13 03:15:31 UTC
Devel Sanity Check Verified that if a second Theme is specified you can switch between themes from within the UI.

python-django-horizon-10.0.1-4.el7ost.noarch

Enabled the material theme


cat local_settings.d/_11_rcue_theme.py
--------------
# override the CUSTOM_THEME_PATH variable with this settings snippet
AVAILABLE_THEMES=[('material', 'Material', 'themes/material'), ('rcue', 'Red Hat Theme', 'themes/rcue')]
--------------

Restarted httpd service
systemctl restart httpd

logged in and the theme was the Material Theme, and the drop down option for switch theme was available picked the rcue (Red Hat Theme) and it switched dynamically right there.  The rcue theme does not expose the selection for other themes which is alright, as the intent of this RFE is to expose the ability to have multiple themes and be able to switch between them.

Comment 23 errata-xmlrpc 2016-12-14 15:33:09 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2016-2948.html


Note You need to log in before you can comment on or make changes to this bug.