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

Data structure editing controls in blocks mode #580

Open
amyjko opened this issue Sep 28, 2024 · 9 comments
Open

Data structure editing controls in blocks mode #580

amyjko opened this issue Sep 28, 2024 · 9 comments
Assignees
Labels
editor Anything related to editing code enhancement New or improved feature needs design When an enhancement is not yet designed

Comments

@amyjko
Copy link
Collaborator

amyjko commented Sep 28, 2024

What are you trying to do that you can't?

It's hard to edit literals in both text and blocks mode. For example:

  • ['a' 'list']
  • {'a' 'set'}.
  • ⎡a•# table•#⎦⎡1 2⎦

For each, adding and removing values requires a lot of typing and deleting.

What is your idea?

Add direct manipulation controls to the block views of these literals to make it easy to quickly add a bunch of new values, new table columns, new table rows, etc. It will be much faster than typing and teach creators the syntax by example.

@amyjko amyjko added enhancement New or improved feature editor Anything related to editing code needs design When an enhancement is not yet designed labels Sep 28, 2024
@enricopratama
Copy link
Contributor

Hi @amyjko may I be assigned into this issue? May I know how I can get started on this and may I be pointed on where to look in the implementation? Thanks in advance!

@amyjko
Copy link
Collaborator Author

amyjko commented Oct 26, 2024

Sure! This is not ready for implementation thought: the needs design tag means that we have to design something first. The high level design problem is how to make data structure editing easier. There are many ways we might achieve this. So the place to start is to understand the problem, and ideate possible designs that would address the problem.

@enricopratama
Copy link
Contributor

Notes:

When in block editing, you can edit via keyboard and edit lists sets keyboard, but in blocks mode you can't edit text. what kind of controls you might want, such as insert a row in this table,etc. that would make it easier to edit.

When the output of the program is that data structure, you get the edit value on stage. you can make that rendered value editable

Think about how to make editing easier (especially on stage)!

@wwihono
Copy link

wwihono commented Oct 31, 2024

Hey @amyjko can I be assigned to work on this issue alongside @enricopratama?

@amyjko
Copy link
Collaborator Author

amyjko commented Oct 31, 2024

Yes! Added.

@wwihono
Copy link

wwihono commented Nov 5, 2024

Hey @amyjko me and @enricopratama have begun ideating a design for a proposal for this issue.

First, starting with providing more accessibility for editing lists, we propose a change to how elements can be added. In between elements, we propose to add a '+' element when the cursor hovers above the whitespace between elements.

Next, we are proposing a redesign to make stage changes. For example, in the stage view, to change values inside a list, when the cursor hovers over an element, the element will be surrounded in an orange outline as reflected by the corresponding element in the editor.

This is what we currently have, we would love to discuss this with you in person on Wednesday and get your professional input on our proposal.

@enricopratama
Copy link
Contributor

Untitled Notebook-1
Untitled Notebook-2

@enricopratama
Copy link
Contributor

enricopratama commented Nov 5, 2024

Attached is a visual representation of our example, we are happy to discuss it more to you in-person to explain more about this since this is only our first iteration of our design proposal. Thank you in advance @amyjko!

@amyjko
Copy link
Collaborator Author

amyjko commented Nov 6, 2024

Great, I look forward to chatting on Wednesday @enricopratama.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Anything related to editing code enhancement New or improved feature needs design When an enhancement is not yet designed
Projects
Status: No status
Development

No branches or pull requests

3 participants