-
Notifications
You must be signed in to change notification settings - Fork 10.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMPROVE] Added auto-focus for better user-experience. #19954
Conversation
Can anyone help me to solve failed check? |
Please review! :) |
client/views/room/contextualBar/RoomMembers/List/RoomMembers.js
Outdated
Show resolved
Hide resolved
@Darshilp326 left few comments :) |
@MartinSchoeler Please review :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Darshilp326 unfortunately this pull request is still not ideal, firstly because this will hardcode the autofocus on components that are used in other parts of Rocket.Chat, and this can lead to unwanted behaviors. Second, the native autofocus prop has it's limitations, so my suggestion would be to use our useAutoFocus
hook for that.
I've created a pull request fixing only the directory screen, it should serve as a good example/base for the other elements that you are trying to add autofocus.
Here is the Pull Request #20509
Feel free to contact me if you have any questions about my implementation.
Looking forward to see the new changes. Thanks!
@MartinSchoeler Okay got your point! I will be making new changes to this pr:) |
5384a37
to
151e28b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me now!
Proposed changes (including videos or screenshots)
Issue(s)
Closes #19378
While sending file message there is no focus on upload file modal.
While opening contexual-bar options like threads,discussions,members no focus in search bars.
Steps to test or reproduce
Untitled_.Dec.23.2020.10_57.PM.mp4
Untitled_.Dec.23.2020.11_01.PM.mp4
Further comments