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

CSS changes to make current theme responsive #12227

Merged
merged 1 commit into from
Nov 10, 2020

Conversation

VBhojawala
Copy link
Contributor

CSS Changes to adjust content width as per screen size and responsive table with multi line .
closes: #11967


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.

@potiuk potiuk merged commit 75065ac into apache:master Nov 10, 2020
@boring-cyborg
Copy link

boring-cyborg bot commented Nov 10, 2020

Awesome work, congrats on your first merged pull request!

@potiuk
Copy link
Member

potiuk commented Nov 10, 2020

Thanks. I've always found it annoying!

@VBhojawala VBhojawala deleted the responsive_docs branch November 10, 2020 09:39
@VBhojawala VBhojawala restored the responsive_docs branch November 10, 2020 09:40
@@ -84,3 +84,15 @@
color: #404040;
background-color: #d6d6d6;
}

/* override the maximum width restriction for large screen */
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look like code related to the exampleinclude directive.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Kindly suggest file name where this code can be placed.

Copy link
Member

Choose a reason for hiding this comment

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

I don't think that is a good solution. The lack of text width on all pages makes some pages very difficult to read on some screens. I would prefer to turn these tables into lists to make the whole content narrower. I currently have these tasks in my queue, but I want to do it cleverly and automatically, and then use this information to update the website - https://github.com/apache/airflow-site/blob/master/landing-pages/site/static/integrations.json

According to several sources designers should strive for 45 to 85 characters per line since the ideal width for a paragraph is supposedly 65 characters.

https://medium.com/@matuzo/writing-css-with-accessibility-in-mind-8514a0007939

@VBhojawala VBhojawala deleted the responsive_docs branch November 10, 2020 10:54
@VBhojawala
Copy link
Contributor Author

VBhojawala commented Nov 10, 2020

Hello @potiuk

I would like to suggest some changes to current document theme's CSS structure which can improve readability of docs:
Following is current view
Current

  1. In addition to above changes, For screen larger than 720p fix max width to 1400px so that paragraphs reading travel distance can be minimize.
    Following is the screen shoot of fix 1400px width for larger screen
    1400Px
  2. Based on screen size set responsive font size for each html element. Which will allow user on larger screen to view and read document very easily by increasing font size for larger screen.
    Following is with larger font size of paragraph and code for large screen
    fontscaling2

Following is demo CSS for proposal, optimal font size for larger screens can be discussed and set.

/* override table width restrictions */
@media screen and (min-width: 720px) {
   .wy-table-responsive table td {
      white-space: normal !important;
   }
  .wy-nav-content {
   max-width: 1400px;
  }
  p{
    font-size:18px  
  }  
  .rst-content .linenodiv pre, .rst-content div[class^="highlight"] pre, .rst-content pre.literal-block{
    font-size:16px;   
  } 
}

@mik-laj
Copy link
Member

mik-laj commented Nov 10, 2020

What do you think about having all these integrations as a list?

Google Cloud

Bigquery

Hooks: airlfow.providers....
Operators: airlfow.providers....
Guide: How-to guide
References: Product documentation

Dataflow

Hooks: airlfow.providers....
Operators: airlfow.providers....
Guide: How-to guide
References: Product documentation

I would like to know why we are changing global styles and why before we do. If it is just a matter of improving the readability of one subpage, then we can think about doing much better. Especially when this page probably needs to be removed soon. See: #11423 (comment)
Github also has similar content width restrictions, but there it won't be possible to add extra styles to enlarge the text width.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Integration documentation gets cut off
3 participants