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

[AIRFLOW-2874] Enables FAB's theme support #3719

Merged
merged 1 commit into from Aug 8, 2018

Conversation

Projects
None yet
5 participants
@verdan
Copy link
Contributor

verdan commented Aug 8, 2018

Make sure you have checked all steps below.

Jira

  • My PR addresses the following Airflow 2874 issues and references them in the PR title.

Description

  • Here are some details about my PR, including screenshots of any UI changes:
    In an effort to make Apache Airflow a white label application, we should enable the FAB's theme support. Users can then easily change the theme according to their needs. There already exists a configuration to set the Navbar Color, that can be used in conjunction with the theme option, or can simply be unset to fully utilize the theme. List of available themes are available here: https://github.com/dpgaspar/Flask-AppBuilder-Skeleton/blob/master/config.py#L88
    Note: Some of the dark themes might not work properly because of the charts that we are using at the moment.
    Here are some of the screenshots from different themes:

screen shot 2018-08-08 at 11 41 17 am

screen shot 2018-08-08 at 11 42 05 am

screen shot 2018-08-08 at 11 42 48 am

screen shot 2018-08-08 at 11 43 20 am

Tests

  • My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • In case of new functionality, my PR adds documentation that describes how to use it.
    • When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

  • Passes git diff upstream/master -u -- "*.py" | flake8 --diff
@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #3719 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3719   +/-   ##
=======================================
  Coverage   77.63%   77.63%           
=======================================
  Files         204      204           
  Lines       15800    15800           
=======================================
  Hits        12267    12267           
  Misses       3533     3533
Impacted Files Coverage Δ
...rflow/config_templates/default_webserver_config.py 0% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update acca61c...df2831f. Read the comment docs.

@bolkedebruin bolkedebruin merged commit cbe7955 into apache:master Aug 8, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

lxneng added a commit to lxneng/incubator-airflow that referenced this pull request Aug 10, 2018

dlebech added a commit to trustpilot/incubator-airflow that referenced this pull request Sep 11, 2018

dlebech added a commit to trustpilot/incubator-airflow that referenced this pull request Sep 11, 2018

dalupus added a commit to modmed/incubator-airflow that referenced this pull request Sep 19, 2018

aliceabe pushed a commit to aliceabe/incubator-airflow that referenced this pull request Jan 3, 2019

@feluelle

This comment has been minimized.

Copy link
Contributor

feluelle commented Jan 23, 2019

Hey @verdan,

Thank you for adding theme support.
What is 2nd theme (green one)? I could not find it in the available themes.

@verdan

This comment has been minimized.

Copy link
Contributor Author

verdan commented Jan 23, 2019

@feluelle the list of all available theme is attached in the description of this PR. I used random to make the screenshots.

@verdan verdan deleted the verdan:fab-theme-support branch Jan 23, 2019

@feluelle

This comment has been minimized.

Copy link
Contributor

feluelle commented Jan 23, 2019

I tried almost all of them. There are even more. But I couldn't find one that work properly.

@feluelle

This comment has been minimized.

Copy link
Contributor

feluelle commented Jan 23, 2019

webserver_config.py:
APP_THEME = "bootstrap-theme.css" # default bootstrap
airflow.cfg:
#navbar_color = #007A87

screen shot 2019-01-23 at 11 53 36

Release 1.10.2

@feluelle

This comment has been minimized.

Copy link
Contributor

feluelle commented Jan 23, 2019

I found one that looks nice when changing the navbar_color to the theme's main color.

webserver_config.py:
APP_THEME = "flatly.css"
airflow.cfg:
navbar_color = #18bc9c (flatly main color)

screen shot 2019-01-23 at 13 30 39

cfei18 pushed a commit to cfei18/incubator-airflow that referenced this pull request Jan 23, 2019

@darrenhaken

This comment has been minimized.

Copy link

darrenhaken commented Feb 20, 2019

How do you set this in airflow.cfg or is there another way to enable it? @verdan?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment