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

feat: Enabled toggling the visibility of Table Nodes from the Left Pane #253

Merged
merged 6 commits into from
Dec 16, 2024

Conversation

MH4GF
Copy link
Member

@MH4GF MH4GF commented Dec 13, 2024

2024-12-13.19.51.15.mov

Currently, a fitView is executed when a Table node is returned from hidden to visible. This will be fixed in another PR.

Copy link

changeset-bot bot commented Dec 13, 2024

⚠️ No Changeset found

Latest commit: 8ed7b59

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.

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

@MH4GF MH4GF temporarily deployed to preview - erd-sample December 13, 2024 10:44 — with GitHub Actions Inactive
</div>
<TableDetailDrawerRoot>
<ReactFlowProvider>
<ReactFlowProvider>
Copy link
Member Author

Choose a reason for hiding this comment

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

The ReactFlowProvider has been moved out of the LeftPane to retrieve ReactFlow information from the LeftPane.

Comment on lines +18 to +19
const nodes = useNodes()
const tableNodes = useMemo(() => nodes.filter(isTableNode), [nodes])
Copy link
Member Author

@MH4GF MH4GF Dec 13, 2024

Choose a reason for hiding this comment

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

The hidden data is contained in the node type, but it can only be retrieved from useNodes.

ref: https://reactflow.dev/api-reference/types/node#hidden

Therefore, the data displayed in the LeftPane has been changed via useNodes().

)}
{...props}
/>
)
Copy link
Member Author

Choose a reason for hiding this comment

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

The styling of the SidebarMenuAction component in shadcn has now been implemented.
It is useful to have showOnHover props available 👍🏻

https://ui.shadcn.com/docs/components/sidebar#sidebarmenuaction

@MH4GF MH4GF temporarily deployed to preview - erd-sample December 13, 2024 10:54 — with GitHub Actions Inactive
@MH4GF MH4GF changed the title hiddenable table node feat: Enabled toggling the visibility of Table Nodes from the Left Pane Dec 13, 2024
@MH4GF MH4GF marked this pull request as ready for review December 13, 2024 10:56
@MH4GF MH4GF requested a review from a team as a code owner December 13, 2024 10:56
@MH4GF MH4GF requested review from hoshinotsuyoshi, FunamaYukina, junkisai and sasamuku and removed request for a team December 13, 2024 10:56
@MH4GF MH4GF force-pushed the hiddenable-table-node branch from 92f4f56 to 8ed7b59 Compare December 13, 2024 11:58
@MH4GF MH4GF temporarily deployed to preview - erd-sample December 13, 2024 11:58 — with GitHub Actions Inactive
Copy link
Member

@junkisai junkisai left a comment

Choose a reason for hiding this comment

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

Both the implementation and behavior seemed good! 🎉

@junkisai junkisai added this pull request to the merge queue Dec 16, 2024
Merged via the queue into main with commit 728b232 Dec 16, 2024
12 checks passed
@junkisai junkisai deleted the hiddenable-table-node branch December 16, 2024 02:59
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