docs: Improve documentation of integration screenshot generation.

I have updated the `Documenting an Integration` documentation to be more
accurate on the usage of `tools/generate-integration-docs-screenshot` as
well as the requirement to fill out the `DOC_SCREENSHOT_CONFIG` section
of `zerver/lib/integrations.py` and a few other minor changes.
This commit is contained in:
Adam Birds
2021-03-28 00:18:10 +00:00
committed by Tim Abbott
parent 5c50732008
commit 7493a698f9

View File

@@ -15,8 +15,13 @@ Usually, this involves a few steps:
See [Markdown macros](#markdown-macros) for further details. See [Markdown macros](#markdown-macros) for further details.
* Make sure you've added your integration to * Make sure you've added your integration to
`zerver/lib/integrations.py`; this results in your integration `zerver/lib/integrations.py` in both the `WEBHOOK_INTEGRATIONS`
appearing on the `/integrations` page. section (or `INTEGRATIONS` if not a webhook), and the
`DOC_SCREENSHOT_CONFIG` sections. These registries configure your
integration to appear on the `/integrations` page and make it
possible to automatically generate the screenshot of a sample
message (which is important for the screenshots to be updated as
Zulip's design changes).
* You'll need to add a SVG graphic * You'll need to add a SVG graphic
of your integration's logo under the of your integration's logo under the
@@ -40,12 +45,11 @@ Usually, this involves a few steps:
the screenshot using `tools/generate-integration-docs-screenshot`: the screenshot using `tools/generate-integration-docs-screenshot`:
```sh ```sh
./tools/generate-integration-docs-screenshot \ ./tools/generate-integration-docs-screenshot --integration integrationname
zerver/webhooks/pingdom/fixtures/imap_down_to_up.json
``` ```
If you have trouble using this tool, you can also manually generate the If you have trouble using this tool, you can also manually generate the
screenshot using `send_webhook_fixture_message`. When generating the screenshot using `manage.py send_webhook_fixture_message`. When generating the
screenshot of a sample message using this method, give your test bot a nice screenshot of a sample message using this method, give your test bot a nice
name like "GitHub Bot", use the project's logo as the bot's avatar, and take name like "GitHub Bot", use the project's logo as the bot's avatar, and take
the screenshot showing the stream/topic bar for the message, not just the the screenshot showing the stream/topic bar for the message, not just the