assistant icon indicating copy to clipboard operation
assistant copied to clipboard

[bug/detection] reflect button detection not working as expected.

Open danpillay87 opened this issue 5 years ago • 1 comments

Describe the bug "magical button detection" doesn't appear to be working as expected - have tried various figma constructs to help the AI out for example, creating layer rectangle both as a component and as a standalone layer - have named frame/component/layer "button", "Button", "FlatButton" etc. and also tried to provide verb based layer like "Submit" to help the detection however this is rendering as Positioned or Container widget only.

screenshot/video to replicate https://www.loom.com/share/b4bf2d12b7f4449fa533ca661e98439d

Expectation Had expected node layer name to work (if not visual or machine detection) for Flat or Raised buttons in flutter

danpillay87 avatar Dec 09 '20 13:12 danpillay87

Hi. thanks for the report. I have few questions for this. image

What does Autoflow 19 does? and why does it exists in the button.

Our button detection logic validates the structure of the selected node, which cannot contain other manifests rather than

  • button.base (ButtonBase)
  • button.text (ButtonText)
  • button.icon (ButtonIcon)

if Autoflow does not register as adequate icon manifest, it will not be detected as a button, and cannot convert it to flutter FlatButton.

here are our detection repository

https://github.com/bridgedxyz/reflect-detection/tree/main/lib/button.detection https://github.com/bridgedxyz/reflect-detection/tree/main/lib/button-text.detection https://github.com/bridgedxyz/reflect-detection/tree/main/lib/button-icon.detection https://github.com/bridgedxyz/reflect-detection/tree/main/lib/button-base.detection

softmarshmallow avatar Dec 10 '20 03:12 softmarshmallow