Skip to content

Conversation

@turbaszek
Copy link
Member

This work was inspired by responses to this linkedin comment. The aim is to add simple banner hovering at top of the Airflow webui and indicating what environment type it is (test, staging, production etc).

Example:
Screenshot 2021-09-30 at 21 13 05

The banner is by default disabled. Personally I think we should provided users with predefined environment types with correlated colours (to keep the UI visually consistent). However, I'm extremely poor front developer so if someone would like to help with polishing the css and html I would be grateful ❤️

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Sep 30, 2021
-#}
<link rel="stylesheet" type="text/css" href="{{ url_for_asset('flash.css') }}">

<div style="padding-top: 40px">
Copy link
Member Author

Choose a reason for hiding this comment

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

Did that because otherwise the error was slightly hidden by navbar

@mik-laj
Copy link
Member

mik-laj commented Sep 30, 2021

How is this feature different from [webserver] instance_name? I have the impression that the purpose is very similar.

instance_name

New in version 2.1.0.

Sets a custom page title for the DAGs overview page and site title for all pages

http://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#id29

@turbaszek
Copy link
Member Author

How is this feature different from [webserver] instance_name? I have the impression that the purpose is very similar.

instance_name

New in version 2.1.0.
Sets a custom page title for the DAGs overview page and site title for all pages

http://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#id29

I agree that both can be used to achieve the same thing. The difference is visibility. If you will take a look at the thread I linked you will see that changing navbar colour is quite common practice to achieve more visible distinction than just changing a word (instance name). I think we can combine those two options, WDYT?

default: "False"
- name: environment_type
description: |
Environment type of this Airflow instance. One of PROD, STAGING, TEST.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Environment type of this Airflow instance. One of PROD, STAGING, TEST.
Environment type of this Airflow instance. Example would be PROD, STAGING, TEST.

@potiuk
Copy link
Member

potiuk commented Oct 3, 2021

I agree with @turbaszek that it is a good idea. Actually the fact that you need to explain to the users something with "Did you actually know that you can do this and this to achieve that"? means that there is something wrong with the feature - it's either not obvious, not discoverable, or maybe it has many overlapping uses, which make it difficult to understand and even realise that you can already do something (albeit in a convoluted way).

There are various reasons why you would like to change instance name, or change navbar colour - for example due to matching your colors with the company "color theme" or naming your instances via department. However explicitly naming the option "as environment" which would be "orthognal" to that and much more visible is a good idea:

  • it serves the explicit use case and only that one (without blocking the other use cases i mentioned above).

  • I think this use case is rather popular and very much "technical" one - in terms that it is good to have something "extra" shown in "dev/staging" environments, to clearly distinguish them and let the user know that this environment is not the one which is "production". Using other elements (already existing ones but modifying them) is not as "visually distinctive" and prevents from making efficient matrixes of cases (say introducing STAGING/DEV/PROD environment for all 10 DEPARTMENTS which have different names while matching the navbar with the company colours).

  • the use case is often requesteded and popular and we have a chance the user to find answer on "how I should configure staging environment" in the docs and configuration of Airflow rather than in Stack Overflow / LinkedIn posts.

I would be very much for explicit "environment" flag like @turbaszek is proposing.

@bbovenzi
Copy link
Contributor

bbovenzi commented Oct 4, 2021

UX-wise I think it would be better to integrate the env into the existing navbar-header instead of tacking on another banner.

Also, I'm happy to help with CSS :)

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 5 days if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Stale PRs per the .github/workflows/stale.yml policy file label Nov 19, 2021
@github-actions github-actions bot closed this Nov 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues stale Stale PRs per the .github/workflows/stale.yml policy file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants