fix: restore bulk Delete and Duplicate in the helpful wheel#7799
Merged
walterbender merged 2 commits intoJul 12, 2026
Conversation
The 'Move to trash' and 'Duplicate' helpful-wheel items, and the code in _displayHelpfulWheel that reveals them when blocks are multi-selected, were accidentally dropped in the i18next migration (sugarlabs#4731). Selection mode still worked but the selected blocks could no longer be deleted or duplicated in bulk. Reinstate the two wheel items and the visibility toggle. The underlying deleteMultipleBlocks/copyMultipleBlocks actions were still intact (now in SelectionController) and are reused as is. Fixes sugarlabs#7794
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7799 +/- ##
==========================================
- Coverage 59.28% 59.27% -0.01%
==========================================
Files 176 176
Lines 57967 57975 +8
==========================================
Hits 34365 34365
- Misses 23602 23610 +8 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Pin the restored behavior so it cannot silently regress again: the 'Move to trash' and 'Duplicate' items are registered hidden, appear in the wheel only when at least one selected block is not in the trash, and disappear once the selection is gone. Uses the same vm sandbox harness as the other activity.js tests.
Member
|
Thx for this. Works well. There are some unrelated issues with bulk select -- the highlighting is a bit hit or miss -- and sometimes not every block in a stack is selected, which can cause some inconsistencies. But that is for a separate PR. When I get a chance, I will write up a new ticket. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Selection mode still highlights multiple selected blocks, but the helpful wheel no longer provides any way to bulk delete or duplicate them. As a result, the selection workflow reaches a dead end.
The
Move to trashandDuplicatewheel items, along with the code in_displayHelpfulWheel()that reveals them when blocks are selected, were accidentally removed during the i18next migration in #4731.The underlying
deleteMultipleBlocks()andcopyMultipleBlocks()actions were preserved and now live inSelectionControllerfollowing #7765, but they no longer had a UI entry point.This PR restores the two wheel items and their visibility logic while reusing the existing bulk actions as-is.
Related Issue
Fixes #7794
PR Category
Changes Made
Move to trashandDuplicatehelpful wheel items.deleteMultipleBlocks()andcopyMultipleBlocks()actions._displayHelpfulWheel()to show the items only when at least one selected block is not in the trash, matching the behavior before the regression.Testing Performed
Manually reproduced the issue on
master.Verified the fix in the browser using the following flow:
Select.Confirmed that
Move to trashandDuplicateappear in the wheel.Confirmed that both actions apply to all selected blocks.
Confirmed that both items remain hidden when no blocks are selected.
Added
js/__tests__/activity_helpful_wheel.test.jscovering the restored behavior: both items are registered hidden, appear only when at least one selected block is not in the trash, and disappear once the selection is gone.Ran the full Jest suite:
Ran
npm run lintsuccessfully.Ran
npx prettier --check .successfully.Confirmed that linting and formatting checks pass through the pre-commit hook.
Checklist
npm run lintandnpx prettier --check .with no errors.