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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply CommentThread vscode Plugin API #8870

Merged
merged 1 commit into from
Jan 11, 2021
Merged

Apply CommentThread vscode Plugin API #8870

merged 1 commit into from
Jan 11, 2021

Conversation

vinokurig
Copy link
Contributor

What it does

Apply CommentThread vscode Plugin API

related CQ: http://dev.eclipse.org/ipzilla/show_bug.cgi?id=22902

fixes #8492

How to test

  1. Remove "@theia/git": "^1.8.0" from examples/browser/package.json file.
  2. Download vscode-git-1.49.3 and copy it to the plugins folder.
  3. Download vscode GitHub Pull request plugin and copy it to the plugins folder.
  4. Apply GitHub authentication provider:
  1. Start Theia and open a project cloned from GitHub with a Pull-Request e.g. https://github.com/vinokurig/environment-variable.git
  2. Sign in the GitHub Pull-Requests Plugin:
    screenshot-serverg0cevid1-che-dev-server-3010 192 168 99 253 nip io-2020 09 23-11_42_23
  3. Open a pull-request in the plugin:
    screenshot-localhost_3000-2020 12 16-12_13_45
  4. Open a changed file with comments:
    screenshot-localhost_3000-2020 12 16-12_16_21

See: Pull-Request comments are available in the diff. You can add some new comments by clicking the white line and delete and edit existing comments.

Review checklist

Reminder for reviewers

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I'm trying to add a comment to the PR, it's failed with the error notification.
And another input area has appeared below after clicking Save button.
Peek 2020-12-16 13-09

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After clicking Cancel, it shows the comment (x2) but they're not on the GitHub vinokurig/environment-variable#12

image

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tried Delete Comment button, but it does nothing.
Maybe some additional steps are required to configure the feature on my side?

@vinokurig
Copy link
Contributor Author

@azatsarynnyy

When I'm trying to add a comment to the PR, it's failed with the error notification.
And another input area has appeared below after clicking Save button.

I couldn't reproduce this issue, I even tried it with another github user:
video-convert (1)
May be something wrong was with GitHub?

I've tried Delete Comment button, but it does nothing.
Maybe some additional steps are required to configure the feature on my side?

Probably you don't have rights to delete the comment, I have fixed it by limiting the comment actions by access rights.

Copy link
Contributor

@RomanNikitenko RomanNikitenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested the changes - I'm able to create, edit and delete a comment - in general it works well for me.
But I faced with the issue that comments were displayed twice, please see a short video

gitgub_PR_issue

@vinokurig
could you check/test this use case on your side?

@azatsarynnyy
Copy link
Member

@vinokurig my issues were related to not enough permissions for my token 😄
image
Thanks @RomanNikitenko for the advice.
I'll re-check it with the updated token's permissions.

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've verified the base functionality:

  • add/edit/delete a comment
  • start/finish/delete a review

It works fine so far. Additionally, I want to check several more cases...

@vinokurig
Copy link
Contributor Author

@RomanNikitenko

But I faced with the issue that comments were displayed twice

Thank you, fixed it in my latest commit

@azatsarynnyy
Copy link
Member

I've verified that the comments UI duplication is fixed now. Thanks!

@azatsarynnyy
Copy link
Member

There's another difference comparing to VS Code.
The comment input hides on focus out. Then it's displayed again once the focus is coming back:

Peek 2020-12-18 16-13

@azatsarynnyy
Copy link
Member

In VS Code, the input area hides on focus out, only when it's empty.

@vinokurig
Copy link
Contributor Author

@azatsarynnyy

In VS Code, the input area hides on focus out, only when it's empty.

Fixed.

Copy link
Member

@azatsarynnyy azatsarynnyy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @vinokurig for fixing all the issues found during the review.
Everything works well now. 👍

/**
* Keybinding contribution
*/
export interface Keybinding {
Copy link
Contributor

@RomanNikitenko RomanNikitenko Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vinokurig
I guess the interface was added by mistake, could you take a look
I created a PR to remove it #9374

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

Successfully merging this pull request may close these issues.

Apply CommentController plugin API
3 participants