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: add basic pasters #7331

Merged
merged 2 commits into from
Jul 31, 2023

Conversation

BeksOmega
Copy link
Collaborator

@BeksOmega BeksOmega commented Jul 27, 2023

The basics

  • I branched from develop
  • My pull request is against develop
  • My code follows the style guide
  • I ran npm run format and npm run lint

The details

Resolves

Fixes #7336

Proposed Changes

Add an IPaster interface and pasters for blocks and workspace comments.

Reason for Changes

Work toward having separate pasters for separate objects so that we can easily add new pastable objects.

Test Coverage

N/A - This is just using the serialization system so no need to test it separately. I'll add tests for the integration between the clipboard and the pasters when I get to that point! (I.e. to make sure the correct APIs are getting called).

Documentation

N/A

Additional Information

Currently these are not actually used anywhere :P I'm going to wire them in in a future PR.

@BeksOmega BeksOmega requested a review from a team as a code owner July 27, 2023 23:07
@github-actions github-actions bot added the PR: feature Adds a feature label Jul 27, 2023
export class BlockPaster implements IPaster<BlockCopyData, BlockSvg> {
paste(
copyData: BlockCopyData,
workspace: WorkspaceSvg,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the existing copy/paste system work with headless workspaces? If no, we can decide that working in headless is out of scope, and then this code gets to be simple. If yes, we have to decide whether to keep that or deliberately break it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current code only works in rendered workspaces! Blocks are not ICopyable only BlockSvgs are =) Same for workspace comments.

@BeksOmega BeksOmega changed the base branch from develop to operation-copy-that July 31, 2023 16:01
@github-actions github-actions bot added PR: feature Adds a feature and removed PR: feature Adds a feature labels Jul 31, 2023
@BeksOmega BeksOmega merged commit 68a8a5f into google:operation-copy-that Jul 31, 2023
@BeksOmega BeksOmega deleted the feat/basic-pasters branch May 14, 2024 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: feature Adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants