Remove dup custom style imports

Bug #1480427 reported by Shaoquan Chen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Medium
Diana Whitten

Bug Description

Previously @import "/custom/styles"; has a comment of "// Custom Style Variables " which make it looks like a scss file with only variables, in that case it should be import to each scss file that will be injected to _stylesheet.html directly. Confirm with devs, "/custom/styles" should only include custom styles, than it should be imported only once.

Also, we need to make sure, /custom/styles should come at the very bottom of the combined css file.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to horizon (master)

Fix proposed to branch: master
Review: https://review.openstack.org/208017

Changed in horizon:
assignee: nobody → Shaoquan Chen (sean-chen2)
status: New → In Progress
Changed in horizon:
assignee: Shaoquan Chen (sean-chen2) → Rajat Vig (rajatv)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/277220

Changed in horizon:
assignee: Rajat Vig (rajatv) → Diana Whitten (hurgleburgler)
Changed in horizon:
milestone: none → mitaka-3
importance: Undecided → Medium
Changed in horizon:
assignee: Diana Whitten (hurgleburgler) → Timur Sufiev (tsufiev-x)
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Diana Whitten (hurgleburgler)
Changed in horizon:
assignee: Diana Whitten (hurgleburgler) → Timur Sufiev (tsufiev-x)
Timur Sufiev (tsufiev-x)
Changed in horizon:
assignee: Timur Sufiev (tsufiev-x) → Diana Whitten (hurgleburgler)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by Rajat Vig (<email address hidden>) on branch: master
Review: https://review.openstack.org/218941
Reason: This patch as is won't merge. Possibly https://review.openstack.org/#/c/277220/ is better.

Changed in horizon:
assignee: Diana Whitten (hurgleburgler) → Richard Jones (r1chardj0n3s)
Changed in horizon:
assignee: Richard Jones (r1chardj0n3s) → Diana Whitten (hurgleburgler)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.openstack.org/277220
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=c9de52d6bb31ccd41afd9183c9345606d28f415f
Submitter: Jenkins
Branch: master

commit c9de52d6bb31ccd41afd9183c9345606d28f415f
Author: Diana Whitten <email address hidden>
Date: Sat Jan 30 09:42:15 2016 -0700

    Dynamic Themes

    Horizon themes are now configurable at a user level, through the use
    of cookies. The themes that can be set are configurable at a
    deployment level through settings.py. Horizon can be configured to
    run with multiple themes, and allow users to choose which themes
    they wish to run.

    Django Compressor:
    In order to support dynamic themes, each theme configuration must
    be pre-compiled through the Django compressor. By making use of its
    built in COMPRESS_OFFLINE_CONTEXT, we now return a generator to
    create each of the theme's necessary offline contexts.

    Templates:
    Horizon themes allowed template overrides via their 'templates'
    subfolder. In order to maintain this parity, a custom theme template
    loader was created. It is run before the other loads, and simply
    looks for a Django template in the current theme (cookie driven)
    before diverting to the previous template loaders.

    Static Files:
    Horizon themes allowed static overrides of the images in
    'dashboard/img' folder. A template tag, 'themable_asset' was created
    to maintain this parity. Any asset that is wished to be made themable,
    given that it is located in Horizon's 'static/dashboard' folder, can
    now be made ot be themable. By making this a template tag, this
    gives the developers more granular control over what branders can
    customize.

    Angular and Plugins:
    By far, the trickiest part of this task, Angular and Plugins are
    dynamic in the files that they 'discover'. SCSS is not flexible in
    this manner at ALL. SCSS disallows the importation of a variable
    name. To get around this, themes.scss was created as a Django
    template. This template is the top level import file for all styles
    within Horizon, and therefore, allows ALL the scss files to share a
    common namespace and thus, can use shared variables as well as extend
    shared styles.

    Other:
    This change is fundamental, in that it changes the method by which
    Horizon ingests its SCSS files. Many problems existing in the
    previous implementation, in an effort to make Horizon flexible, its
    SCSS was made very inflexible. This patch corrects those problems.

    Change-Id: Ic48b4b5c1d1a41f1e01a8d52784c9d38d192c8f1
    Implements: blueprint horizon-dynamic-theme
    Closes-Bug: #1480427

Changed in horizon:
status: In Progress → Fix Released
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/horizon 9.0.0.0b3

This issue was fixed in the openstack/horizon 9.0.0.0b3 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on horizon (master)

Change abandoned by David Lyle (<email address hidden>) on branch: master
Review: https://review.openstack.org/208017
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.