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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Allows copying from unsaved content #14464

Conversation

nikcio
Copy link
Contributor

@nikcio nikcio commented Jun 27, 2023

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #14459

Description

This adds a check to the clipboard service that will check if we're copying from an unsaved content node. When we do this we will allow multiple copies based on the display name instead of the unique key. This allows the user to copy multiple lists of blocks from an unsaved content node.

I choose the display name because it's created after the property name and content node name. It will also give a confusing user experience if you could have multiple elements in the clipboard with the same display name.

See the #14459 reproduction section to see how to test the PR 馃槃

@github-actions
Copy link

github-actions bot commented Jun 27, 2023

Hi there @nikcio, thank you for this contribution! 馃憤

While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:

  • It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
  • The automated tests all pass (see "Checks" tab on this PR)
  • The level of security for this contribution is the same or improved
  • The level of performance for this contribution is the same or improved
  • Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
  • If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
  • 馃挕 The contribution looks original and the contributor is presumably allowed to share it

Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.

If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.

Thanks, from your friendly Umbraco GitHub bot 馃 馃檪

@georgebid
Copy link
Contributor

Thank you for raising and fixing this one @nikcio 馃コ Someone on the core collaborators team will review this soon!

@georgebid georgebid self-requested a review June 27, 2023 15:11
@georgebid georgebid merged commit 1d14158 into umbraco:contrib Jun 27, 2023
14 checks passed
@georgebid
Copy link
Contributor

I've tested this, and compared it with the before and after (thanks a lot for your details steps in the issue!) and I can see that copying is now working for unsaved entries. Therefore I have merged this in 馃帀 Thanks again @nikcio

@nikcio
Copy link
Contributor Author

nikcio commented Jun 27, 2023

Great! Will this also be added to a V8 release and is there any way to know which one? @georgebid

@georgebid
Copy link
Contributor

All contributions go to the contrib branch, and we'll cherry-pick things that make sense to other versions. When the next release happens I believe @nul800sebastiaan will add a comment to note where this has been cherry-picked to 馃槃 @nikcio

@nul800sebastiaan
Copy link
Member

Cherry picked for v10/11 in 30ec9d9

@nikcio
Copy link
Contributor Author

nikcio commented Aug 8, 2023

Hey @nul800sebastiaan
Is there any chance this could get cherry picked for v8?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copying block items from newly created content overrides eachother
4 participants