InDesign 21.6: docked UXP panels aren't restored at launch, and a workspace reset restores only the first panel of a multi-panel plugin

,

Environment: InDesign 21.6.0.57, UXP 9.3.0, Windows 11 (build 26200), en_US. Plugins installed from a .ccx (packaged with UXP Developer Tool). The first issue also happens with InDesign’s own Tool Hints and Version History panels.

Issue 1: docked UXP panels lose their dock at every launch

  1. Install any UXP plugin with one panel (the sample below works with one panel removed).
  2. Open the panel from the Plug-Ins menu and dock it in the right dock.
  3. Window > Workspace > New Workspace…, save as “DockTest”.
  4. File > Exit, then start InDesign again.

Expected: the panel is docked where it was, as CEP panels are.

Actual: the panel isn’t shown. Opening it again from the Plug-Ins menu opens it floating.

At quit, InDesign writes DockTest_CurrentWorkspace.xml with the panel still docked (<dock anchor="right">), so the layout is saved. The launch just doesn’t apply it. The same happens with InDesign’s own Tool Hints (com.adobe.indesign.toolhint) and Version History (com.adobe.ccx.timeline) panels: dock them, save the workspace, restart, and both are gone from the dock.

Running Window > Workspace > Reset DockTest after the launch brings a single-panel plugin’s panel back into the dock, so resetting the workspace after startup is a possible workaround. Issue 2 is why it doesn’t work for plugins with more than one panel.

Issue 2: a workspace reset restores only the first panel of a multi-panel plugin

No restart is needed for this one.

  1. Install the two-panel sample plugin below.
  2. Open both panels and dock them in the right dock, each in its own group (tabbing them in one group gives the same result).
  3. Window > Workspace > New Workspace…, save as “DockTest”.
  4. Window > Workspace > Reset DockTest.

Expected: both panels are still docked.

Actual: Panel A stays docked, and Panel B isn’t shown anywhere. The reset closed it: it’s neither docked nor floating.

It’s worse when Panel B is closed at the time the workspace is saved (A docked, B not open at all). Then the reset closes Panel A too, so neither panel is shown. In the workspace saved after that reset, A has the palette ID that B’s closed palette had in the saved workspace: A was given B’s saved entry.

The saved workspace holds one leaf per UXP panel, and only the plugin ID says which plugin it belongs to. Nothing identifies the panel entrypoint:

<OWLPaletteLeaf name="Dock Test Panel B" id="137291" UXPExtensionID="docktest.two-panels" minimized="false" detailLevel="0" closed="false">

Every reset we ran fits this explanation: each leaf of a plugin is applied, in file order, to the plugin’s first panel, the last one wins, and the plugin’s other panels get nothing. Several later saves and resets confirmed it: the first panel always ended up where the last of the plugin’s entries put it.

Things we tried, none of which changed the result:

  • making each panel’s id equal to its label, so the saved name matches the entrypoint ID;
  • setting a per-panel title (UXP applies it, and the reset still loses the second panel);
  • a per-panel initialLocation and panelId in the manifest (pluginManager still reports the plugin ID and the entrypoint ID, so both keys are ignored);
  • mounting the panels with <uxp-panel panelid> instead of entrypoints.setup;
  • real icon files, and small panel sizes (for issue 1).

Sample plugin

manifest.json:

{
	"id": "docktest.two-panels",
	"name": "Dock Test Two Panels",
	"version": "1.0.0",
	"main": "index.html",
	"host": { "app": "ID", "minVersion": "18.5.0" },
	"manifestVersion": 5,
	"entrypoints": [
		{
			"type": "panel",
			"id": "panelA",
			"label": { "default": "Dock Test Panel A" },
			"minimumSize": { "width": 500, "height": 200 },
			"maximumSize": { "width": 2000, "height": 2000 },
			"preferredDockedSize": { "width": 500, "height": 300 },
			"preferredFloatingSize": { "width": 500, "height": 300 }
		},
		{
			"type": "panel",
			"id": "panelB",
			"label": { "default": "Dock Test Panel B" },
			"minimumSize": { "width": 600, "height": 400 },
			"maximumSize": { "width": 600, "height": 600 },
			"preferredDockedSize": { "width": 600, "height": 500 },
			"preferredFloatingSize": { "width": 600, "height": 500 }
		}
	]
}

index.html:

<!doctype html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
	</head>
	<body>
		<script src="index.js"></script>
	</body>
</html>

index.js:

const { entrypoints } = require('uxp')

function appendLabel(rootNode, label) {
	const paragraph = document.createElement('p')
	paragraph.textContent = label
	rootNode.appendChild(paragraph)
}

entrypoints.setup({
	panels: {
		panelA: {
			create(rootNode) {
				appendLabel(rootNode, 'Dock Test Panel A')
			},
		},
		panelB: {
			create(rootNode) {
				appendLabel(rootNode, 'Dock Test Panel B')
			},
		},
	},
})

Questions

  1. Can InDesign restore docked UXP panels at launch, as it does for CEP panels?
  2. Can the workspace store the panel entrypoint ID for UXP panels and match on it, so that every panel of a multi-panel plugin is restored?
  3. Until then, is there a supported way to keep more than one panel of a UXP plugin docked across restarts?

Related threads: Possible to have a UXP panel load on InDesign startup?, How to attach plugin panel permanently to the sidebar?, Multiple panels without web components.