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

[Minor] Fix padding on home page #19025

Merged
merged 7 commits into from
Oct 20, 2021

Conversation

prabhjyotsingh
Copy link
Contributor

@prabhjyotsingh prabhjyotsingh commented Oct 16, 2021

This is a minor CSS to add padding on the table and paginator. It does not make or break anything but makes this page looks slightly different from others.
I've added before/after below for reviewers.

Let me know if this requires any more changes.

Before:
before

After:
option2

@boring-cyborg boring-cyborg bot added area:UI Related to UI/UX. For Frontend Developers. area:webserver Webserver related Issues labels Oct 16, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 16, 2021

Congratulations on your first Pull Request and welcome to the Apache Airflow community! If you have any issues or are unsure about any anything please check our Contribution Guide (https://github.com/apache/airflow/blob/main/CONTRIBUTING.rst)
Here are some useful points:

  • Pay attention to the quality of your code (flake8, mypy and type annotations). Our pre-commits will help you with that.
  • In case of a new feature add useful documentation (in docstrings or in docs/ directory). Adding a new operator? Check this short guide Consider adding an example DAG that shows how users should use it.
  • Consider using Breeze environment for testing locally, it’s a heavy docker but it ships with a working Airflow and a lot of integrations.
  • Be patient and persistent. It might take some time to get a review or get the final approval from Committers.
  • Please follow ASF Code of Conduct for all communication including (but not limited to) comments on Pull Requests, Mailing list and Slack.
  • Be sure to read the Airflow Coding style.
    Apache Airflow is a community-driven project and together we are making it better 🚀.
    In case of doubts contact the developers at:
    Mailing List: [email protected]
    Slack: https://s.apache.org/airflow-slack

@prabhjyotsingh
Copy link
Contributor Author

CI failed for "Quarantined tests" looks unrelated.

Copy link
Contributor

@ryanahamilton ryanahamilton left a comment

Choose a reason for hiding this comment

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

The table intentionally does not have extra padding given its extra-wide contents. The actual issue here is that the pagination buttons and "Showing 1-2…" label aren't supposed to be within the gray box, they are supposed to be below/outside of it. Their current positions actually appear correct, they just shouldn't have the gray background. Want to take a stab at resolving?

@prabhjyotsingh
Copy link
Contributor Author

@ryanahamilton Sure, which one looks better?

Option-1:
option1

Option-2:
option2

@bbovenzi
Copy link
Contributor

I think option-2 is more consistent. I would just make sure that any dropdowns and tooltips don't get cut off.

@ryanahamilton
Copy link
Contributor

Yeah, I think #1 is how it has been, but I agree with @bbovenzi that #2 is probably the more consistent presentation.

@prabhjyotsingh
Copy link
Contributor Author

Sure hopefully I didn't break anything.

option2

@bbovenzi
Copy link
Contributor

Could you also check all hover/dropdowns on the last row of a table?

 - col span should be 10 instead of 9
@prabhjyotsingh
Copy link
Contributor Author

Nothing new looks broken 🤞. "Lint Helm Chart" failure looks unrelated.

option2-final

@bbovenzi
Copy link
Contributor

The horizontal scroll of the table isn't working. I think all you need to do is add overflow: scroll to .dags-table-wrap

Screen Shot 2021-10-19 at 10 07 40 AM

@prabhjyotsingh
Copy link
Contributor Author

@bbovenzi I see, there are a lot of things happening in there. Sorry, about not being careful. Let me try this on a couple of different browsers with different resolutions.

@prabhjyotsingh
Copy link
Contributor Author

Added some padding, should take care of all the cases.
image

Copy link
Contributor

@bbovenzi bbovenzi left a comment

Choose a reason for hiding this comment

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

Looking good now. Great work!

@prabhjyotsingh
Copy link
Contributor Author

Thank you @bbovenzi for mentoring me on this.

Copy link
Contributor

@ryanahamilton ryanahamilton left a comment

Choose a reason for hiding this comment

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

Just a small nit regarding class naming, but otherwise LGTM.

airflow/www/static/css/dags.css Outdated Show resolved Hide resolved
@@ -141,7 +141,7 @@ <h2>{{ page_title }}</h2>
</thead>
<tbody>
{% if dags|length == 0 %}
<tr><td colspan="9">No results</td></tr>
<tr><td colspan="10">No results</td></tr>
Copy link
Contributor

Choose a reason for hiding this comment

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

Good catch!

Copy link
Contributor

@ryanahamilton ryanahamilton left a comment

Choose a reason for hiding this comment

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

Nice work. Always fun how these seemingly simple changes open a whole can of worms!

@github-actions github-actions bot added the okay to merge It's ok to merge this PR as it does not require more tests label Oct 20, 2021
@github-actions
Copy link

The PR is likely OK to be merged with just subset of tests for default Python and Database versions without running the full matrix of tests, because it does not modify the core of Airflow. If the committers decide that the full tests matrix is needed, they will add the label 'full tests needed'. Then you should rebase to the latest main or amend the last commit of the PR, and push it with --force-with-lease.

@prabhjyotsingh
Copy link
Contributor Author

Yes, agreed :)

@bbovenzi bbovenzi merged commit 91a12a7 into apache:main Oct 20, 2021
@boring-cyborg
Copy link

boring-cyborg bot commented Oct 20, 2021

Awesome work, congrats on your first merged pull request!

sharon2719 pushed a commit to sharon2719/airflow that referenced this pull request Oct 27, 2021
* [Minor] fix padding on home page

* fix lint

* Move filters and pagination out from dags-table-wrap

* - fix last row of a table
 - col span should be 10 instead of 9

* add bottom padding

* Update airflow/www/static/css/dags.css

Co-authored-by: Ryan Hamilton <[email protected]>

Co-authored-by: Ryan Hamilton <[email protected]>
@ephraimbuddy ephraimbuddy added the type:bug-fix Changelog: Bug Fixes label Apr 11, 2022
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 okay to merge It's ok to merge this PR as it does not require more tests type:bug-fix Changelog: Bug Fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants