RocketChat / RocketChat/EmbeddedChat

bug: Tooltip shows trailing space for formatters without keyboard shortcut

Open Beginner friendly
#1,280 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
165
Forks
381
Avg merge
1d 2h
Merged PRs (30d)
1

Description

Description

Template literal always inserts a space between item.name and the shortcut expression, even when shortcut is empty string

Steps to reproduce
  1. Open packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js around line 219
  2. Tooltip text for 'strike', 'code', and 'multiline' renders as 'strike ', 'code ', 'multiline ' (with trailing space) instead of the bare name
Expected behavior

item.shortcut && (${item.shortcut}) evaluates to '' (empty string) when shortcut is '', but the space separator ${...} is unconditionally included in the template literal, producing a trailing space should be handled correctly.

Actual behavior

Tooltip text for 'strike', 'code', and 'multiline' renders as 'strike ', 'code ', 'multiline ' (with trailing space) instead of the bare name

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/react/src/views/ChatInput/ChatInputFormattingToolbar.js around line 219, where the tooltip text for formatting items is assembled. Check the output for strike, code, and multiline with empty shortcuts; done means each shows only its bare name without a trailing space, while items with shortcuts retain their shortcut text.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
88/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.