-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Notes 100: Comment Delete #1191
base: main
Are you sure you want to change the base?
Notes 100: Comment Delete #1191
Conversation
✅ Deploy Preview for bldrs-share ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for bldrs-share-v2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Blocked by PR #1167 |
df07f19
to
5569da7
Compare
src/__mocks__/api-handlers.js
Outdated
@@ -235,7 +235,7 @@ function githubHandlers(githubStore) { | |||
rest.delete(`${GH_BASE}/repos/:org/:repo/issues/comments/:commentId`, (req, res, ctx) => { | |||
const {org, repo, commentId} = req.params | |||
|
|||
if (org !== 'bldrs-ai' || repo !== 'Share' || !commentId) { | |||
if (org !== 'pablo-mayrgundter' || repo !== 'Share' || !commentId) { |
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.
Let's move these to one of the mock test IDs to make it clear that it's not prod data, and also to free my ghost from the machine :)
src/net/github/Comments.test.js
Outdated
@@ -14,7 +14,7 @@ describe('net/github/Comments', () => { | |||
}) | |||
|
|||
it('successfully delete comment', async () => { | |||
const res = await deleteComment({orgName: 'bldrs-ai', name: 'Share'}, 1) | |||
const res = await deleteComment({orgName: 'pablo-mayrgundter', name: 'Share'}, 1) |
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.
same
src/Components/Notes/NoteFooter.jsx
Outdated
selected={showCreateComment} | ||
onClick={selectCard} | ||
icon={<AddCommentOutlinedIcon className='icon-share'/>} | ||
/> | ||
} | ||
{editMode && | ||
<Box sx={{marginLeft: 'auto', padding: '0 0.5em'}}> |
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.
Could the left-padding be moved to the parent to remove it from have it repeated in these 3 components?
src/Components/Notes/NoteCard.jsx
Outdated
synched: (comment.id !== commentId) && comment.synched, | ||
})) | ||
async function deleteCommentGithub(commentId) { | ||
await deleteComment(repository, commentId, accessToken) |
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.
I think we planned to use return statuses to set comments instead of filtering, like in #1200
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.
@pablo-mayrgundter getting 204 with the data of the response object undefined.
ChatGPT:
A 204 No Content status code indicates that the server successfully processed the request, but is not returning any content. This is typical for a POST request where the server does not return a response body.
Still working on the e2e tests |
#1187
percy