Skip to content

Productionise Output only Web Component #1010

Closed
@sra405

Description

@sra405

Similar to the embedded view from the site I wanted to see if it was simple enough to add an output only view to the web component.

It's worth noting the need for this in two use cases:

  • Productionising Block-to-text - we need the ability to pass in code via the code attribute for users to run per step in the activity - draft PR used as the code output runner in the alpha here. As a draft this was sufficient for the alpha, for use in a beta (integrated with the projects site) we'll need to add tests to ensure the functionality works as expected
  • Editor web component separation - as part of splitting out the editor.raspberrypi.org app and the web component the need to have an output only web component enables the embedded path in the app for integration via iframes
    • the editor currently has a embed/viewer path (e.g. here) for use in iframes in external products (e.g. here) - we'll need this to properly separate out the editor-standalone by utilising an output only web component on this path
    • all functionality in editor-ui should be in the EmbeddedViewer component
    • additional functionality over just running code is needed, this includes:
      • ability to obtain code/assets from a project identifier
      • inclusion of a file bar at the top of the page (with the ability to choose an alternative file to run)
      • inclusion of a built in run CTA rather than an external trigger

Notes

If its easier to do this in parts I'm all ears. The functionality for block to text is there and mostly aligns with what's needed for the standalone. Additionally if we think we can provide the functionality of the embedded viewer path as a web component I'm all ears too, we'd significantly reduce our number of iframe (not to zero unfortunately) but would also unlock performance gains too!

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions