Problem
Custom plugins can't tell which URL the page was opened with. Port loads the plugin iframe from portwidgets.io with only its own signed parameters (Policy, Key-Pair-Id, Signature). The page's query string isn't passed on. The browser also hides the parent page's URL from a cross-origin iframe, and PLUGIN_DATA includes page.identifier but no URL or query parameters.
As a result, a plugin can't support links that open it in a specific state. For example, if https://app.port.io/<dashboard>?techdoc=<doc-id> should open the TechDocs widget at that doc, the widget never receives techdoc.
Use case
We built a TechDocs plugin that shows documentation in a sidebar tree inside a dashboard. Customers need to share a link to a specific doc. One customer called the lack of this a deal breaker. Our workaround links to the doc's entity page, which takes users out of the docs experience: no navigation tree, no search, no other docs.
The same gap affects any plugin with views, tabs, filters or selected items that users want to bookmark or share.
Proposed solution (either would work)
Forward the page's query parameters into the plugin iframe URL, or only those with a prefix such as plugin_ to avoid collisions.
Add the page URL or its query parameters to PLUGIN_DATA, e.g. page.url or page.query.
Nice to have
An SDK message that lets a plugin update the page's query parameters, such as SET_PAGE_QUERY. A plugin could then keep the URL in step with its state, and users could copy the link straight from the address bar.
Impact
Plugins could support shareable links, bookmarks and browser back/forward, as Port's own pages already do.