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

api-docs: Update descriptive text for stream to channel rename. #30140

Merged
merged 45 commits into from
May 20, 2024

Conversation

laurynmm
Copy link
Collaborator

Updates the API documentation to use "channel" in descriptive text, instead of "stream". This is in keeping with how we use "organization" instead of "realm" in descriptive text in our user-facing documentation.

See relevant CZO conversations:

Before changes:

$ git grep -i stream zerver/ | wc -l
14467
$ git grep -i stream zerver/openapi/ | wc -l
1328
$ git grep -i stream zerver/openapi/zulip.yaml | wc -l
1130
$ git grep -i stream api_docs/ | wc -l
255

After changes:

$ git grep -i stream zerver/ | wc -l
13788
$ git grep -i stream zerver/openapi/ | wc -l
653
$ git grep -i stream zerver/openapi/zulip.yaml | wc -l
455
$ git grep -i stream api_docs/ | wc -l
205

Notes:

  • Does not update the operationID of any of the endpoints documented in zerver/openapi/zulip.yaml. These are used for the API documentation URLs, so we'll need to create URL redirects for the existing ones when we do make those updates.
  • Does not update existing API changelog entries, but does update Changes notes related to those entries in zerver/openapi/zulip.yaml since those are in the descriptions that are being updated here.

Example screenshots:

Get subscribed channels

Current documentation
Screenshot from 2024-05-20 16-38-07

Get all channels

Current documentation
Screenshot from 2024-05-20 16-38-23

Get channel ID

Current documentation
Screenshot from 2024-05-20 16-38-47


Self-review checklist
  • Self-reviewed the changes for clarity and maintainability
    (variable names, code reuse, readability, etc.).

Communicate decisions, questions, and potential concerns.

  • Explains differences from previous plans (e.g., issue description).
  • Highlights technical choices and bugs encountered.
  • Calls out remaining decisions and concerns.
  • Automated tests verify logic where appropriate.

Individual commits are ready for review (see commit discipline).

  • Each commit is a coherent idea.
  • Commit message(s) explain reasoning and motivation for changes.

Completed manual review and testing of the following:

  • Visual appearance of the changes.
  • Responsiveness and internationalization.
  • Strings and tooltips.
  • End-to-end functionality of buttons, interactions and flows.
  • Corner cases, error conditions, and easily imagined bugs.

Updates `.md` files in api_docs/ to use "stream" instead of "channel"
for descriptive text, with the exception of the API changelog file.

Part of stream to channel rename project.
Updates description's in /api/get-events to use channel instead
of stream.

Note that any shared schemas used for this endpoint's documentation
will be updated in other commits in this series.

Part of stream to channel rename project.
Updates field descriptions in schema components and parameters to
use channel instead of stream.

Part of stream to channel rename project.
Updates the API documentation for the /get_stream_id endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API documentation for the /mark_stream_as_read endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API documentation for the /mark_topic_as_read endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API documentation for the POST /drafts endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API documentation for the POST /scheduled_message endpoint
to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /scheduled_messages/{scheduled_message_id}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /default_streams endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for DELETE /default_streams endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /messages endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /messages endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /messages/{message_id}/history endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /messages/flags endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /messages/matches_narrow endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /messages/{message_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /users/me/{stream_id}/topics endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for DELETE /users/me/subscriptions endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /users/me/subscriptions/muted_topics
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /user_topics endpoint to use channel in
descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /users/me/muted_users/{muted_user_id} endpoint
to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /users/{user_id}/subscriptions/{stream_id}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for DELETE /realm/emoji/{emoji_name}
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /realm/user_settings_defaults
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /users/me/subscriptions/properties
endpoint to use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /invites endpoint to use channel in
descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /invites/multiuse endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /register endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /server_settings endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /settings endpoint to use channel
in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /streams/{stream_id}/members endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /streams endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for GET /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for DELETE /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for PATCH /streams/{stream_id} endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /streams/{stream_id}/email_address endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /streams/{stream_id}/delete_topic endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for POST /typing endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
Updates the API doc for /calls/bigbluebutton/create endpoint to
use channel in descriptions instead of stream.

Part of the stream to channel rename project.
@zulipbot
Copy link
Member

Hello @zulip/server-api members, this pull request was labeled with the "area: documentation (api and integrations)" label, so you may want to check it out!

@@ -678,7 +678,7 @@ paths:
"subscriptions":
[
{
"name": "test_stream",
"name": "test",
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I'm not sure I like either test_stream or test for this sort of thing - but test_channel would be better for just making clear this is expected to be a channel name.

only for personal properties like `is_muted` or `pin_to_top`.
See the [stream update event](/api/get-events#stream-update)
for updates to global properties of a stream.
See the [`stream op: update` event](/api/get-events#stream-update)
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

Is the space after op: intentional? Anyway I think the colloquial "channel update event" feels better than trying to encode the event type in that format, given that we've got a link at least.

- 3 = Only [full members][calc-full-member] can use wildcard mentions in large channels.
- 5 = Only organization administrators can use wildcard mentions in large channels.
- 6 = Nobody can use wildcard mentions in large channels.
- 7 = Only organization administrators and moderators can use wildcard mentions in large channels.
Copy link
Sponsor Member

Choose a reason for hiding this comment

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

I'm glad we'll be removing this style of enum-based labels in favor of the new groups-based system; this documentation is just such a mess.

@timabbott timabbott merged commit f39e4e8 into zulip:main May 20, 2024
7 checks passed
@timabbott
Copy link
Sponsor Member

I posted a couple of minor comments that can potentially be addressed as follow-ups. Merged, thanks for the very organized and readable PR @laurynmm!

As a note on the operationIDs, we'll ideally want to rename with backwards-compatibility the functions in the python-zulip-api library in preparation for that sort of transition.

@laurynmm laurynmm deleted the stream-to-channel-project-api-docs branch May 21, 2024 10:14
@laurynmm
Copy link
Collaborator Author

I think we'll also want to check with the official clients about the operationIDs also. I have a vague memory that the mobile client might look at those or reference them some how, but I'm not 100% sure on that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants