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: Update compose placeholder text if recipients are changed. #15937
Conversation
Hello @zulip/server-compose members, this pull request was labeled with the "area: compose" label, so you may want to check it out! |
c287160
to
703a60d
Compare
ddbe1be
to
64b380b
Compare
@Gittenburg Those already get updated when you move to the compose text-area. Started a discussion on czo - https://chat.zulip.org/#narrow/stream/6-frontend/topic/compose.20placeholder.20text/near/957729 |
The PM placeholder also already updates when you focus the textarea. The problem I raise in my issue is that incorrect placeholders are confusing. In my opinion we could also just fix the placeholder to always be "Message" no matter whom / where you send it. That would still be better than having inconsistencies in the UI. |
Hi, I don't think we should add dependencies to the As we have the |
@vinitS101 ping on updating this. |
14efe58
to
00add33
Compare
There was a bug in The final commit is pending some tests, but works as expected (same as the GIF in the first comment). I'll add these tests and also a commit that updates the placeholder text for stream messages when the stream name is update. |
00add33
to
8c298bf
Compare
Added a commit that updates the placeholder text for stream name changes. Also added a GIF of the same to the first comment. |
6cd9f0d
to
33d3136
Compare
@timabbott please review this PR. |
I merged the first commit. @ryanreh99 can you review the @vinitS101 it might help for you to expand that commit's commit message to make clear (1) exactly what the bug was and (2) how you're confident that nothing was relying on the old behavior; it's not obvious to me on a quick look. |
The commit lgtm. The commit title should be renamed to |
…head. Previously, onPillCreate function was called after the individual pill object was created. Now, we call it after creating and adding it to the pill container.
Currently, compose box placeholder text for PMs only gets updated when the focus shifts to it. With this change, the text is now also updated if recipients are added or removed. Fixes zulip#15897.
Compose box placeholder text for streams currently updates when focus is shifted to the text area. With this change, it will also get updated when the stream name is changed (it already updates if topic names are changed).
33d3136
to
02ac463
Compare
Rebased and updated the commit messages to better explain the current and changed behavior. |
Great, merged, thanks @vinitS101! |
onPillCreate: input_pill.onPillCreate, | ||
onPillRemove: input_pill.onPillRemove, |
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.
input_pill.onPillCreate
and input_pill.onPillRemove
don’t exist. (input_pill
is the module, not an instance.) What happened here?
@ryanreh99 @vinitS101 it'd be great if one of you can figure out what the bug was with those |
The placeholder text is now updated every time recipients of Private Messages are changed (added or removed).
Fixes #15897.
GIFs or Screenshots:
For PMs:
EDIT:
For stream messages: