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

Add inline comment bubbles #155

Open
bracesproul opened this issue Oct 28, 2024 · 5 comments
Open

Add inline comment bubbles #155

bracesproul opened this issue Oct 28, 2024 · 5 comments
Labels

Comments

@bracesproul
Copy link
Member

Add UI support for inline comment bubbles. (See Loom video of how ChatGPT manages this). Do NOT implement any backend functionality for that in this PR. All this should do, is expose a React API which will allow us to later insert inline comments which are tied to specific text in the artifact, and highlights said text. This PR can however include logic which will update the highlighted text (not required, I/you can do in another PR).

The comment bubble should have an X (cancel/close) button, and an Apply button. To enable this, the data structure should have these two fields:

interface InlineCommentBubbleAPI {
  /**
   * The comment which is rendered inside the bubble.
   */
  comment: string;
  /**
   * The text which will be used to replace the highlighted text if the user accepts it.
   * Optional, because not all comment bubbles should need to be change suggestions.
   */
  refactoredText?: string;

  ... other fields which will allow us to highlight the text the comment is referring to, and refactor said text with the `refactoredText` field, if populated.
}
@liuhuapiaoyuan
Copy link
Contributor

Has anyone taken this feature? Can you assign to me

@bracesproul
Copy link
Member Author

Not yet, it's all yours @liuhuapiaoyuan!

@liuhuapiaoyuan
Copy link
Contributor

👏👏👏👏

@bracesproul
Copy link
Member Author

hey @liuhuapiaoyuan going to unassign you from this, if you've already started feel free to still put a PR up though!

@liuhuapiaoyuan
Copy link
Contributor

Oh sorry, I've started processing, but I won't be able to submit the PR .

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

No branches or pull requests

2 participants