Show different tabs side by side in split view

Each tab menu has "Open to the right". It shows the tab in a new pane to
the right of the active pane. A pane shows a document or a plugin tab,
for example a browser tab.

- A plugin view stays in the plugin layer above the panes, so a move
  between panes does not mount it again.
- A browser tab that covers the area moves to the left pane when a tab
  opens beside it. The last pane gives its plugin tab the whole area.
- The "Split" toggle of a document is now "Read beside".

Card 565874b2.
This commit is contained in:
Knotty Wyvern
2026-11-10 06:40:44 -07:00
parent d19bb6a1f0
commit 61976191d0
22 changed files with 473 additions and 116 deletions
+3 -3
View File
@@ -72,7 +72,7 @@ await runSmoke("layout/workbench", async ({ page }) => {
await page.keyboard.press("Control+s");
await page.waitForFunction(expected => window.__TEST__.files.get("notes/welcome.md") === expected, original + "Added in source.");
await chooseView(page, "Split");
await chooseView(page, "Read beside");
await page.locator(".md-page h1").first().waitFor();
assert.ok(await page.locator(".source-editor").isVisible());
await page.evaluate(() => {
@@ -153,7 +153,7 @@ await runSmoke("layout/workbench", async ({ page }) => {
await page.locator(".md-page").evaluate(element => { element.scrollTop = 0; });
await page.screenshot({ path: path.join(output, "reader-narrow.png") });
assert.ok(await page.locator(".md-page").evaluate(element => element.scrollWidth <= element.clientWidth + 1));
await chooseView(page, "Split");
await chooseView(page, "Read beside");
await page.waitForFunction(() => {
const host = document.querySelector(".source-editor");
const rendered = host?.querySelector(".cm-editor");
@@ -168,7 +168,7 @@ await runSmoke("layout/workbench", async ({ page }) => {
await page.screenshot({ path: path.join(output, "reader-split-wide.png") });
// A second press ends the Split view.
await chooseView(page, "Split");
await chooseView(page, "Read beside");
await page.locator(".md-page").waitFor({ state: "detached" });
// The editor stores one line break character. The saved file keeps its own line breaks.
assert.equal(await contents(), showcase.replace(/\r\n/g, "\n"));