bug: Tooltip shows trailing space for formatters without keyboard shortcut
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- javascript, react
- Domain
- frontend
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.
Description
Description
Template literal always inserts a space between item.name and the shortcut expression, even when shortcut is empty string
Steps to reproduce
- Open
packages/react/src/views/ChatInput/ChatInputFormattingToolbar.jsaround line 219 - 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
- Dominant language
- JavaScript
- Stars
- 165
- Forks
- 381
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from RocketChat/EmbeddedChat
-
enhancement
Difficulty 1/5 Under an hour Newbie friendliness 84/100
RocketChat/EmbeddedChat#1360 · 1 comment ·
-
Permissions change-detection in useFetchChatData is dead — applyPermissions re-runs on every call Open
Difficulty 1/5 Under an hour Newbie friendliness 85/100
RocketChat/EmbeddedChat#1317 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
RocketChat/EmbeddedChat#1315 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RocketChat/EmbeddedChat#1313 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
RocketChat/EmbeddedChat#1294 ·
All issues in RocketChat/EmbeddedChat
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·