-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Document Archive #921
Document Archive #921
Conversation
Allow reading of archived docs
Fix: Duplicate user name on published but unedited docs
isDraft, | ||
} = document; | ||
const neverUpdated = publishedAt === updatedAt; | ||
let content; | ||
|
||
if (deletedAt) { |
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.
Made this logic easier to reason about
command: yarn lint |
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.
Just separating CI flow and lint into separate steps for clarity
@@ -72,16 +71,6 @@ class Layout extends React.Component<Props> { | |||
this.redirectTo = homeUrl(); | |||
} | |||
|
|||
@keydown('e') | |||
goToEdit(ev) { |
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.
Moved to DocumentScene
@@ -94,6 +100,17 @@ class MainSidebar extends React.Component<Props> { | |||
<Section> | |||
<Collections onCreateCollection={this.handleCreateCollection} /> | |||
</Section> | |||
<Section> |
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.
New menu item
this.redirectTo = duped.url; | ||
this.props.ui.showToast('Document duplicated'); |
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.
New toast messages after actions for clarity and consistency
@@ -121,7 +120,7 @@ | |||
"mobx-react": "^5.4.2", | |||
"natural-sort": "^1.0.0", | |||
"nodemailer": "^4.4.0", | |||
"outline-icons": "^1.7.0", | |||
"outline-icons": "^1.8.0-0", |
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.
New "Archive" icon
@@ -0,0 +1,11 @@ | |||
module.exports = { |
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.
New database column
|
||
// documentStructure can only be updated by one request at the time | ||
const unlock = await asyncLock('testLock'); |
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.
🔥 looks like this should have been using the same collection lock – updated.
if (match) { | ||
if (!options.deleteDocument && !returnValue) returnValue = match; |
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.
Separated the code for managing the documentStructure
and deleting / archiving individual docs
|
||
await this.destroy({ transaction, ...options }); | ||
|
||
events.add({ name: 'documents.delete', model: this }); |
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.
New events for future audit log
TODO