Fixes #1216, #1233 Adds view_closed docs and other minor fixes#1236
Merged
seratch merged 7 commits intoslackapi:mainfrom Dec 10, 2021
wongjas:jwong_fix_1216_add_view_closed
Merged
Fixes #1216, #1233 Adds view_closed docs and other minor fixes#1236seratch merged 7 commits intoslackapi:mainfrom wongjas:jwong_fix_1216_add_view_closed
seratch merged 7 commits intoslackapi:mainfrom
wongjas:jwong_fix_1216_add_view_closed
Conversation
2 tasks
Codecov Report
@@ Coverage Diff @@
## main #1236 +/- ##
=======================================
Coverage 73.22% 73.22%
=======================================
Files 17 17
Lines 1438 1438
Branches 431 431
=======================================
Hits 1053 1053
Misses 300 300
Partials 85 85 Continue to review full report at Codecov.
|
seratch
suggested changes
Dec 7, 2021
docs/_basic/ja_listening_modals.md
Outdated
| <a href="https://api.slack.com/reference/block-kit/views">モーダルのペイロード</a>が入力のブロックを含む場合、その入力値を受け取るために `view_submission` のリクエストをリッスンする必要があります。`view_submission` リクエストをリッスンするためには、組み込みの `view()` メソッドを使用します。 | ||
|
|
||
| `view()` メソッドは、文字列型または `RegExp` 型 の `callback_id` を必要とします。 | ||
| `view` メソッドを使ってユーザーからのインタラクションをリッスンすることができます。 |
Contributor
There was a problem hiding this comment.
It seems that interaction here is the one with views. The current translation does not include the part.
Suggested change
| `view` メソッドを使ってユーザーからのインタラクションをリッスンすることができます。 | |
| `view` メソッドを使うと、ユーザーのビューとのインタラクションをリッスンすることができます。 |
docs/_basic/ja_listening_modals.md
Outdated
| `view` メソッドを使ってユーザーからのインタラクションをリッスンすることができます。 | ||
|
|
||
| `input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | ||
| `view_submission` リクエストは、アプリが開いたモーダルでユーザーが Submit ボタンを押したときに発生します。`input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 |
Contributor
There was a problem hiding this comment.
Suggested change
| `view_submission` リクエストは、アプリが開いたモーダルでユーザーが Submit ボタンを押したときに発生します。`input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | |
| ユーザーがモーダルからデータ送信したとき、Slack から `view_submission` のリクエストが送信されます。送信された `input` ブロックの値は `state` オブジェクトから取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 |
docs/_basic/ja_listening_modals.md
Outdated
|
|
||
| `input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | ||
| `view_submission` リクエストは、アプリが開いたモーダルでユーザーが Submit ボタンを押したときに発生します。`input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | ||
| モーダルでの `notify_on_close` プロパティが `true` に設定した場合、ユーザーが Close ボタンを押すと Slack は `view_closed` リクエストも送信します。 より詳細な情報は以下の **モーダルを閉じるときのハンドリング** を参照してください。 |
Contributor
There was a problem hiding this comment.
Suggested change
| モーダルでの `notify_on_close` プロパティが `true` に設定した場合、ユーザーが Close ボタンを押すと Slack は `view_closed` リクエストも送信します。 より詳細な情報は以下の **モーダルを閉じるときのハンドリング** を参照してください。 | |
| モーダルでの `notify_on_close` プロパティを `true` に設定した場合、ユーザーが Close ボタンを押したときに Slack から `view_closed` リクエストが送信されます。 より詳細な情報は以下の **モーダルを閉じるときのハンドリング** を参照してください。 |
docs/_basic/ja_listening_modals.md
Outdated
| `input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | ||
| `view_submission` リクエストは、アプリが開いたモーダルでユーザーが Submit ボタンを押したときに発生します。`input` ブロックの値は `state` オブジェクトを参照することで取得できます。`state` 内には `values` というオブジェクトがあり、これは `block_id` と一意な `action_id` に紐づける形で入力値を保持しています。 | ||
| モーダルでの `notify_on_close` プロパティが `true` に設定した場合、ユーザーが Close ボタンを押すと Slack は `view_closed` リクエストも送信します。 より詳細な情報は以下の **モーダルを閉じるときのハンドリング** を参照してください。 | ||
| `view_submission` リクエストあるいは `view_closed` リクエストをリッスンするためには、組み込みの `view()` メソッドを使用します。 |
Contributor
There was a problem hiding this comment.
Suggested change
| `view_submission` リクエストあるいは `view_closed` リクエストをリッスンするためには、組み込みの `view()` メソッドを使用します。 | |
| `view_submission` や `view_closed` リクエストをリッスンするには、組み込みの `view()` メソッドを使用できます。 |
docs/_basic/ja_listening_modals.md
Outdated
| モーダルでの `notify_on_close` プロパティが `true` に設定した場合、ユーザーが Close ボタンを押すと Slack は `view_closed` リクエストも送信します。 より詳細な情報は以下の **モーダルを閉じるときのハンドリング** を参照してください。 | ||
| `view_submission` リクエストあるいは `view_closed` リクエストをリッスンするためには、組み込みの `view()` メソッドを使用します。 | ||
|
|
||
| `view()` メソッドは、文字列型または `RegExp` 型の `callback_id` を必要とします。あるいは、 `type` と `callback_id` を用いた制約付きオブジェクトを必要とします。 |
Contributor
There was a problem hiding this comment.
Suggested change
| `view()` メソッドは、文字列型または `RegExp` 型の `callback_id` を必要とします。あるいは、 `type` と `callback_id` を用いた制約付きオブジェクトを必要とします。 | |
| `view()` メソッドでは、文字列か正規表現の `callback_id` の指定が必要です。`type` と `callback_id` を含む制約付きオブジェクトを渡すこともできます。 |
docs/_basic/ja_listening_modals.md
Outdated
|
|
||
| ##### モーダルを閉じるときのハンドリング | ||
|
|
||
| 💡 `view_closed` リクエストをリッスンするとき、`callback_id` と `type: 'view_closed'` を含んだオブジェクトを指定することが必要とします。以下の例を参照してください。 |
Contributor
There was a problem hiding this comment.
Suggested change
| 💡 `view_closed` リクエストをリッスンするとき、`callback_id` と `type: 'view_closed'` を含んだオブジェクトを指定することが必要とします。以下の例を参照してください。 | |
| 💡 `view_closed` リクエストをリッスンするとき、`callback_id` と `type: 'view_closed'` を含むオブジェクトの指定が必要です。以下の例を参照してください。 |
docs/_basic/ja_listening_modals.md
Outdated
|
|
||
| 💡 `view_closed` リクエストをリッスンするとき、`callback_id` と `type: 'view_closed'` を含んだオブジェクトを指定することが必要とします。以下の例を参照してください。 | ||
|
|
||
| `view_closed` についてより詳細な情報は [API ドキュメント](https://api.slack.com/surfaces/modals/using#modal_cancellations)を参照してください。 |
Contributor
There was a problem hiding this comment.
Suggested change
| `view_closed` についてより詳細な情報は [API ドキュメント](https://api.slack.com/surfaces/modals/using#modal_cancellations)を参照してください。 | |
| `view_closed` に関するより詳細な情報は [API ドキュメント](https://api.slack.com/surfaces/modals/using#modal_cancellations)を参照してください。 |
docs/_basic/ja_listening_modals.md
Outdated
| app.view({ callback_id: 'view_b', type: 'view_closed' }, async ({ ack, body, view, client }) => { | ||
| // view_closed リクエストの確認 | ||
| await ack(); | ||
| // close リクエストに何らかの処理 |
Contributor
There was a problem hiding this comment.
Suggested change
| // close リクエストに何らかの処理 | |
| // close リクエストについて何らかの処理 |
10 tasks
seratch
approved these changes
Dec 10, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1216, #1233.
Requirements (place an
xin each[ ])