Extension plugins, UI, and initial browser APIs
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3550161. --> Reported by: [balintbrews](https://www.drupal.org/user/613760) Related to !190 >>> <h3 id="overview">Overview</h3> <p>&rarr; For background, see ADR posted in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3514033" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3514033</a></span>.</p> <p>The goal of this issue is to get to a point where:</p> <ol> <li>Extensions can be implemented as plugins;</li> <li>Extensions can be opened on the UI;</li> <li>Extensions have access to a browser API to read the current component tree in the editor frame.</li> </ol> <h3 id="proposed-resolution">Proposed resolution</h3> <ol> <li>Create a plugin type and a plugin manager that implements a discovery mechanism for YAML files (See an example of this <a href="https://git.drupalcode.org/project/simple_oauth/-/tree/6.0.x/modules/simple_oauth_static_scope/src/Plugin">in the <code>simple_oauth_static_scope</code> module</a>);</li> <li>Ensure the extension type requires and reads the metadata defined in the ADR posted in <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3514033" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3514033</a></span>;</li> <li>Build UI for opening and working with extensions in a way that doesn't disrupt the earlier implementation;</li> <li>Design and implement an API based on <code>window.postMessage()</code> to read the current component tree.</li> </ol> <h3 id="ui-changes">User interface changes</h3> <p>UI for opening and working with extensions should match the appearance of the earlier implementation.</p> > Related issue: [Issue #3514033](https://www.drupal.org/node/3514033)
issue