pixiebrix-extension
pixiebrix-extension copied to clipboard
Add support for inferring a selector for multiple elements
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
@jcforest I will be working on the UX specification for this with @corinnemayans next week
@jcforest we can continue to use this issue for the inference/generalized selector work you're now using
This issue will be closed in 7 days unless the stale label is removed, or a comment is added to the issue.
This issue was closed because it has been stale for 7 days with no activity.