OpenFn / lightning

OpenFn/Lightning ⚡️ is the newest version of the OpenFn DPG and provides a web UI to visually manage complex workflow automation projects.
https://openfn.github.io/lightning/
GNU Lesser General Public License v3.0
131 stars 36 forks source link

Inspector: improve code assist UX #2627

Open josephjclark opened 1 week ago

josephjclark commented 1 week ago

User story

The UX for code assist in Monaco in the inspector is bad, actually. This issue is a little wishlist of features/improvements that we might get to one day.

Image

Notes

Editing the appearance of the code assist is hard. We might have to switch off all default language features and develop our own custom suggestions (I'm worried about what this might mean for stuff like object properties).

The ideal solution would be to take the default suggestions and customise them - removing stuff that isn't @public for example, or updating descriptions.

This might be useful hack to this end:

const x = editor.getContribution('editor.contrib.suggestController')

This gets the suggestion controller component right outta Monaco. You can then inspect it in the debugger and trace through all sorts of interesting things, including a couple of callbacks.

So far I haven't found the exact callbacks I think we need, but I wanted to record the find.

josephjclark commented 3 days ago

I have had to restore the JSDoc attributes in #2669

Maybe for now we have to live with jsdoc attributes appearing in the suggestions, no matter how untidy they are.

This speaks to the idea that we need to generate our own suggestions from scratch and not use the default service.