RocketChat / RocketChat/Rocket.Chat

Channel Announcement Display Issue with Empty Spaces

Open
#31,607 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

When setting the channel description and announcement/description/topic in Rocket Chat, an issue arises where if we only put empty spaces, then also it displays an empty announcement. This behavior is unexpected, as it should not consider leading or trailing empty spaces in determining the content of the announcement/description/topic.

Steps to reproduce:
  1. Click on any channel > Room information > edit room
  2. Add some empty space in announcement and save
Expected behavior:

It should disregard leading and trailing empty spaces when displaying channel announcements/description/topic. The announcement/description/topic should not be visible if there are only empty spaces within the content.

Actual behavior:

If we put only empty spaces in any one annoucement/description/topic, then also it displays an empty field

Server Setup Information:
  • Version of Rocket.Chat Server: 6.6.0
  • Operating System: MacOs
  • NodeJS Version: 14.21.3
  • MongoDB Version: 6.0.3
Client Setup Information
  • Desktop App or Browser Version: Chrome 121
  • Operating System: MacOs
Additional context

https://github.com/RocketChat/Rocket.Chat/assets/125182653/19c28e92-8bb3-4db4-89a9-e1257ada1388

Contributor guide

Open the contributing guide

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

Reproduce the issue through a channel's Room information and edit room flow by saving spaces in the announcement, description, or topic fields. Trace the channel display path from that flow and verify the behavior for whitespace-only content and content with surrounding spaces. Done means whitespace-only fields are not displayed as announcements, descriptions, or topics.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.