RocketChat / RocketChat/Rocket.Chat
Previewer function is not notified of all keystroke events
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I am implementing the previewer function of the slash command. While reading the arguments available in the function, I noticed that the arguments are not updated/notified beyond a certain point.
Steps to reproduce:
- Generate a RC-App and create a class that implements the
ISlashCommand. - Implement the
previewerfunction, and simply get the arguments usingcontext.getArguments(). - Print the arguments to the console (or logs). You will be able to see the arguments instantaneously in the terminal thus I prefer to print to console. Print to console, only if you have a server running on your Local System/Docker.
- Upload the app to the RC server, and test your
/command args.
Expected behavior:
The previewer function should be notified of all changes made to the text field, so that operations can be performed on the latest and intermediate changes.
Actual behavior:
Currently, as mentioned above the previewer function is not notified of all updates made to the text field, even when the user stops writing it doesn't get updated. Which is unexpected and reduces the possibilities of utilizing the previewer function.
Video Demonstration:
https://github.com/RocketChat/Rocket.Chat/assets/37607224/6e4312fe-8c9f-4f4d-8a4f-5f68c3a3f5a8
Server Setup Information:
- Version of Rocket.Chat Server: 6.9.0
- Operating System: Linux
- Deployment Method: Docker
Client Setup Information
- Desktop App or Browser Version: Firefox 127.0
- Operating System: Ubuntu 22.04
Additional context
When I incurred this issue, I looked into other RC apps which utilized the previewer function and one of them was Apps.Giphy however upon testing it locally I was able to conclude it also faces similar issues.
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
Start by reproducing the issue with a Rocket.Chat app implementing ISlashCommand, focusing on the previewer entry point and context.getArguments(). Compare the text field changes with the arguments received by previewer. Done means previewer receives all intermediate and final text updates, including after the user stops typing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100