Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

devtools: Clean up devtools instructions.

Alya Abbott8eab4e0cdd38
diff --git a/templates/zerver/development/dev_help.html b/templates/zerver/development/dev_help.html
index b2befbc8e4e..0c38aab2830 100644
--- a/templates/zerver/development/dev_help.html
+++ b/templates/zerver/development/dev_help.html
@@ -32,10 +32,7 @@
that touches brand new or recently modified features.
</li>
<li>
- <b>Modifying the help center</b>: If you're making changes to
- the help center files, be sure to <b>test</b> and provide
- screenshots in your pull request description. As
- with other code, untested documentation is often buggy.
+ <b>Modifying the help center</b>:
{% include "zerver/development/help_center_instructions_macro.html" %}
</li>
</ul>
diff --git a/templates/zerver/development/dev_tools.html b/templates/zerver/development/dev_tools.html
index 8ec8c68ec54..545fb92af6e 100644
--- a/templates/zerver/development/dev_tools.html
+++ b/templates/zerver/development/dev_tools.html
@@ -1,7 +1,7 @@
{% extends "zerver/portico.html" %}
{% block title %}
-<title>Tools and data sets | Zulip Dev</title>
+<title>Development tools | Zulip Dev</title>
{% endblock %}
{# Login page. #}
@@ -9,16 +9,13 @@
<div class="app flex full-page">
<div id="devtools-page" class="markdown">
- <h1>Useful development URLs</h1>
+ <h1>Development tools</h1>
<p>
- Below is a list of useful tools and data sets available only in the Zulip
- development environment that are often useful when contributing to Zulip.
- Most of these require you to run a command to build/generate the relevant
- content. This table specifies which command to use to update the data served
- by each page (since several of these, like test coverage, require a special
- command to be run to generate the data). Make sure your development server is still running
- when you visit these!
+ This page describes development-specific URLs and commands that may
+ come in handy. Make sure your development server is running when you
+ visit the pages linked below.
</p>
+ <h2>General</h2>
<table class="table table-striped table-rounded table-bordered">
<thead>
<tr>
@@ -29,23 +26,19 @@
</thead>
<tbody>
<tr>
- <td><a href="/coverage/index.html">/coverage/index.html</a></td>
- <td><code>./tools/test-backend --coverage</code></td>
- <td>Backend (Django) test coverage report</td>
+ <td><a href="/devtools/integrations">/devtools/integrations</a></td>
+ <td>None needed</td>
+ <td>Test incoming webhook integrations</td>
</tr>
<tr>
- <td><a href="/node-coverage/index.html">/node-coverage/index.html</a></td>
- <td><code>./tools/test-js-with-node --coverage</code></td>
- <td>Frontend (node) test coverage report</td>
+ <td><a href="/emails">/emails</a></td>
+ <td>None needed</td>
+ <td>View outgoing and example emails.</td>
</tr>
<tr>
<td><a href="/docs/index.html">/docs/index.html</a></td>
<td><code>./tools/build-docs</code></td>
- <td>Developer documentation (ReadTheDocs) built locally</td>
- </tr>
- <tr>
- <td><a href="/emails">/emails</a></td>
- <td>View outgoing and example emails.</td>
+ <td>Developer and production documentation (ReadTheDocs) built locally</td>
</tr>
<tr>
<td><a href="/stats/realm/analytics/">/stats/realm/analytics/</a></td>
@@ -54,65 +47,103 @@
</td>
<td>View the /stats page with some pre-populated data</td>
</tr>
+
+ </tbody>
+ </table>
+ <h2>Design system</h2>
+ <table class="table table-striped table-rounded table-bordered">
+ <thead>
<tr>
- <td><a href="/webpack/5xx.html">/webpack/5xx.html</a></td>
- <td>None needed</td>
- <td>Error 5xx page served by nginx (used when Django is totally broken)</td>
- </tr>
- <tr>
- <td><a href="/errors/404">/errors/404</a></td>
- <td>None needed</td>
- <td>Error 404 page served by Django</td>
- </tr>
- <tr>
- <td><a href="/errors/5xx">/errors/5xx</a></td>
- <td>None needed</td>
- <td>Error 5xx page served by Django</td>
- </tr>
- <tr>
- <td><a href="/accounts/do_confirm/invalid">/accounts/do_confirm/invalid</a></td>
- <td>None needed</td>
- <td>Invalid confirmation link page</td>
- </tr>
- <tr>
- <td><a href="/devtools/integrations">/devtools/integrations</a></td>
- <td>None needed</td>
- <td>Test incoming webhook integrations</td>
+ <th>URL</th>
+ <th>Description</th>
</tr>
+ </thead>
+ <tbody>
<tr>
<td><a href="/devtools/buttons">/devtools/buttons</a></td>
- <td>None needed</td>
<td>Test button styles</td>
</tr>
<tr>
<td><a href="/devtools/banners">/devtools/banners</a></td>
- <td>None needed</td>
<td>Test banner styles</td>
</tr>
<tr>
<td><a href="/devtools/inputs">/devtools/inputs</a></td>
- <td>None needed</td>
<td>Test input styles</td>
</tr>
</tbody>
</table>
+ <h2>Test coverage</h2>
+ <table class="table table-striped table-rounded table-bordered">
+ <thead>
+ <tr>
+ <th>URL</th>
+ <th>Command</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><a href="/coverage/index.html">/coverage/index.html</a></td>
+ <td><code>./tools/test-backend --coverage</code></td>
+ <td>Backend (Django) test coverage report</td>
+ </tr>
+ <tr>
+ <td><a href="/node-coverage/index.html">/node-coverage/index.html</a></td>
+ <td><code>./tools/test-js-with-node --coverage</code></td>
+ <td>Frontend (node) test coverage report</td>
+ </tr>
+ </tbody>
+ </table>
<h2>Useful management commands</h2>
<p>Development-specific <a href="https://zulip.readthedocs.io/en/latest/production/management-commands.html">management commands</a> live in <code>zilencer/management/commands</code>. Highlights include:</p>
<ul>
<li><code>./manage.py populate_db</code>: Rebuilds database. Has options to, for example, create 3K users for testing.</li>
<li><code>./manage.py mark_all_messages_unread</code>: Useful for testing reading messages.</li>
- <li><code>./manage.py create_realm</code>: Add a new realm. Useful for testing onboarding.</li>
- <li><code>./manage.py create_user</code>: Add a new user. Useful for testing onboarding.</li>
<li><code>./manage.py send_zulip_update_announcements</code>: Send <a href="https://zulip.com/help/configure-automated-notices#zulip-update-announcements">Zulip
- update notices</a> drafted in `zerver/lib/zulip_update_announcements.py`.</li>
+ update notices</a> drafted in <code>zerver/lib/zulip_update_announcements.py</code>.</li>
<li><code>./manage.py add_mock_conversation</code>: Add test messages, streams, images, emoji, etc.
- into the dev environment. First edit zilencer/management/commands/add_mock_conversation.py
+ into the dev environment. First edit <code>zilencer/management/commands/add_mock_conversation.py</code>
to add the data you're testing.
</li>
</ul>
<p>We also have
<a href="https://zulip.readthedocs.io/en/latest/development/authentication.html">documentation on testing LDAP, Google &amp; GitHub authentication</a> in the development environment.
</p>
+ <h2>Modifying and running the help center</h2>
+ {% include "zerver/development/help_center_instructions_macro.html" %}
+ <h2>Viewing error pages</h2>
+ <table class="table table-striped table-rounded table-bordered">
+ <thead>
+ <tr>
+ <th>URL</th>
+ <th>Command</th>
+ <th>Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td><a href="/webpack/5xx.html">/webpack/5xx.html</a></td>
+ <td>None needed</td>
+ <td>Error 5xx page served by nginx (used when Django is totally broken)</td>
+ </tr>
+ <tr>
+ <td><a href="/errors/404">/errors/404</a></td>
+ <td>None needed</td>
+ <td>Error 404 page served by Django</td>
+ </tr>
+ <tr>
+ <td><a href="/errors/5xx">/errors/5xx</a></td>
+ <td>None needed</td>
+ <td>Error 5xx page served by Django</td>
+ </tr>
+ <tr>
+ <td><a href="/accounts/do_confirm/invalid">/accounts/do_confirm/invalid</a></td>
+ <td>None needed</td>
+ <td>Invalid confirmation link page</td>
+ </tr>
+ </tbody>
+ </table>
<h2>Connecting to the local PostgreSQL database</h2>
<ul>
<li>
@@ -137,8 +168,6 @@
</ul>
</li>
</ul>
- <h2>Development instructions for help center</h2>
- {% include "zerver/development/help_center_instructions_macro.html" %}
</div>
</div>
diff --git a/templates/zerver/development/help_center_instructions_macro.html b/templates/zerver/development/help_center_instructions_macro.html
index 13857746378..447495c930e 100644
--- a/templates/zerver/development/help_center_instructions_macro.html
+++ b/templates/zerver/development/help_center_instructions_macro.html
@@ -1,3 +1,7 @@
+If you're making changes to the help center files, be sure to <b>test</b> and
+provide screenshots in your pull request description. As with other code,
+untested documentation is often buggy.
+
<ul>
<li>
To run just the help center dev server without
diff --git a/zerver/tests/test_docs.py b/zerver/tests/test_docs.py
index 66cbe0b4ab9..46be9d744d9 100644
--- a/zerver/tests/test_docs.py
+++ b/zerver/tests/test_docs.py
@@ -254,7 +254,7 @@ class DocPageTest(ZulipTestCase):
def test_dev_environment_endpoints(self) -> None:
self._test("/devlogin/", ["Normal users"])
- self._test("/devtools/", ["Useful development URLs"])
+ self._test("/devtools/", ["Development tools"])
self._test("/emails/", ["Manually generate most emails"])
def test_dev_help_default_page_endpoints(self) -> None: