-
Notifications
You must be signed in to change notification settings - Fork 14.3k
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
Remember expanded task groups in localStorage #14661
Remember expanded task groups in localStorage #14661
Conversation
Good idea! I like the pruning as well for when Dags change. |
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.
@yuqian90 this is a nice feature, thank you!
We're in the process of migrating all of our JavaScript to external files (#14115) so we can integrate linting in our pre-commit hooks (#14154). There is some syntax currently that doesn't align with our current config. Would you mind updating those (left comments inline) to save us some time with these other efforts? (please double-check that my suggestions are indeed correct)
9bc2218
to
c428329
Compare
c428329
to
06327ef
Compare
Thanks for the detailed comments. I corrected these syntax issues. That said, I did not do a thorough check of the entire graph.html to look for other syntax issues to avoid distracting the objective of this PR. |
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.
@yuqian90 thank you for making those updates! I tested this out locally and it works great.
* Save expanded and focused state of TaskGroups in localStorage * Restore focus on refresh * Address style issues according to comments (cherry picked from commit 456a7dd)
* Save expanded and focused state of TaskGroups in localStorage * Restore focus on refresh * Address style issues according to comments (cherry picked from commit 456a7dd)
This PR makes the web UI restore previously expanded TaskGroups when the page is refreshed or re-opened. This is to preserve the look of the DAG across sessions. This is done by storing the list of expanded group_ids in
localStorage
.Previous behaviour:
When the page is refreshed, the Graph View resets to the initial view (with all the TaskGroup collapsed by default).
Behaviour after this PR:
When the page is refreshed, the Graph View expands previously expanded TaskGroups, and puts the previously focused TaskGroup back in focus.