Skip to content

WIP: Replace docstring bubble with right sidebar preview #415

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

rabea-al
Copy link
Contributor

@rabea-al rabea-al commented Jul 2, 2025

Description

  • Replaced the old chat-bubble style that appeared when clicking the ℹ︎ icon on a component with a new preview panel that opens in the right sidebar.
  • Updated the infoIcon to support both light and dark themes automatically.
  • Added "Open Script" button to the Component Preview panel toolbar.
  • Used a new fileCodeIcon for the "Open Script" button.
  • Added "Center Node" button to the Component Preview panel toolbar.
  • Used a fitIcon for the "Center Nodet" button
  • Centered the node and applied visual selection when clicking the "Center Node" button.
  • Improved panel layout and spacing to match JupyterLab's native styling.
  • Cleaned up redundant local states previously used in the component list node.

Pull Request Type

  • Xircuits Core (Jupyterlab Related changes)
  • Xircuits Canvas (Custom RD Related changes)
  • Xircuits Component Library
  • Xircuits Project Template
  • Testing Automation
  • Documentation
  • Others (Please Specify)

Type of Change

  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Tests

  1. Launch Binder (or run locally).

  2. Drag any component into the canvas.

  3. Click the ℹ︎ icon on the node.

    • The right sidebar should expand and show the component name and docstring.
  4. Click the same ℹ︎ again → the sidebar collapses.

  5. Click ℹ︎ on a different component → the sidebar swaps to the new docstring.

Tested on? Specify Version.

  • Windows
  • Linux Fedora
  • Mac
  • Others (State here -> xxx )

Copy link

github-actions bot commented Jul 2, 2025

Binder 👈 Launch a binder notebook on branch rabea-al/xircuits/right-side-br

@rabea-al
Copy link
Contributor Author

What’s new in this PR:

  • Added navigation arrows to move between directly connected nodes (excluding Start and Finish).
  • Automatically centers the selected node when navigating.
  • Added a button to open the script of the selected component node.
  • Added a button to center the current node manually.
  • Added a special button to open the full workflow (.xircuits) if the current node is of type xircuits_workflow.
  • This button is conditionally shown only when the node is of that type.

Copy link
Member

@MFA-X-AI MFA-X-AI left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This is a big feature, so here's a longer review:

  • The sidebar preview has quite a large minimum sized window. I think it should follow the minimum width as the other sidebars.
sidebar.width.mp4
  • The previous and next node logic shouldn't go to Literals and Arguments.
sidebar.previous.and.next.mp4

I think you should allow it to go to Start and Finish and display a simple message like, "This is the start or end of your workflow!"

  • The component preview doesn't switch context when another canvas is active. I think it should just reset once a new workflow is opened.
canvas.active.mp4
  • This does mean it might be complex if there is 2 active workflows for whatever reason. If that's the case, you might need to display on the component preview which component is this workflow coming from. I think that's a good thing to have anyways. Maybe under the Component preview header.

  • I think we can improve the current preview for blank canvas. I'll pass you a placeholder image.

image
  • workflow components doesn't seem to have an i button yet. I guess that's something we haven't added.
image

Since this is a info docstring PR, could you add it in?

  • The handling for the previous and next node for branch component might be a bit more complex. I think the best way is go to the top paths only.
branch.handling.mp4

okay, that's some things to do for now. Thanks a bunch.

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