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(editor): Popping logs out into a new window #13788

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

Conversation

autologie
Copy link
Contributor

@autologie autologie commented Mar 10, 2025

Summary

This PR implements the feature to pop out the chat and logs pane at the bottom of canvas.
The feature is built on top of Google Chrome's experimental documentPictureInPicture API. For other browsers and insecure context which disallows the usage of this API, the button to pop out the pane is hidden.

Screencast.from.2025-03-12.09-29-16.webm

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/SUG-20/popping-logs-out-into-a-new-window

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@n8n-assistant n8n-assistant bot added the n8n team Authored by the n8n team label Mar 10, 2025
Copy link

codecov bot commented Mar 11, 2025

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes in this file makes it possible to listen to the right window object when the resizer is used in a PiP window

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changes in this file are needed to show tooltips properly in a PiP window.
I'm using provide/inject instead of props so that I don't have to modify individual usages of the tooltip component.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Agreed with product to remove the confirmation dialog of clearing the chat history. In the future we'll need to make the dialog work in PiP window as well. Right now it always shows in the main window even when the user is interacting in PiP window.

isSupported,
// When the `copy()` method is invoked from inside of the document picture-in-picture (PiP) window, it throws the error "Document is not focused".
// Therefore, we disable copying features in the PiP window for now.
isSupported: computed(() => isSupported && !isInPiPWindow.value),
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn't find any usages of isSupported in the codebase, so it should be safe to change boolean to ComputedRef<boolean> here.

@autologie autologie marked this pull request as ready for review March 12, 2025 10:59
@autologie autologie requested a review from alexgrozav March 12, 2025 13:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant