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

docs: show descriptions of function listener arguments #2364

Merged
merged 2 commits into from
Dec 11, 2024

Conversation

zimeg
Copy link
Member

@zimeg zimeg commented Dec 11, 2024

Summary

This PR adds another column to the "Listener function arguments" section of documentation to reveal a column hidden from the build! 📚 ✨

Preview

Before changes

before

After changes

after

Reviewers

Build these changes and inspect the following links:

$ npm run start
$ open http://localhost:3000/bolt-js/reference#listener-function-arguments
$ npm run start -- --locale ja-jp
$ open http://localhost:3000/bolt-js/ja-jp/reference#listener-function-arguments

Requirements

@zimeg zimeg added docs M-T: Documentation work only semver:patch labels Dec 11, 2024
@zimeg zimeg added this to the 4.1.2 milestone Dec 11, 2024
@zimeg zimeg requested review from seratch, lukegalbraithrussell and a team December 11, 2024 01:56
@zimeg zimeg self-assigned this Dec 11, 2024
Copy link

codecov bot commented Dec 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.59%. Comparing base (73bd49e) to head (374e87e).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2364   +/-   ##
=======================================
  Coverage   92.59%   92.59%           
=======================================
  Files          36       36           
  Lines        7472     7472           
  Branches      653      653           
=======================================
  Hits         6919     6919           
  Misses        545      545           
  Partials        8        8           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member Author

@zimeg zimeg left a comment

Choose a reason for hiding this comment

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

📝 Quick note on a confusion I had while making these changes!

@@ -39,15 +39,15 @@ There are a collection of constraint objects that some methods have access to. T
### Listener function arguments
Listener functions have access to a set of arguments that may change based on the method which the function is passed to. Below is an explanation of the different arguments. The below table details the different arguments and the methods they'll be accessible in.

| Argument | Description |
| :--- | :--- |
| Argument | Method | Description |
Copy link
Member Author

Choose a reason for hiding this comment

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

🤔 The language is a bit confusing here for me... I had "listener" at first, but the other sections describe this column as a "method".

I believe "method" is right after some thinking? As I understand, "listeners" are actually "listener functions" and these are the functions that are called for certain methods. I'd love to learn more nuance on this though!

Copy link
Member

Choose a reason for hiding this comment

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

A sentense like "payload is available for all app.* listeners" makes sense to me, so I don't see issues with "Listener" here. Also, the last two rows actually have "All listeners" for the column. That said, "method" works too and it should be understood as well, so I don't have strong opinions on the naming, but personally I am down "Listener" here.

Copy link
Member Author

@zimeg zimeg Dec 11, 2024

Choose a reason for hiding this comment

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

Thanks! This is helpful and I'm glad to know both can make sense. I think that (and the use of "all listeners" below) was confusing me most 😉

I'll update this to "Listener" to avoid causing confusion within these tables!

Copy link
Member

@seratch seratch left a comment

Choose a reason for hiding this comment

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

Either "listener" or "method" works for me! but left comments on the topic

@@ -39,15 +39,15 @@ There are a collection of constraint objects that some methods have access to. T
### Listener function arguments
Listener functions have access to a set of arguments that may change based on the method which the function is passed to. Below is an explanation of the different arguments. The below table details the different arguments and the methods they'll be accessible in.

| Argument | Description |
| :--- | :--- |
| Argument | Method | Description |
Copy link
Member

Choose a reason for hiding this comment

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

A sentense like "payload is available for all app.* listeners" makes sense to me, so I don't see issues with "Listener" here. Also, the last two rows actually have "All listeners" for the column. That said, "method" works too and it should be understood as well, so I don't have strong opinions on the naming, but personally I am down "Listener" here.

@@ -37,15 +37,15 @@ Slack アプリは通常、Slack からのイベント情報を受け取った
### リスナー関数の引数 {#listener-function-arguments}
リスナー関数がアクセスできる引数は、リスナー関数が渡されるメソッドによって決まります。以下の表は、これらの引数の説明です。この表は、それぞれの引数とそれにアクセスできるメソッドの詳細をカバーします。

| 引数 | 説明 |
| :--- | :--- |
| 引数 | メソッド | 説明 |
Copy link
Member

Choose a reason for hiding this comment

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

if you go with "listener", it's "リスナー" in Japanese

@zimeg
Copy link
Member Author

zimeg commented Dec 11, 2024

@seratch Thank you for sharing reassurance in the method vs. listener mixup! And also for the review!! 🙏 ✨

Going to merge this now and see if I can watch that page change in real time 😳

@zimeg zimeg merged commit cff0f2d into main Dec 11, 2024
20 checks passed
@zimeg zimeg deleted the zimeg-docs-function-listener-argument-descriptions branch December 11, 2024 02:17
@lukegalbraithrussell
Copy link
Contributor

if i wasn't already too late, i'd approve this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs M-T: Documentation work only semver:patch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants