ScottLogic / kdb-boothroyd

a prototype re-implementation of KDB Studio using JavaScript and Electron
Apache License 2.0
5 stars 2 forks source link

Add a view that shows the query history #62

Closed ColinEberhardt closed 2 years ago

ColinEberhardt commented 2 years ago

As suggested in the 2021-09-13 - KDB Project Call - https://github.com/finos/kdb/issues/55

OiNutter commented 2 years ago

How do you feel about using one of these with a list in it?

https://developer.microsoft.com/en-us/fluentui#/controls/web/panel

ColinEberhardt commented 2 years ago

That's looks like a neat idea - it's not something you'd want visible all the time.

OiNutter commented 2 years ago

What would the desired interaction be with the entries? I can see a few options:

  1. Click on an entry and it replaces the existing editor contents
  2. Click on an entry and it runs the query without replacing the editor contents
  3. Click on an entry and it runs the query and replaces the editor contents
  4. Click on an entry and it just copies it to the clipboard
  5. An entry has option buttons for copy, replace and run
OiNutter commented 2 years ago

@ColinEberhardt what are your thoughts on this?

ColinEberhardt commented 2 years ago

That's a tricky one. My thoughts are ...

  1. Click on an entry and it replaces the existing editor contents - this is a bit 'yuck' and unexpected for the user
  2. Click on an entry and it runs the query without replacing the editor contents - not a bad idea, but how to then edit the query again?
  3. Click on an entry and it runs the query and replaces the editor contents - same issue as (1)
  4. Click on an entry and it just copies it to the clipboard - I kind of like this one, perhaps have a small toast notification that says "copied to clipboard"
  5. An entry has option buttons for copy, replace and run - I like this one too, but could be a little cluttered.

I'm erring towards (4) for the simplicity, it gives the user the option to do whatever they want (and easily too), without having to write too much code :-)