Skip to content

msglist/compose: In interleaved views, anticipate the right "destination narrow" for a reply #493

Open
@chrisbobbe

Description

@chrisbobbe

Contrast with #494, which is about letting the user specify the destination, which is different from anticipating the right one.


Users sometimes want to reply directly from an interleaved view, like a whole-stream view or the "All messages" view.

If the user hasn't already chosen a destination narrow by interacting with the compose box, we should anticipate what destination they might have in mind, and set the compose box accordingly, for example by prefilling the topic input.

A "destination narrow" is a conversation, and every message is in a conversation. So as long as there is at least one message in the interleaved view, there's at least one destination narrow that we might anticipate.

As a concrete example, we could store a pointer to the last message that's visible onscreen, if any, and update it as necessary. (Reasons for updating it include changes in scroll position; changes in which messages are included in the list; changes in the height of onscreen messages, whether from message edits or display-setting changes; there may be more reasons.) Then when we render the compose box, except when the user is already composing, we check that pointer and set the compose box to that message's conversation, by prefilling the topic input (for stream messages) or the DM recipients (for DMs).


In zulip-mobile, we used to do this in stream views by just choosing the latest message in the window of messages we had loaded. That message was frequently offscreen, and confusion would ensue when someone sent a message with an unintended topic. We addressed that by just never auto-filling the topic input in whole-stream views—

—but that caused unhappiness; people understandably felt it was too effortful to specify the right topic, when the right topic should have been obvious:

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-composeCompose box, autocomplete, attaching files/imagesa-msglistThe message-list screen, except what's label:a-contentbeta feedbackThings beta users have specifically asked for

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions