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

feat: Display a 'wait' cursor when opening trashcan #6699

Merged
merged 1 commit into from
Dec 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion core/trashcan.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,13 @@ export class Trashcan extends DeleteArea implements IAutoHideable,
const contents = this.contents_.map(function(string) {
return JSON.parse(string);
});
this.flyout?.show(contents);
// Trashcans with lots of blocks can take a second to render.
const blocklyStyle = this.workspace.getParentSvg().style;
blocklyStyle.cursor = 'wait';
setTimeout(() => {
gonfunko marked this conversation as resolved.
Show resolved Hide resolved
this.flyout?.show(contents);
blocklyStyle.cursor = '';
}, 10);
this.fireUiEvent_(true);
}

Expand Down