Skip to content
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

general chat #2: support sending to empty topic from channel narrow, hide resolve/unresolve conditionally #1364

Open
wants to merge 14 commits into
base: main
Choose a base branch
from

Conversation

PIG208
Copy link
Member

@PIG208 PIG208 commented Feb 19, 2025

Similar to #1297, this PR focuses on part of the general chat feature, with some final "do not merge" commits to make it testable.

This includes the following commits:

  • action_sheet: Hide resolve/unresolve button for empty topic
  • compose: Only show "general chat" after picking the topic
  • compose: Support sending to empty topic
  • compose: Show special topic input hint text for empty topics
  • compose: Show alternative hint text if topic is vacuous and mandatory

The remaining commits should be reviewed in #1297, but neither PR blocks each other, as they each focuses on a specific part of the feature.

Screenshots
mandatory topics non-empty topic content is focused content isn't focused
true mandatory-channel-non-empty mandatory-channel-empty-focused mandatory-channel-empty-non-focused
false non-mandatory-channel-non-empty non-mandatory-channel-empty-focused non-mandatory-channel-empty-non-focused
hide resolve resolve

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
instead of inferring it from a TopicName

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
This helps imply why we don't have the check when displayName is null

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
@PIG208 PIG208 marked this pull request as ready for review February 22, 2025 00:16
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
@PIG208 PIG208 added the maintainer review PR ready for review by Zulip maintainers label Feb 22, 2025
@PIG208 PIG208 requested a review from chrisbobbe February 22, 2025 00:35
@PIG208 PIG208 changed the title general chat #2: support sending to empty topic, hide resolve/unresolve conditionally general chat #2: support sending to empty topic from channel narrow, hide resolve/unresolve conditionally Feb 22, 2025
A test is skipped because the server does not send empty topics to the
client without "empty_topic_name" client capability.

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
This behavior is designed to replace how sending to an empty topic is
effectively sending to "(no topic)". The key difference being that
the `TopicName.apiValue` is actually empty, instead of being converted to
"(no topic)" with `_computeTextNormalized`.

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Previously, "Message #stream > general chat" was the hint text for
content input as long as the topic input is empty and topics are not
mandatory.

Showing the default topic does not help create incentive for the user
to pick a topic first.  So only show it when they intend to leave the
topic empty.

See discussion:
  https://chat.zulip.org/#narrow/channel/530-mobile-design/topic/general.20chat.20design.20.23F1297/near/2088870

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Look for `allow_empty_topic_name` and `empty_topic_name` under "Feature
level 334" in the API Changelog to verify the affected routes:
  https://zulip.com/api/changelog

Fixes: zulip#1250

Signed-off-by: Zixuan James Li <zixuan@zulip.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintainer review PR ready for review by Zulip maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants