Skip to content

Conversation

@chungwwei
Copy link
Contributor

@chungwwei chungwwei commented Oct 30, 2025

Ingest String topics_policy field. Will be used to hide the topic input in the general-chat-only channel.

Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Comments below.

Also, some commit-message nits:

api: Add ZulipStream.TopicsPolicy

Ingest String `topics_policy` field. The field can take be one of 4
possible values, inherit, allow_empty_topic, disable_empty_topic,
and empty_topic_only. Enum TopicsPolicy is created for these four
values.

Fixes: https://github.com/zulip/zulip-flutter/issues/1604
  • ZulipStream.TopicsPolicy doesn't refer to anything that exists; instead, say ZulipStream.topicsPolicy (referring to the field) or TopicsPolicy (referring to the enum).
  • The paragraph ("Ingest String…") just repeats what's already clear and expected in the diff; let's remove it, so there's less we need to read through.
  • This work is a prerequisite for #1604 (making the data available to the app), but I'd like to keep #1604 open for the work of actually using the data in the compose-box UI code. So let's remove the "Fixes" line.

@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Oct 31, 2025
@chungwwei chungwwei force-pushed the ingest-topics-policy branch 2 times, most recently from 7cffea4 to 17fca1c Compare November 3, 2025 03:12
@chungwwei chungwwei changed the title api: Add ZulipStream.TopicsPolicy api: Add ZulipStream.topicsPolicy Nov 3, 2025
@chungwwei chungwwei force-pushed the ingest-topics-policy branch from 17fca1c to 02b5b4d Compare November 3, 2025 03:25
@chrisbobbe
Copy link
Collaborator

I see you've pushed changes; please comment here when this is ready for another review.

@chungwwei chungwwei force-pushed the ingest-topics-policy branch from 02b5b4d to 22cdda8 Compare November 3, 2025 23:57
@chungwwei chungwwei requested a review from chrisbobbe November 4, 2025 00:18
@chungwwei
Copy link
Contributor Author

Thanks for reviewing before! It's ready for another round.

@chrisbobbe chrisbobbe self-assigned this Nov 4, 2025
Copy link
Collaborator

@chrisbobbe chrisbobbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just one nit below.

Comment on lines 784 to 786
static TopicsPolicy fromRawString(String raw) => _byRawString[raw] ?? inherit;

static final _byRawString = _$TopicsPolicyEnumMap.map((key, value) => MapEntry(value, key));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's call these fromApiValue and _byApiValue.

@chrisbobbe
Copy link
Collaborator

I've also removed the "Fixes:" line from the PR description, for the same reason I mentioned above in #1956 (review).

@chungwwei chungwwei force-pushed the ingest-topics-policy branch from 22cdda8 to 6639351 Compare November 4, 2025 06:43
@chungwwei chungwwei requested a review from chrisbobbe November 4, 2025 07:06
Enum TopicsPolicy is created for these four values: inherit,
allow_empty_topic, disable_empty_topic, and empty_topic_only.
@chungwwei chungwwei force-pushed the ingest-topics-policy branch from 6639351 to afc7562 Compare November 5, 2025 01:27
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.

3 participants