I have made an extension prototyping a “command palette” approach to keyboard acceleration in OpenRefine(inspired by what one often sees in IDEs). Bugs are guaranteed but I would find it useful to see some thoughts on the approach as further development(support more column actions) would require some refactoring in core.
Awesome! Can this be used to call custom Expression snippets?
Other extensions can register commands:
Maybe the extension could be made so that it can auto discover things from the Menu-system but that would need quite a bit of upstream work as it’s very state-dependent at the moment. Very few of OpenRefines own column actions are supported right now as they are also very tightly coupled with the menus.
forget the menus…
I mean could someone use this to add a Custom Expression to fire off.
Imagine a GREL snippet like:
cells.${MyColumn}.replace("abc","xyz")
and I could store that command in the palette as a custom command called “My Replace”.
The command palette syntax would be:
- CTRL+Space to open palette
- begin typing “My Replace” and select it from list with up/down and ENTER.
- then begin typing the column name, select it from list with up/down and ENTER.
- rejoice
Ah I see, the answer is “soon”.
Extremely exciting! It brings up a lot of interesting topics:
- how to rethink OpenRefine’s user experience in bold ways, and escape from those clumsy and overloaded menus
- how to restructure the code of our front-end to make this easier - perhaps this suggests refactorings that would be meaningful on their own and bring other benefits? I can definitely relate to the issue of coupling with menus at least.
- or is it even worth it and writing an independent front-end is the way to go?!
- to what extent this should be officially supported by an extension point, and how to decide what extension points to maintain
Maybe even others? Anyway - a lot of food for thought already!
@antonin_d seems like we need that BarCamp!
This looks really interesting @abbe98 - I hope I get time to play around with it soon!
Owen