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

[ui] Allow both horizontal and vertical renderings of the asset graph #19954

Merged
merged 6 commits into from
Feb 22, 2024

Conversation

bengotow
Copy link
Collaborator

Summary & Motivation

Back by popular demand! The vertical asset graph returns as an option accessible from a context menu on the asset graph, a small button in the bottom right, and a shortcut (Alt-O)

image image image

This PR also makes some incremental + related improvements:

  • A few icons have been resized to our standard 16x16 so the toolbar on the asset graph looks consistent.

  • The icons shown in Menu are now textDefault instead of accentGray (Verified this change with Josh)

  • I accidentally started putting the new context menu option in AssetNodeContextMenu before I realized I wanted it on the background context menu instead. In the process, I made a few code improvements there (shared type for the props, etc) that I left in the PR.

  • The edges on the graph now go OVER the group background but UNDER the group title bars, which helps a lot in vertical mode.

  • The borders around asset groups are a color that uses opacity, so that the "stack lines" beneath them darken when they collide with edges.

  • The op graph has switched back to the correct line styling. It was using horizontal joiners incorrectly.

Before:
image

After:
image

How I Tested These Changes

I referenced the storybooks for the asset node tweaks, but the rest of this I tested manually with a couple large graphs.

Copy link

github-actions bot commented Feb 21, 2024

Deploy preview for dagit-storybook ready!

✅ Preview
https://dagit-storybook-l5rl1lnco-elementl.vercel.app
https://bengotow-2024-02-FE-182-dag-directions.components-storybook.dagster-docs.io

Built with commit e3091fd.
This pull request is being automatically deployed with vercel-action

Copy link

github-actions bot commented Feb 21, 2024

Deploy preview for dagit-core-storybook ready!

✅ Preview
https://dagit-core-storybook-f0dylqaks-elementl.vercel.app
https://bengotow-2024-02-FE-182-dag-directions.core-storybook.dagster-docs.io

Built with commit e3091fd.
This pull request is being automatically deployed with vercel-action

Copy link
Contributor

@salazarm salazarm left a comment

Choose a reason for hiding this comment

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

Sweet!

@salazarm
Copy link
Contributor

I kind of want to right align the shortcuts in the context menu:
image

@salazarm
Copy link
Contributor

Also I realize collapse/expand have the same shortcut 🤔 I wonder which one takes precedence if both are possible. Maybe we need different shortcuts or some way of indicating which would take precedence?

@bengotow
Copy link
Collaborator Author

Looks like in the mixed state you mentioned the shortcut performs "collapse all". I updated the code for the menu so the rendering reflects that:

image

@bengotow bengotow merged commit 399bb61 into master Feb 22, 2024
3 checks passed
@bengotow bengotow deleted the bengotow-2024-02/FE-182-dag-directions branch February 22, 2024 02:28
PedramNavid pushed a commit that referenced this pull request Mar 28, 2024
…#19954)

## Summary & Motivation

Back by popular demand! The vertical asset graph returns as an option
accessible from a context menu on the asset graph, a small button in the
bottom right, and a shortcut (Alt-O)

<img width="636" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/86634bd1-881b-4548-b8e3-d6014b90e3ff">

<img width="640" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/d70bdb9f-777d-484a-a67d-1480320edd61">

<img width="671" alt="image"
src="https://github.com/dagster-io/dagster/assets/1037212/291a87f3-eef2-4f7d-bbaf-55d24e63d1b6">

This PR also makes some incremental + related improvements:

- A few icons have been resized to our standard 16x16 so the toolbar on
the asset graph looks consistent.

- The icons shown in Menu are now textDefault instead of accentGray
(Verified this change with Josh)

- I accidentally started putting the new context menu option in
`AssetNodeContextMenu` before I realized I wanted it on the background
context menu instead. In the process, I made a few code improvements
there (shared type for the props, etc) that I left in the PR.

- The edges on the graph now go OVER the group background but UNDER the
group title bars, which helps a lot in vertical mode.

- The borders around asset groups are a color that uses opacity, so that
the "stack lines" beneath them darken when they collide with edges.

- The op graph has switched back to the correct line styling. It was
using horizontal joiners incorrectly.

Before:

![image](https://github.com/dagster-io/dagster/assets/1037212/877a82d6-33af-458d-a0f0-ffac058f1607)

After: 

![image](https://github.com/dagster-io/dagster/assets/1037212/fcba3dcd-e965-4743-a7fd-940b6903c3e9)

## How I Tested These Changes

I referenced the storybooks for the asset node tweaks, but the rest of
this I tested manually with a couple large graphs.

---------

Co-authored-by: bengotow <[email protected]>
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.

2 participants