This repository was archived by the owner on Jan 7, 2026. It is now read-only.
feat(plugins-runtime): allow openPage() to toggle opening a new window#219
Merged
Alotor merged 1 commit intopenpot:mainfrom Nov 20, 2025
Merged
Conversation
This was referenced Nov 14, 2025
Member
|
Thanks! Looks good to me. I'll wait to merge until MR in core is done. |
Contributor
Author
Regarding that PR, Andrey suggested that we use an options object, instead of positional parameters. This will require the introduction of a |
Contributor
|
penpot/penpot#7753 merged. I mention it here for reference of a discussion on that PR about how to extend it on future. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds the extension to the
:openPagecommand inpage-proxyand context with an additional parameter submitted here. The parameter allows toggling the current default behaviour of always opening newPagesin separate browser tabs/windows.I believe this is necessary because it's AFAICT otherwise impossible for plugins to navigate to shapes outside the current page. As it is right now, the plugin is unloaded in the new browser tab, making any action subsequent to
openPageimpossible.Open questions:
undefinedin the second argument to have the previous behaviour. Maybe there's another preferred way of handling defaults.page-proxyhas an:openPageslot as well, but this is not exposed in the API. Should we add that? And if we do, wouldn't it make more sense to call it:open, since it's already insidePage?