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

Graph Navigator #603

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open

Graph Navigator #603

wants to merge 20 commits into from

Conversation

floscr
Copy link

@floscr floscr commented Dec 18, 2024

Adds a panel with which the user can easily navigate between subgraphs.
Open it under Layout -> Navigator

2024-12-20-18-51_02.mp4

Copy link

changeset-bot bot commented Dec 18, 2024

⚠️ No Changeset found

Latest commit: 327c0f1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

Failed to generate code suggestions for PR

@floscr floscr force-pushed the florian/graph-navigator branch from 179580a to 8ce784d Compare January 3, 2025 13:56
Comment on lines +92 to +93
const innerGraph = node['_innerGraph'];
if (!innerGraph) return null;
Copy link
Author

@floscr floscr Jan 3, 2025

Choose a reason for hiding this comment

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

I don't know how we can get this type out of packages/graph-engine/src/nodes/generic/subgraph.ts so we can do a proper typescript type check.

I would have liked to do a check like

if (node instanceof SubgraphNode) {
  const innerGraph = node._innerGraph;
  if (!innerGraph) return null;
}

but I'm not sure how importing for types/classes works for such packages

Comment on lines +24 to +32
if (typeof window !== 'undefined') {
window['newGraphEditor'] = function (ref, id) {
return (
<ErrorBoundary fallback={<ErrorBoundaryContent />}>
<GraphEditor ref={ref} id={id} />
</ErrorBoundary>
);
};
}
Copy link
Author

Choose a reason for hiding this comment

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

NextJS was erroring because there's a circular dependency.
I think this is not too bad if we have some interface for global methods.

@floscr floscr marked this pull request as ready for review January 3, 2025 15:05
}

.listItemCount {
opacity: 0.5;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why the opacity here, to make it subtle?

Copy link
Author

Choose a reason for hiding this comment

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

Yes
image

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok, this should be solved with using var(--fg-subtle)

Copy link
Author

@floscr floscr Jan 8, 2025

Choose a reason for hiding this comment

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

Changed, but looks almost indistinguishable imo (also I think --component-spacing-xs is too large)
image

@floscr floscr requested a review from mck January 8, 2025 09:24
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