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

[Bug] TypingIndicator: User popout unrenders, even when focused, after all users stop typing #3164

Open
2 tasks done
sadan4 opened this issue Jan 25, 2025 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working

Comments

@sadan4
Copy link
Contributor

sadan4 commented Jan 25, 2025

Discord Account

No response

What happens when the bug or crash occurs?

the user popout profile vanishes even if it was in use

Image

What is the expected behaviour?

i expect clicking the users avatar to do nothing or for the popout to stay even after all users have stopped typing

How do you recreate this bug or crash?

  1. click on a users avatar in a typing indicator
  2. start doing something on their profile
  3. they stop typing and there are no other users in the channel typing
  4. the popout vanished even if it was still focused/hovered

Errors

N/A

Request Agreement

  • I am using Discord Stable or tried on Stable and this bug happens there as well
  • I have read the requirements for opening an issue above
@sadan4 sadan4 added the bug Something isn't working label Jan 25, 2025
@Sqaaakoi
Copy link
Contributor

Sqaaakoi commented Jan 25, 2025

this would probably require reimplementing a small portion of UserSummaryItem
it actually doesn't seem quite hard to do tbh

maybe we could just patch the component?

edit: @Nuckyz has made me look at the surrounding code in the plugin and it's not as simple as that

@Sqaaakoi
Copy link
Contributor

forget all of that. I have a working prototype now.

How it works:
remove the if (typingUsersArray.length > 0) condition so the component always renders
add that condition to the Dots indicator mode condition

@Sqaaakoi
Copy link
Contributor

Sqaaakoi commented Jan 25, 2025

MY GLORIOUS HORRORCODE

    // if (typingUsersArray.length > 0) {
    return (
        <Tooltip text={tooltipText!}>
            {props => (
                <div className="vc-typing-indicator" {...props}>
                    {((settings.store.indicatorMode & IndicatorMode.Avatars) === IndicatorMode.Avatars) && (
                        <div
                            onClick={e => {
                                e.stopPropagation();
                                e.preventDefault();
                            }}
                            onKeyPress={e => e.stopPropagation()}
                        >
                            <UserSummaryItem
                                users={typingUsersArray.map(id => UserStore.getUser(id))}
                                guildId={guildId}
                                renderIcon={false}
                                max={3}
                                showDefaultAvatarsForNullUsers
                                showUserPopout
                                size={16}
                                className={typingUsersArray.length > 0 ? "vc-typing-indicator-avatars" : ""}
                            />
                        </div>
                    )}
                    {((settings.store.indicatorMode & IndicatorMode.Dots) === IndicatorMode.Dots) && typingUsersArray.length > 0 && (
                        <div className="vc-typing-indicator-dots">
                            <ThreeDots dotRadius={3} themed={true} />
                        </div>
                    )}
                </div>
            )}
        </Tooltip>
    );
    // }

    return null;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants