Skip to content

feat(reactions): Show emoji names on reactions hover - #20088

Open
nickvergessen wants to merge 2 commits into
mainfrom
feat/noid/reaction-emoji-names
Open

nickvergessen wants to merge 2 commits into
mainfrom
feat/noid/reaction-emoji-names

Conversation

@nickvergessen

@nickvergessen nickvergessen commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

Assisted-by: ClaudeCode:claude-opus-5-5

☑️ Resolves

  • Fix ???

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

🖼️ Screenshots / Screencasts

🏚️ Before 🏡 After
Emoji-only message Bildschirmfoto vom 2026-10-31 11-31-27
Reaction on message
Might need a bit more fine tuning with long names
Bildschirmfoto vom 2026-10-31 11-31-36
Reaction menu Bildschirmfoto vom 2026-10-31 11-35-00
  • Inline message emojis were skipped for now:

    Emojis inside normal message text (hard): the text is rendered by NcRichText as markdown. To show a name on hover, each emoji would need its own around it, which would have to be done inside NcRichText (upstream) or by post-processing its output. That's real work and risks breaking the rendering.

🏁 Checklist

  • 🌏 Tested with different browsers / clients:
    • Chromium (Chrome / Edge / Opera / Brave)
    • Firefox
    • Safari
    • Talk Desktop
    • Integrations with Files sidebar and other apps
    • Not risky to browser differences / client
  • 🖌️ Design was reviewed, approved or inspired by the design team
  • ⛑️ Tests are included or not possible
  • 📗 User documentation in https://github.com/nextcloud/documentation/tree/master/user_manual/talk has been updated or is not required

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Joas Schilling <coding@schilljs.com>
@ShGKme

This comment was marked as off-topic.

</template>

<div v-if="hasReactionsLoaded" class="reaction-details">
<span v-if="getEmojiTitle(reaction)" class="reaction-details__name">{{ getEmojiTitle(reaction) }}</span>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Template shouldn't call functions in general:

  • By design, it declares the result, not compute it. We don't control when and how this code is executed and only provide to the renderer rendering result declaration
  • Functions may have side effects (appearing uncontrolled) of performance impacting entire rendering, blocking the thread

That's fine for small utils or formatting functions.

But getEmojiTitle is extremely low-performant function in the worst case due to EmojiIndex build, if it is the first run. We cannot guarantee, this call won't block entire app render for a second.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The best is to support async getEmojiTitle. Then it would support performant versions of the emoji functions when we refactor them.

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.

I tried that, but was not able to understand the resulting code in Talk anymore, with watchers being added to monitor the async responses and so on.
If that is really required someone needs to take over.

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.

I updated the Agetns.md with that hint never the less

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If that is really required someone needs to take over.

To check if that's needed you can:

  1. Check the first function call performance on the library side (so no other calls affect the result). If it's around 1 frame time (e.g. 10-20ms) - it is not a problem.
  2. Check the same in spreed specifically. If the first getEmojiTitle call is fast, then we lost this time somewhere earlier already. In this case this function will only create a problem when we fix the existing one.

@ShGKme

ShGKme commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

To have green CI and manual testing PR without local npm link, you can:

  1. In the library npm run build && npm pack
  2. In the app install built library npm i ../path/to/nextcloud-vue/nextcloud-vue-v9.x.x.tz
  3. Commit (can be removed after library is released and bumped)

@ShGKme

ShGKme commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor
🏚️ Before 🏡 After
Reaction on message
Might need a bit more fine tuning with long names Bildschirmfoto vom 2026-10-31 11-31-36

And we need to fix the cut name

@ShGKme

ShGKme commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

And we need to fix the cut name

To .reaction-details add overflow-wrap: anywhere;

@nickvergessen

Copy link
Copy Markdown
Member Author

I'm unsure I get what problem is being solved.

Having reactions on your message and not being able to identify them

@nickvergessen

Copy link
Copy Markdown
Member Author

Could you confirm, this is checked correct?

I checked it because from my POV there is nothing to clarify with Design and Nimisha is out for now

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Joas Schilling <coding@schilljs.com>
@Antreesy

Copy link
Copy Markdown
Contributor

I would also expect NewMessage field and NcEmojiPicker to show such hints, but not the chat area and reactions popup. Other thing if we need that to be in aria-label for a11y?

@ShGKme

ShGKme commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Other thing if we need that to be in aria-label for a11y?

In theory, if the title represents the content (the same that we would put to aria-label and not an additional hint/description), we don't need it. Screen readers will use it as a label.

However, during BITV Test it was required to have aria-labels even if there is a title. If I remember that correctly.

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

Labels

AI assisted This PR contains AI-assisted commits enhancement feature: chat 💬 Chat and system messages feature: frontend 🖌️ "Web UI" client feature: reactions 👍 papercut

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants