Skip to content

Conversation

@gonfunko
Copy link
Contributor

@gonfunko gonfunko commented Aug 4, 2025

The basics

The details

Resolves

This PR refactors the recently-introduced comment bar button classes to be associated with the CommentView they are hosted in rather than the RenderedWorkspaceComment that the CommentView (may) be associated with. This was driven by Scratch, which uses CommentView to display block comments in addition to workspace comments, and thus has no RenderedWorkspaceComment instance associated with them. Many other services also use workspace comment-styled block comments which may benefit from reusing CommentView if they do not already.

Breaking Change

This PR removes CommentBarButton.getParentComment() and changes the constructor (and that of the two concrete subclasses) to take a CommentView instance. The former can be replaced by workspace.getCommentById(barButton.getCommentView().commentId), if the comment bar button in question is actually associated with a comment view in a RenderedWorkspaceComment.

@gonfunko gonfunko requested a review from a team as a code owner August 4, 2025 19:28
@gonfunko gonfunko requested a review from maribethb August 4, 2025 19:28
@github-actions github-actions bot added breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Aug 4, 2025
@gonfunko gonfunko changed the title refactor!: Associate comment bar buttons with the comment view. refactor: Associate comment bar buttons with the comment view. Aug 6, 2025
@github-actions github-actions bot added PR: refactor and removed breaking change Used to mark a PR or issue that changes our public APIs. PR: refactor labels Aug 6, 2025
@gonfunko gonfunko merged commit f9d0ec9 into develop Aug 6, 2025
14 checks passed
@gonfunko gonfunko deleted the comment-buttons branch August 6, 2025 21:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants