-
Notifications
You must be signed in to change notification settings - Fork 350
✨(frontend) Duplicate a doc #1078
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
Conversation
e88db26
to
b90a091
Compare
855ad40
to
4e36ce7
Compare
Yes we can |
Hey @AntoLC @rl-83 talked with @sampaccoud about this. |
By default we shouldn't copy the associated members and rights. Let's remove this from this PR. I've opened an issue to add the mentioned above |
7cecebd
to
a6d538b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before duplicate a document, the content should be saved. The first test I made I created a new doc, I wrote content and I duplicate it. The duplicated document is empty because no save has occured. Without this save content can be lost.
await editor.click(); | ||
await editor.fill('Hello Duplicated World'); | ||
|
||
await page.reload(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not reflect what really happen when you work on a document. This reload I think trigger the save of the document content, this is why you have the same content at the end of this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will now save if possible when duplication.
- if reader, it will not save, so 1mn could be lost with duplication if editor are writing in the same moment.
- if duplication is trigger from option document list, we cannot access the provider, so 1mn could be lost with duplication if editor are writing in the same moment.
We were maintaining two separate components for AGPL and MIT license exports. This commit consolidates the functionality into a single component that handles both licenses, simplifying the codebase and reducing duplication.
We can duplicate a document from the tool options.
The duplicate was also able for anonynous user if they can read it. We have to restrict it to at least reader authenticated otherwise no access will be created on the duplicated document.
Only admin or owner should be able to duplicate a document with existing accesses.
Purpose
Gives the possibility to duplicate a document.
Proposal
Demo
Demo.duplicate.doc.-.Docs.webm
Edge case
We save before duplication to ensure the latest state is duplicated.