Skip to content

Enable reaction-avatars on organization discussions - #6316

Merged
fregante merged 5 commits into
mainfrom
org-discusion-avatars
Feb 11, 2023
Merged

fregante merged 5 commits into
mainfrom
org-discusion-avatars

Conversation

@fregante

@fregante fregante commented Feb 9, 2023

Copy link
Copy Markdown
Member

@fregante fregante added the bug label Feb 9, 2023
function showAvatarsOn(commentReactions: Element): void {
const avatarLimit = arbitraryAvatarLimit - (commentReactions.children.length * approximateHeaderLength);
const reactionTypes = select.all('.social-reaction-summary-item', commentReactions).length;
const avatarLimit = arbitraryAvatarLimit - (reactionTypes * approximateHeaderLength);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The DOM was updated to use tool-tip elements, but just on organization discussions apparently.

const reactionsSelector = '.has-reactions :is(.js-comment-reactions-options, .comment-reactions-options):not(.rgh-reactions)';

function observeCommentReactions(commentReactions: Element): void {
commentReactions.classList.add('rgh-reactions');

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Outdated since the new observer has been added

awaitDomReady: false,
init,
}, {
include: [

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No separation needed since we dropped the comments listener attached to hasComments

}

// TODO [2022-12-18]: Drop `.comment-reactions-options` (GHE)
const reactionsSelector = '.has-reactions :is(.js-comment-reactions-options, .comment-reactions-options):not(.rgh-reactions)';

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@fregante
fregante added this pull request to the merge queue Feb 11, 2023
@fregante
fregante removed this pull request from the merge queue due to a manual request Feb 11, 2023
@fregante
fregante added this pull request to the merge queue Feb 11, 2023
@fregante
fregante removed this pull request from the merge queue due to the queue being cleared Feb 11, 2023
@fregante
fregante merged commit bfc8c11 into main Feb 11, 2023
@fregante
fregante deleted the org-discusion-avatars branch February 11, 2023 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

reaction-avatars doesn't work on Discussions

1 participant