Skip to content

channel [nfc]: Document methods on ChannelStore; expose debugTopicVisibility directly #931

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

Merged
merged 2 commits into from
Sep 9, 2024

Conversation

gnprice
Copy link
Member

@gnprice gnprice commented Sep 7, 2024

These members didn't have docs. They have some nontrivial invariants, so can especially benefit from docs.

Then this arrangement of debugTopicVisibility
follows the pattern we generally use for other members of
ChannelStore and MessageStore, and lets us eliminate the getter
returning a ChannelStoreImpl.

This pattern -- exposing all the data as members directly on the
overall PerAccountStore, delegating to the underlying channel store
and message store as needed -- is convenient because it means that
code consuming the store doesn't have to worry about which sub-area
of the store we've organized a given piece of data into: it's all
just methods on the store.

Noticed this was here while reviewing a PR that included a new
similar deviation from this pattern (/cc @PIG208):
#909 (comment)

This follows the pattern we generally use for other members of
ChannelStore and MessageStore, and lets us eliminate the getter
returning a ChannelStoreImpl.

This pattern -- exposing all the data as members directly on the
overall PerAccountStore, delegating to the underlying channel store
and message store as needed -- is convenient because it means that
code consuming the store doesn't have to worry about which sub-area
of the store we've organized a given piece of data into: it's all
just methods on the store.

Noticed this was here while reviewing a PR that included a new
similar deviation from this pattern:
  zulip#909 (comment)
@gnprice gnprice added the maintainer review PR ready for review by Zulip maintainers label Sep 7, 2024
@gnprice gnprice requested a review from chrisbobbe September 7, 2024 04:21
@chrisbobbe
Copy link
Collaborator

Thanks, LGTM! Merging.

@chrisbobbe chrisbobbe merged commit db7324b into zulip:main Sep 9, 2024
1 check passed
@gnprice gnprice deleted the pr-channel-store branch September 9, 2024 20:20
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