Manage the global layout (aka regions) within Canvas Workbench
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3576837. --> Reported by: [effulgentsia](https://www.drupal.org/user/78040) Related to !1092 >>> <h3 id="overview">Overview</h3> <p>As of <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3573867" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3573867</a></span>, Canvas Workbench gives you a Storybook-like UI for working with Code Components and Pages. For now, you need to mock the pages (create hard-coded .json files) to see how they work within Workbench, but once <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3575874" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3575874</a></span> is done, you'll be able to 2-way sync (push and pull) between the pages in Canvas and the pages in Workbench.</p> <p>The goal of this issue is to start exploring how this can work for Regions (header, footer). Regions have the exact same component tree structure as pages. The challenge is how to best show them within Workbench.</p> <ul> <li><strong>Option 1</strong>: Show them as their own thing. E.g., where in the left-hand panel you have Components and Pages, add another group below that for Regions, and when you click on one, show that in isolation in the main area. This is probably similar to what someone would expect from a Storybook-like UI.</li> <li><strong>Option 2</strong>: Show them as part of showing a Page. In other words, both what Canvas UI does, and how it ends up looking on a published site.</li> <li><strong>Option 3</strong>: Some combination of 1 and 2. E.g., show Pages without Regions and Regions without Pages, like Storybook, but then have some other place within Workbench where you can see "the whole app" (meaning, a Page plus the Regions together).</li> </ul> <p>Postponed on <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-14"><a href="https://www.drupal.org/project/canvas/issues/3589801" title="Status: Reviewed &amp; tested by the community">#3589801: Expose HTTP API for managing Page Regions </a></span> which is required for including regions in the CLI pull/push commands.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Pick an option above or a different one and try it out.</p> <h3 id="ui-changes">User interface changes</h3> > Related issue: [Issue #3589801](https://www.drupal.org/node/3589801) > Related issue: [Issue #3575872](https://www.drupal.org/node/3575872)
issue