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

Enable reaction-avatars on organization discussions #6316

Merged
merged 5 commits into from
Feb 11, 2023

Conversation

fregante
Copy link
Member

@fregante fregante commented Feb 9, 2023

@fregante fregante added the bug label Feb 9, 2023
@@ -58,7 +58,8 @@ const viewportObserver = new IntersectionObserver(changes => {
});

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
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.

function observeCommentReactions(commentReactions: Element): void {
commentReactions.classList.add('rgh-reactions');
Copy link
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
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

@@ -74,35 +75,30 @@ function showAvatarsOn(commentReactions: Element): void {
}
}

// 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
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