Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Double click to edit cell #210

Closed
briochemc opened this issue Jul 14, 2020 · 6 comments
Closed

[Feature Request] Double click to edit cell #210

briochemc opened this issue Jul 14, 2020 · 6 comments

Comments

@briochemc
Copy link

It would be very nice if double-clicking a cell unfolded its code for editing (as is done by Jupyter). No idea how hard it is to implement, but this would reduce the number of clicks and improve productivity when creating content IMHO.

@fonsp
Copy link
Owner

fonsp commented Jul 14, 2020

Suggestions are hard to answer objectively, so here are some wavy thoughts:

Clicking cell output used to be the way to fold/unfold a cell (before 0.5?), but after adding @bind I moved it to a separate button because:

  1. Two unrelated actions had the same input method: interacting with bound variable and unfolding code. In the case of double click, there is still a number of actions that would accidentally trigger folding: e.g. double clicking to select, or double clicking the same button.

  2. The notebook felt fragile, because clicking somewhere on the page would change it. Pluto notebooks are also documents, and online documents normally don't change when you double click.

Double clicking the cell shoulder (the thing left of a cell) could work, although this is also mixing up UI concepts: the click shoulder would be both a click handler and a drag handler. (Although you see that more often in UI)

@briochemc
Copy link
Author

Thanks for your reply! To me, your point about double-clicking a button is the strongest one. What about triggering the unfold-action only when clicking a cell away from its interactive bindings. E.g., assume you have a cell with a slider, a button, and a text-box to write in. Double-clicking any of these elements uses the current behavior. But double-clicking somewhere else in the cell unfolds the code for you to edit it.

This does not solve the [double-click to select] issue, but I think that's OK because once unfolded, then you can double-click that text again inside the unfolded code.

And it does make the notebook "feel fragile", but I guess I would be OK to trade this fragility for more productivity!

@fonsp
Copy link
Owner

fonsp commented Jul 15, 2020

What are your thoughts about double clicking the cell shoulder?

@briochemc
Copy link
Author

briochemc commented Jul 15, 2020

What are your thoughts about double clicking the cell shoulder?

To be honest, I don't know... I guess I'd have to try it to see how it feels? But my (uneducated) intuition is that most Pluto users will come with a mostly-Jupyter experience, and expect some of the interface (and muscle-memory) to work in both frameworks?

@fonsp
Copy link
Owner

fonsp commented Jul 15, 2020

Jupyter has double clicking the cell shoulder to fold/unfold cell output, so it is actually quite close.

It sounds like the underlying issue here is that it takes too long to toggle folding a cell. Other solutions are a keyboard shortcut and making the click area of the 👁 button larger.

@fonsp
Copy link
Owner

fonsp commented Jul 22, 2020

I have moved this to the suggestion box 🐹

@fonsp fonsp closed this as completed Jul 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants