-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Make grid view widths adjustable #27273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very cool feature !
I'll do a more in depth review tomorrow. (can't test the code right now)
Overall looking good.
I feel like we have quite a few 'magic numbers' that are hard to reason about. Most of them were not introduced in this PR, but maybe extracting them into shared variables with explicit names could help in maintaining them later ?
airflow/www/static/js/dag/Main.tsx
Outdated
useEffect(() => { | ||
if (contentRef.current) { | ||
const topOffset = contentRef.current.offsetTop; | ||
const footerHeight = parseInt(getComputedStyle(document.getElementsByTagName('body')[0]).paddingBottom.replace('px', '').replace('em', ''), 10) || 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels weird to replace indifferently px
and em
. I think footerHeight won't have the correct value if it is specified in 'em'. (We use it as a pixel value later in the code).
❤️ |
I cleaned up the magic numbers. |
Making Airflow UI better one piece at-a-time :) |
Make the border between the grid and details panel draggable so users can adjust the width as they want.
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an 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 a newsfragment file, named
{pr_number}.significant.rst
or{issue_number}.significant.rst
, in newsfragments.