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

Add support for inferring a selector for multiple elements

Open twschiller opened this issue 3 years ago • 2 comments

Context

  • When using certain bricks, a user wants to be able select multiple elements on the page. For example, the For Each Element brick is used to loop over elements on the page
  • PixieBrix supports selectos that return multiple elements, but does not have a way to automatically infer the selector
  • TODO: need to determine the UX for how the user refines the multiple selection

Implementation Sketch

  • TBD: product specification page on Notion: https://www.notion.so/pixiebrix/Multi-element-Selector-Inference-15c6836a77d948f686398eef9e1b2e6e

Out of Scope

  • Our "JQuery reader" brick supports reading an array of values, but we don't expose the "multi" in the Page Editor interface yet: https://github.com/pixiebrix/pixiebrix-extension/blob/2b008150d653519b9c536d7a6765137ca6669291/src/blocks/readers/jquery.ts#L29-L29

Related Code

  • SelectorSelectorWidget: https://github.com/pixiebrix/pixiebrix-extension/blob/2b008150d653519b9c536d7a6765137ca6669291/src/pageEditor/fields/SelectorSelectorWidget.tsx#L169-L169
  • For Each Element brick definition: https://github.com/pixiebrix/pixiebrix-extension/blob/2b008150d653519b9c536d7a6765137ca6669291/src/blocks/transformers/controlFlow/ForEachElement.ts#L26-L26

twschiller avatar Aug 22 '22 01:08 twschiller

@jcforest I will be working on the UX specification for this with @corinnemayans next week

twschiller avatar Aug 26 '22 13:08 twschiller

@jcforest we can continue to use this issue for the inference/generalized selector work you're now using

twschiller avatar Sep 21 '22 00:09 twschiller

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]