-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
compose: Quote part of a message (Fixes #19712) #21390
Conversation
Hello @zulip/server-compose members, this pull request was labeled with the "area: compose" label, so you may want to check it out! |
7a38608
to
b782236
Compare
Thanks for working on this! I played with the PR, and it mostly worked, but I did come across a case where it did not. When I copied selected just the "topics" file link on http://localhost:9991/#narrow/stream/3-Denmark/topic/LAST.20database.20was.20de-duping.20erratically/near/29, the whole message got quoted. |
Thx, I'm on it.
…On Wed, Mar 16, 2022, 1:31 AM Alya Abbott ***@***.***> wrote:
Thanks for working on this!
I played with the PR, and it mostly worked, but I did come across a case
where it did not. When I copied selected just the "topics" file link on
http://localhost:9991/#narrow/stream/3-Denmark/topic/LAST.20database.20was.20de-duping.20erratically/near/29,
the whole message got quoted.
—
Reply to this email directly, view it on GitHub
<#21390 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABCFYQZLGZKAET44QGDHGDVAFW3PANCNFSM5QPK6TOQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Hmmm, struggling to repro this behavior - sorry to ask, but can you provide a screenshot? Here's what I'm seeing: In that example, quoting code worked: as per design, quotes the complete current message when you try to quote-reply across multiple messages: (note: the highlighting in the screenshots is artificial: I re-selected the text after initiating the quote-reply, for the purposes of showing what I selected... I looked into highlighting as a feature but it gets complicated because the selection can span "into" the middle of a DOM object, and we'd need to carefully insert <span class="highlight" in just the right places... definitely doable, but I figured let's get this feature shipped first and see how people like it, before making the additional investment...) thx! |
7e0e3f6
to
8c03849
Compare
3352e41
to
59c7fa1
Compare
7e60114
to
9e850b0
Compare
f0ef09e
to
6c724e0
Compare
@alya fixed - try it now. I also added support for capturing the selection if the user right-clicks / pulls up the context menu on Chrome/Safari/Brave. Firefox doesn't highlight the last element on right-click. keep 'em coming... |
I also saw some differences in behavior between quote-and-reply with the mouse and quote-and-reply with |
@alya ugh sorry - not sure what happened, but I simplified the code and re-tested the cases:
note: on menu-click, Safari loses focus (blur) and updates the selection to the empty string. I can ignore empty string, but then other blur events (e.g. clicking +invite user) will retain the old selection, which becomes weird when you then reply to a message. We could have Safari only support partial-quoting when using the keyboard (>) but not the menu? |
7d43e5d
to
33d4075
Compare
Fixes #19712
Tested on FF, Chrome and Safari.