figma-plugins icon indicating copy to clipboard operation
figma-plugins copied to clipboard

Graphviz: position property is causing crash.

Open danhollick opened this issue 6 years ago • 0 comments

When opening Graphviz the following error appears in the console:

Error: in showUI: Expected "showUI options" to have type {visible: optional boolean, width: optional number, height: optional number} but got additional property "position"
    at <anonymous> (PLUGIN_5_SOURCE)
    at <anonymous> (PLUGIN_5_SOURCE:2)
    at call (native)
    at <eval> (PLUGIN_5_SOURCE:6)

I see from the Plugins slack that the position property was discontinued:

- We decided not to go forward with the optional position option in figma.showUI(). Instead, plugins now always remember their last opened position by default.

So it should be a case of removing position here and cleaning up the typings: https://github.com/rsms/figma-plugins/blob/bd57af0a879a6fb0b3bf56f46baef76e5dc42359/graphviz/src/plugin.ts#L150-L155

I'll try make a PR today if I get time.

danhollick avatar Dec 03 '19 08:12 danhollick