pixiebrix-extension icon indicating copy to clipboard operation
pixiebrix-extension copied to clipboard

Add support for passing arguments to the embedded AARI widget

Open twschiller opened this issue 3 years ago • 1 comments

Context

  • AA 0.26 introduces and embeddable AARI iframe. We have a YAML-based brick that wraps the widget to make it easy to include in a sidebar
  • The AARI widget doesn't yet support passing arguments via URL search parameters
  • We faced a similar limitation with UiPath Apps. To pass arguments, we implemented a JS brick that returns the iframe and uses the forms/set brick to set the inputs: https://github.com/pixiebrix/pixiebrix-extension/blob/c4cfcba2da729c913266cc22e8f0016769b5c0b1/src/contrib/uipath/embedApp.ts#L48-L48
  • YAML based bricks is currently unpublished: @aa/aari/widget-renderer
  • @mthek10 is the builder of the YAML brick

Implementation Sketch

  • Copy the @pixiebrix/uipath/app brick and adapt for the AARI widget bricks
  • Remove the YAML-based brick from the registry

Alternative Approaches

  • This limitation may come up with all iframeable content. A more general approach would be to introduce the ability to run bricks in sidebar iframes.

Discussion/Considerations

  • We should ask the AA team what the URL-based interface is expected to be, so when support is rolled out we can just use the URL-parameter based approach
  • The forms/set brick might not work for the AARI forms. IIRC, AARI forms don't have the argument name as the name for the field?
  • Out of the gate, we only need to support the most common input types, e.g., text fields, date fields, etc.

Reference

  • AARI bricks Trello: https://trello.com/b/s64gBaza/aari-bricks

twschiller avatar Oct 14 '22 12:10 twschiller

Assigning to @twschiller for specification spike.

Reference: https://pixiebrix.slack.com/archives/C042T2TBZ17/p1665752353219009

image

corinnemayans avatar Oct 18 '22 16:10 corinnemayans

This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.

github-actions[bot] avatar Jan 25 '24 00:01 github-actions[bot]

This issue was closed because it has been stale for 7 days with no activity.

github-actions[bot] avatar Feb 02 '24 00:02 github-actions[bot]