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:
@@ -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"));
|
||||
|
||||
Reference in New Issue
Block a user