Overview

It would be really nice if we could make it possible to delete components by pressing the "Delete" button. Currently users need to right click a component and delete it from the contextual menu which can be jarring, especially if you're trying to remove several components at once.

Proposed resolution

Allow deleting components by pressing "Delete". We need to be careful to not trigger this action when a input field is focused. 😅

User interface changes

CommentFileSizeAuthor
#12 Delete nodes.mov4.17 MButkarsh_33
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

wim leers’s picture

Title: Allow deleting components by pressing "Delete" » Allow deleting component instances by pressing "Delete" or "Backspace"
Issue tags: +Usability

I thought you were referring to /admin/structure/component 😅 This subtle title tweak clarifies that for me 😇

fazilitehreem’s picture

Assigned: Unassigned » fazilitehreem

fazilitehreem’s picture

Assigned: fazilitehreem » Unassigned
Status: Active » Needs review
lauriii’s picture

Issue tags: +Needs tests

Thank you @fazilitehreem! It would be great if we could add test coverage for this.

utkarsh_33 made their first commit to this issue’s fork.

utkarsh_33’s picture

Assigned: Unassigned » jessebaker

Since this is a part of milestone so assigning it to @jessebaker to get reviews.

fazilitehreem’s picture

Assigned: jessebaker » fazilitehreem
fazilitehreem’s picture

Assigned: fazilitehreem » Unassigned
lauriii’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

The MR needs a rebase since a lot of MRs have landed

utkarsh_33’s picture

StatusFileSize
new4.17 MB

Adding video for reference that we can now delete selected components even if we click outside the iframe as well as if a component is selected via the page hierarchy display.

utkarsh_33’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

jessebaker made their first commit to this issue’s fork.

wim leers’s picture

Status: Needs review » Needs work
Issue tags: +Needs screenshots

AFAICT tests are present and passing now 👍

@jessebaker has pointed out an oversight over at https://git.drupalcode.org/project/experience_builder/-/merge_requests/2..., so marking Needs work.

In there, he also points out a scenario that is currently broken and that the test coverage should be expanded for.

Finally: please include a GIF showing this in action.

wim leers’s picture

Assigned: Unassigned » utkarsh_33
utkarsh_33’s picture

Assigned: utkarsh_33 » jessebaker
Status: Needs work » Needs review
wim leers’s picture

Assigned: jessebaker » Unassigned
Status: Needs review » Needs work
fazilitehreem’s picture

Assigned: Unassigned » fazilitehreem
fazilitehreem’s picture

Assigned: fazilitehreem » Unassigned
Status: Needs work » Needs review
wim leers’s picture

Status: Needs review » Needs work

Tests aren't passing.

🙏 Please don't mark an issue as needing review until the MR passes tests!

utkarsh_33’s picture

Assigned: Unassigned » jessebaker
Status: Needs work » Needs review

jessebaker’s picture

Assigned: jessebaker » Unassigned
Status: Needs review » Fixed
Issue tags: -Needs tests, -Needs screenshots
lauriii’s picture

Yay!! Great work everyone! 👏 🎉 Makes deleting components from a page so much easier 🤩

kristen pol’s picture

Just tested with latest changes and it works great, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.