Skip to content

Conversation

@rabea-al
Copy link
Contributor

@rabea-al rabea-al commented Oct 8, 2025

Description

This PR enhances the notification system in Xircuits by adding a "View details" button to all JupyterLab notifications that exceed 140 characters. Clicking the button opens a dialog displaying the full message with an option to copy it to the clipboard.

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

  • Verified that notifications shorter than 140 characters appear normally without the “View details” button.
  • Verified that notifications longer than 140 characters now show a “View details” button.
  • Clicking the “View details” button opens a dialog displaying the full message text.
  • Verified that the Copy button inside the dialog copies the entire message to the clipboard.
  • Confirmed that notifications from multiple sources (Notification.info, Notification.error, etc.) are all augmented globally.

Tested on? Specify Version.

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

@github-actions
Copy link

github-actions bot commented Oct 8, 2025

Binder 👈 Launch a binder notebook on branch rabea-al/xircuits/notification-view-details

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, it works very well!

Slightly related, I think I missed this in the previous PR, I noticed for components with libraries that exist in our manifest, the message is formatted like this:

image

You need to install the "xai_components/xai_sqlite" library to use "SqliteFetchAll" component.

Could you update it so it shows xai_sqlite or sqlite? Thanks!

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.

One additional thing I'd like you to do - currently once the longer preview is active, pressing the copy button dismisses the popup. Ideally it should keep it and either change the icon to "Copied!" or fire a notification.

@rabea-al rabea-al marked this pull request as ready for review October 13, 2025 10:37
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 update. Unfortunately I don't see copy error button here.

image

If I check F12, it says:

Error reloading component from path: xai_components/xai_utils/utils.py. Error: Cannot read properties of undefined (reading 'class')

Aside from that, the implementation does look much more complicated than I thought for a small gain. I did check the previous issue, and someone did raise it before but it hasn't been reponded. Since it's not natively supported in Jupyterlab, let's go with a simple notification for the copied instead.

@rabea-al
Copy link
Contributor Author

The copy button is actually located at the top-right corner of the dialog.
But as you mentioned, I’ll revert the last commit and switch back to the simpler approach

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