Skip to content

[Feature] Adding or deleting an item to a list in blockcode #2647

@DMB-rgb

Description

@DMB-rgb

Adding or deleting an item to a list in blockcode.
When I add an item to a list it always adds at end of list.

Describe the solution you'd like
If there is a selected cell, I'd like it to add an empty cell immediately before the selection.
If there is a selected cell and it is deleted then it should be removed. And the next cell becomes selected.

Describe alternatives you've considered

  1. If you added it immediately after the selection then you could not get to the very first cell location.
  2. I'd like the delete button to remove the selected cell. Then I think the next cell should become selected unless it is the last cell in which case it becomes unselected.

Additional context
So I am looking at the red assignment of the list at line 13 in the python code. In this example 60 has been selected.

  1. If I pressed '>' then I'd like a space between 40 and 60.
  2. If I pressed '<' then I'd like the cell with 60 to be removed and cell with 80 to shift left and be selected.
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions