enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 321 forks source link

Design Review of Table Input #10856

Open jdunkerley opened 4 weeks ago

jdunkerley commented 4 weeks ago

Bugs / Small Things:

### Bugs / Small Things:
- [ ] https://github.com/enso-org/enso/issues/10860
- [ ] https://github.com/enso-org/enso/issues/10861
- [x] Moving in the grid with cursor moves the component in the graph editor too. -  #10859
- [ ] #10758
- [ ] #10759
- [ ] https://github.com/enso-org/enso/issues/10862
- [ ] https://github.com/enso-org/enso/issues/10863
- [ ] https://github.com/enso-org/enso/issues/10864
- [ ] https://github.com/enso-org/enso/issues/10865

Bigger Changes

farmaazon commented 4 weeks ago

❓How can libs control when to use Table Input?

ATM they cannot: the exact method call is hardcoded in https://github.com/enso-org/enso/blob/develop/app/gui2/src/components/GraphEditor/widgets/WidgetTableEditor.vue#L162

Shouldn't be able to drag out of the grid. Right click to delete a column? Dragging column order should reorder columns in the code.

These are already tracked by https://github.com/enso-org/enso/issues/10758 and https://github.com/enso-org/enso/issues/10759

An explicit plus to add a column (and then default the name to Column where n is 1+ integer to be unique.

I guess this should replace the old way of adding column?

Limit size of table input to 256 items for now.

It is size of cells? So if I have a single column of 129 elements, am I forbidden to add new column while still able to add new row?

GitHub
enso/app/gui2/src/components/GraphEditor/widgets/WidgetTableEditor.vue at develop · enso-org/enso
Hybrid visual and textual functional programming. Contribute to enso-org/enso development by creating an account on GitHub.
farmaazon commented 4 weeks ago

Moving in the grid with cursor moves the component in the graph editor too.

Is this what we want to have? It would make selecting a range impossible.

farmaazon commented 4 weeks ago

Code should still be shown - with an indicator to edit in the visualization panel.

Even with the 256 limit, the code could be massive, making a very long node. So I would still hide most of the content, like

Table.new [['name', [...]], ['age', [...]], ['email', [...]], ...]

Or something like that.

As for editing in visualization: I'm not sure how it will play out with filtering/selecting columns - user might be confused that some operations are only in presentation (which may be then promoted to a new node), but others are affecting data.

jdunkerley commented 4 weeks ago

Moving in the grid with cursor moves the component in the graph editor too.

Is this what we want to have? It would make selecting a range impossible.

No this is a bug, the cursor keys should be captured by the grid and not sent to graph editor.

jdunkerley commented 4 weeks ago

Code should still be shown - with an indicator to edit in the visualization panel.

Even with the 256 limit, the code could be massive, making a very long node. So I would still hide most of the content, like

Table.new [['name', [...]], ['age', [...]], ['email', [...]], ...]

Or something like that.

As for editing in visualization: I'm not sure how it will play out with filtering/selecting columns - user might be confused that some operations are only in presentation (which may be then promoted to a new node), but others are affecting data.

Agree with this we would do something very much like this possibly replacing the whole Vector Table.new [ ... Edit In Vizualization ... ]

farmaazon commented 3 weeks ago

Moving in the grid with cursor moves the component in the graph editor too.

Is this what we want to have? It would make selecting a range impossible.

No this is a bug, the cursor keys should be captured by the grid and not sent to graph editor.

Fixed in https://github.com/enso-org/enso/pull/10859