-
Notifications
You must be signed in to change notification settings - Fork 27
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
[WIP] fix #247 comment patch and delete addressed #347
Open
Gerald1614
wants to merge
10
commits into
Human-Connection:develop
Choose a base branch
from
Gerald1614:no-refresh-after-comment-update-or-delete
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
fa26d7c
Merge pull request #336 from Human-Connection/develop
roschaefer 20fe531
comment patch and delete addressed
7f97162
comment patch and delete addressed
73dd331
fix#247 - delete and update comments
6e511bf
Merge branch 'no-refresh-after-comment-update-or-delete' of https://g…
e880a74
added mutation for comment update
beb7404
upodated package.json to match sanitize-html version
ad9389c
Merge branch 'develop' into no-refresh-after-comment-update-or-delete
Lulalaby 749c730
Expose several bugs in the current implementation
roschaefer 7c0c5ff
Use async/await style
roschaefer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,11 @@ export const mutations = { | |
clear (state) { | ||
state.comments = [] | ||
}, | ||
removeComment (state, id) { | ||
const cmt = state.comments[state.comments.findIndex(comment => comment._id === id)] | ||
console.log(cmt) | ||
cmt.deleted = true | ||
}, | ||
setContributionId (state, contributionId) { | ||
state.contributionId = contributionId | ||
} | ||
|
@@ -111,10 +116,17 @@ export const actions = { | |
create ({dispatch}, data) { | ||
return this.app.$api.service('comments').create(data) | ||
}, | ||
patch ({dispatch}, data) { | ||
patch ({dispatch, commit}, data) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove obsolete argument |
||
return this.app.$api.service('comments').patch(data._id, data) | ||
Lulalaby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.then(() => { | ||
commit('set', data.content) | ||
}) | ||
}, | ||
remove ({dispatch}, id) { | ||
remove ({commit}, id) { | ||
commit('removeComment', id) | ||
return this.app.$api.service('comments').remove(id) | ||
// .then(() => { | ||
// commit('removeComment', id) | ||
// }) | ||
Gerald1614 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As far as I know, the
editorText
method was used to show the confirmation dialog, when a user accidently or intentionally clicked a button to leave the current page. So your latest changes would not be lost. @ionphractal could you confirm?Actually I would love to see you @Gerald1614 pair-program with a community member. @Gerald1614 did you join our Discord Server already? You can organize a pair-programming with e.g. @ionphractal. He speaks perfect English as far as I know.
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.
here's the invitation link to our public Discord Server: https://discord.gg/6ub73U3
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.
Hi, I am on discord. i have a very busy week but i will use discord to contact @ionphractal. I will be happy to spend time with him. it will be easier than playign ping pong with chat messages. thanks, Gerald