-
-
Notifications
You must be signed in to change notification settings - Fork 171
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
refactor: unify "Select Chat": use one component #4440
Conversation
This commit does not compile. This is a preparation for the unification of the "Select Chat" dialogs. The rename is performed in a separate commit to preserve git history. ForwardMessage is the oldest such "Select Chat" dialog, from which apparently all the other ones were copy-pasted.
9d87f02
to
23461f2
Compare
For: - webxdc `sendToChat()` - mailto dialog - "Forward Message" dialog What this commit comes down to: - Take the ForwardTo dialog and use it to create a more generic, reusable SelectChat dialog. - Make those similar dialogs use the new SelectChat component, instead of defining their markup and logic manually. The dialogs have practically the same markup and the same search logic, with very little differences. They apparently were copy-pasted from `ForwardMessage` dialog, which is the oldest of them all. It's getting pretty annoying to maintain them, with all the `RovingTabindex` and `InfiniteLoader`, so, it's about time to unify them. This is mainly a refactor, but causes a few small visual changes. For example, this fixes a small visual bug in the `WebxdcSendToChat` dialog where the search field takes full height when there are no search results.
23461f2
to
8ad414e
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.
Reviewed by testing & reading
@Simon-Laux Could you please see if you agree with the general idea of this MR? |
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.
Good idea. removing code without removing functionality is always good 👍
#3030 would affect all 3 dialogs, so having only one place to add contacts to is also nice for that.
For:
sendToChat()
What this commit comes down to:
a more generic, reusable SelectChat dialog.
instead of defining their markup and logic manually.
The dialogs have practically the same markup and the same
search logic, with very little differences.
They apparently were copy-pasted from
ForwardMessage
dialog,which is the oldest of them all.
It's getting pretty annoying to maintain them, with all the
RovingTabindex
andInfiniteLoader
, so, it's about timeto unify them.
This is mainly a refactor, but causes a few small visual changes.
For example, this fixes a small visual bug
in the
WebxdcSendToChat
dialogwhere the search field takes full height
when there are no search results.