Skip to content

Make comments copyable via adding an (optional) isCopyable method to ICopyable #9129

@cpcallen

Description

@cpcallen

There are IMHO a number of significant issues with #9107, including:

  • Making it possible to copy blocks even if their .isDeletable() or .isMovable() methods return false, in contradiction with our previous decision not to do that in v12 (see Cannot copy a shadow block #9084).
  • Creating an isCuttable helper function that is not guaranteed to be in sync with isCopyable (thus contradicting the purpose of having factored isCopyable out of the cut and copy preconditionFns in in the first place), and
  • Making it impossible to cut or copy workspace comments.

I think #9107 should be reverted (except for new tests), and a different approach taken to resolving RaspberryPiFoundation/blockly-keyboard-experimentation#546—ideally by ascertaining what change caused flyout blocks to have become uncopyable in the the first place and narrowly addressing that.

Further increasing the range of things that can be copied is highly desirable but should be left until we decide we want to implement the proposed changes described in #9098 (or some comparable alternative approach).

Originally posted by @cpcallen in #9107 (review)

Metadata

Metadata

Assignees

Labels

issue: bugDescribes why the code or behaviour is wrong

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions