RocketChat / RocketChat/Rocket.Chat
Incorrect data-state
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
Hello!
I found a bug with an incorrect data-state on rocketchat-widget div.
Steps to reproduce:
- When the page with rocketchat is loaded open it up. In localStorage there will be next values:
minimized: false
undocked: false
visible: true
- Press "Expand chat" button. Values in LS:
minimized: false
undocked: true
visible: true
- Close opened window with chat. Values in LS:
minimized: false
undocked: true
visible: true
- Reload the page with F5. Values in LS:
minimized: false
undocked: true
visible: true
Expected behavior:
After "Expand chat" button click "minimized" attr in LS should be set to true. So div with class "rocketchat-widget" should not update it's data-state attr with "opened" value.
Actual behavior:
After page reload rocketchat-widget div updates it's data-state attr with 'opened' value. I suppose it's because of minimized: false value in localStorage. It causes an overlap of some part of the page with an invisible rocketchat-widget div.
Server Setup Information:
- Version of Rocket.Chat Server: 3.6.2
- Operating System: Linux
- Deployment Method: snap/docker/tar/etc
- Number of Running Instances: 1
Client Setup Information
- Browser Version: Chrome 86
- Operating System: Windows 10
Contributor guide
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.
Research direction
Reproduce the issue with the rocketchat-widget div by checking localStorage after expanding, closing, and reloading the chat. Trace how the minimized, undocked, and visible values determine the data-state attribute; done means the post-reload widget state no longer becomes opened when the chat is invisible.
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