Skip to content

Update topic input in channel compose box when topic moved #862

Open
@gnprice

Description

@gnprice

This is a followup to #150 / #787. After that issue/PR, when you're looking at a TopicNarrow and the topic gets moved (with PropagateMode.changeAll or PropagateMode.changeLater), we'll update the page's narrow to follow along, and this will also mean that the send button in the compose box will point to the new narrow.

This issue is: If you're looking instead at a ChannelNarrow and you happen to have the moved topic selected in the compose box, then we should also follow along.

  • If the move happened within the channel, we should update the compose box's topic input.
  • If the move was to a different channel… TBD but we should probably switch to either the new TopicNarrow or its surrounding ChannelNarrow. The point is that if you hit send just after the move happens, we want the message to go to the conversation in its new location.

This is a behavior zulip-mobile doesn't have; instead we have a TODO comment (referring to zulip/zulip-mobile#5251):

          } else if (isStreamNarrow(narrow) && streamIdOfNarrow(narrow) === move.orig_stream_id) {
            // A ChatScreen showing the stream that contained the moved messages.
            //
            // TODO(#5251): Update topic input, if it matches.  (If the stream
            //   changed too, unclear what to do.  Possibly change the
            //   screen's narrow, as if narrowed to the moved topic?)
          }
        }

This point was previously described at #787 (comment) .

Related issues:

Metadata

Metadata

Assignees

No one assigned

    Labels

    a-composeCompose box, autocomplete, attaching files/imagesa-msglistThe message-list screen, except what's label:a-content

    Type

    No type

    Projects

    • Status

      No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions