Commit Graph

1963 Commits

Author SHA1 Message Date
Yago González bb83486509 i18n: Keep URLs from being translated. 2018-03-04 15:44:12 -08:00
Marco Burstein bdb86f1b5e emoji: Add support for translating emoticons.
Add `translate_emoticons` to `prop_types` and `expected_keys`.
Furthermore, create a emoji-translating Markdown inline pattern.

Also use a JavaScript version of `translate_emoticons` and then use
this function during Markdown previews and as a preprocessor. This
is only needed for previews, because usually emoticon translation
happens on the backend after sending.

Add tests for emoticon translation, a settings UI, and a /help/ page
as well.

Tweaked by tabbott to fix various test failurse as well as how this
handles whitespace, requiring emoticons to not have adjacent
characters.

Fixes #1768.
2018-03-04 15:37:24 -08:00
Eeshan Garg 50a66725a1 json: Ensure consistent formatting in api/fixtures.json.
Now, the fixtures.json file:
* Has all keys sorted alphabetically.
* Has a space after every `:`.

The file was generated using json.dumps with the appropriate
formatting parameters.
2018-03-02 14:10:53 -08:00
Eeshan Garg 393b9eec99 api_docs: Move get-events-from-queue fixture to fixtures.json.
Note that this is one of the few fixtures that isn't tested against
a running server. But it still makes sense to move it to fixtures.json so
that it is rendered with indenting and a space after every `:` by
the api_code_example extension.
2018-03-02 14:10:53 -08:00
Eeshan Garg ea7ce7e0da api docs: Ensure consistent formatting for arguments.json.
Ideally, there should be a space after every `:`.

Note that the JSON isn't displayed as is but is formatted as an
HTML table.
2018-03-02 09:44:17 -08:00
Eeshan Garg ce56ee80e7 api_docs: Document the `POST /api/v1/user_uploads` endpoint.
Fixes #1353.
2018-03-02 09:44:17 -08:00
Utkarsh Patil 0dde559cf7 Uniform color styling for all 'Cancel' buttons.
Change the color of all red Cancel buttons to black. Fixes #8548.
2018-03-02 09:38:13 -08:00
Tim Abbott ff197b209f help: Advertise custom linkification filters better.
Closes #5931, by merging the result of the discussion there.
2018-03-01 21:08:03 -08:00
Lyla Fischer 2692ffd408 user docs: Split sidebar link for change-the-privacy-of-a-stream. 2018-03-01 15:11:05 -08:00
Lyla Fischer 63841f4567 user docs: Add 'See all images in a narrow' to sidebar. 2018-03-01 15:11:05 -08:00
Lyla Fischer 1bd56d416e user docs: Reword sidebar link for mute-a-topic and mute-a-stream. 2018-03-01 15:11:05 -08:00
Weronika Grzybowska 1f52eea0e4 user docs: Document auto-numbering of ordered lists.
Fixes #8246
2018-03-01 12:05:31 -08:00
Tim Abbott fd4aa88046 api: Do paragraphs within bullets with better indentation.
This is necessary to ensure the "Hint" appears indented as part of the
bullet.
2018-03-01 08:21:53 -08:00
Viraat Chandra 9284d32837 docs: Improve consistency and quality of API Documentation. 2018-03-01 08:21:53 -08:00
Vishnu Ks 8152532535 urls: Use /new endpoint for creating new realm.
This is just nicer-looking for potentially nontechnical users than
/create_realm.
2018-02-28 13:47:54 -08:00
Abhishek Sharma b4a6df8547 portico: Fix text overflow on Zulip features page.
This (hackishly) fixes a minor issue in the features page's responsive
design.
2018-02-28 13:07:49 -08:00
Tim Abbott f24c0203fd dev_tools: Add invalid confirmation error page to devtools.
This just makes it a bit easier and more self-service to get to this
category of error pages.
2018-02-28 12:51:19 -08:00
Abhigyan Khaund a75f0aa594 hotkeys: Add "p" to narrow to next unread PM thread.
This works simimlar to the "n" key for next topics.

This commit does a few things:

    * It wires up the hotkey to an existing function
      that could change narrows.
    * It adds documentation.
    * It adds logic to make sure the compose box does
      not open.

@showell helped a bit with the wording of comments here.

Fixes #4874
2018-02-27 07:20:31 -05:00
Eeshan Garg 6ddc0b75ac webhook_md_macros: Stop using transition words.
Transition words make it harder to reuse macros in different
contexts and can lead to unintended errors. Thanks to Rishi
Gupta for suggesting this!
2018-02-24 06:21:02 -05:00
Eeshan Garg 0d39b05cf6 webhooks/beanstalk: Update text and remove screenshots.
This commit:

* Removes the unnecessary screenshot.
* Reorders the instructions and combines them in to 4 steps.
* Improves the contents of the webhook-url-with-bot-email-indented.md
  macro and makes it more consistent with create-bot-construct-url.md.
* Sets the recommended stream name to "commits", since that's what
  the webhook function for Beanstalk expects in
  zerver/webhooks/beanstalk/view.py. This allows us to use the
  create-stream.md macro.
2018-02-24 06:21:02 -05:00
Eeshan Garg e94efe5497 markdown macros: Add create-a-bot-indented macro. 2018-02-24 06:21:02 -05:00
Abhishek Sharma d17bdf19dd portico: Highlight active page's title in navbar on why-zulip page. 2018-02-21 09:02:20 -08:00
Umair Khan d22639717c auth: Redirect to an error page instead of 500.
Previously, we used to raise an exception if the direct dev login code
path was attempted when:

* we were running under production environment.
* dev. login was not enabled.

Now we redirect to an error page and give an explanatory message to the
user.

Fixes #8249.
2018-02-20 22:34:53 -08:00
Eeshan Garg e80609a3e9 api docs: Test sample fixture for invalid stream name error.
This commit adds a test for the sample fixture for when an invalid
stream name is passed to a query that expects a valid stream name
as an argument. This is the case with almost all of our queries
documented under the sidebar heading "Streams".

EDIT: Actually, I was wrong. This payload is highly specific to
get-stream-id, so it shouldn't be a part of common-error-payloads
at all.
2018-02-20 20:03:55 -03:30
Eeshan Garg 9add5bf6a7 api/delete-queue: Test fixture for BAD_EVENT_QUEUE_ID error.
In templates/zerver/api/delete-queue.md, we have a sample fixture
for when the queue_id passed to client.deregister_queue is not
valid or the event queue in question has already been deleted.
This commit tests that fixture.

Note that this error payload is specific to client.deregister_queue.
2018-02-20 14:54:12 -08:00
Eeshan Garg a0818975fb api/create-user: Test fixture for "email already in use" error.
In templates/zerver/api/create-user.md, we have a sample fixture
for when a client attempts to create a user with the same email
as an existing user. This commit adds a test for that fixture.

Note that this error payload is specific to client.create_user
and this error payload isn't generated anywhere else.
2018-02-20 14:54:12 -08:00
Eeshan Garg be0a04f33e api docs: Test sample fixtures for unauthorized_errors_fatal.
This commit adds tests for the sample fixtures for when
unauthorized_errors_fatal is passed to client.add_subscriptions.
2018-02-20 14:54:12 -08:00
Eeshan Garg 806476173f api/add-subscriptions: Test fixture for "already_subscribed".
In templates/zerver/api/add-subscriptions, we have a sample fixture
for when the user being subscribed is already subscribed to a
stream. This commit tests that fixture against a running server.
2018-02-20 14:54:12 -08:00
Eeshan Garg 06bf47d2f5 api docs: Test sample fixture for user not authorized error.
This commit adds tests for the fixture for when a user is not
authorized (perhaps because the query requires the use of admin
privileges) for a particular query.
2018-02-20 14:52:09 -08:00
Eeshan Garg 124c672a7c api docs: Test sample fixture for message edit permission error.
In templates/zerver/api/update-message.md, we have a sample fixture
for when a zulip.Client does not have the permission to update/edit
a particular message. This commit adds a test for that fixture.
Also, tools/test-api now also uses a non-admin client for this test,
which might come in handy in the future.
2018-02-20 14:52:09 -08:00
Eeshan Garg 1c32163bb9 api docs: Test sample fixture for missing request args error.
This commit adds tests for the sample fixture for when a required
request argument is missing. Also, it moves the sample fixture
to common-error-payloads.md, since this is an error payload that
is common to most requests (except the ones that don't take any
arguments).
2018-02-20 14:52:09 -08:00
Eeshan Garg d1a5bbc2a5 api docs: Test sample fixture for invalid PM recipient error.
In templates/zerver/api/private-message.md, we have a sample fixture
for when the email address of the PM's recipient is invalid. This
commit makes sure that fixture is tested against a running server.
2018-02-20 14:52:09 -08:00
Eeshan Garg 93b44a41c5 api docs: Test sample fixture for nonexistent stream error.
In templates/zerver/api/stream-message.md, we have a sample fixture
for when the target stream does not exist. This commit adds a test
for that sample fixture.
2018-02-20 14:52:09 -08:00
Vaida Plankyte 80ff3d8da5 frontend: Reduce opacity of hotkey hints.
This helps these draw a bit less attention.
2018-02-19 11:53:37 -08:00
Vishnu Ks 6664c76a10 signup: Remove old frontend validation of subdomain.
We make request to check availibity of subdomain which also checks the
subdomain for illegal characters.  Duplicating the backend logic in
frontend in this case is thus no longer necessary.
2018-02-19 10:45:17 -08:00
Brock Whittaker 1dbab6496c landing-page: Change "Help Center" => "Why Zulip".
We have a good "Help Center" section in the footer, where a user
may already expect to look for help/support related requests, so
we can replace the navbar spot there with the "Why Zulip" page link.
2018-02-16 12:43:55 -08:00
Eeshan Garg 6206647641 bugdown/api_code_examples: Add support for multiple languages.
This commit modifies the Markdown extension in bugdown/api_code_examples.py
to support rendering code examples in multiple languages by specifying
the language like so:

{generate_code_example(python)|doc.md|example}

This makes us one step closer towards adding support for testable
JavaScript code examples.
2018-02-16 10:07:13 -08:00
Vishnu Ks a46e21ee3e bankruptcy: Add UI widget to mark all messages as read.
This is the natural analog of the similar streams UI feature.

Fixes #7585.
2018-02-15 18:01:03 -08:00
Aditya Bansal 6fce1d7834 template_parser: Add parsing support for self closing tags as per HTML5.
In this commit we add support for some tags which are also called
void-elements according to
http://w3c.github.io/html/syntax.html#void-elements to be parsed by
our template parser and get tagged as singleton_html_tags.

Fixes: #8387.
2018-02-15 17:47:43 -05:00
Rishi Gupta 9449556eff integrations: Add missing instruction to create-a-bot docs macros. 2018-02-13 21:47:39 -03:30
Priscilla 6badac5d33 docs: Add v shortcut to the lightbox article. 2018-02-09 18:02:24 -08:00
Robert Hönig 032cc8497f settings sidebar: Extract bot edit form.
This is the first step in cleaning up the bot edit code.
Since the bot edit form appears dynamically, we remove
it from the static HTML scaffold, of which settings_sidebar
is a part of.
2018-02-09 12:30:03 -08:00
Rhea Parekh 721a241901 slack importer: Update doc about slack user's skype and phone data. 2018-02-09 12:17:10 -08:00
Rhea Parekh 699021e7d8 slack importer: Update Documentation with slack's legacy token method. 2018-02-09 12:17:10 -08:00
Eeshan Garg ac5c355a60 api/delete-queue: Make fixtures/examples testable.
api/delete-queue now uses the Markdown extension in
bugdown/api_code_examples to generate code examples and fixtures
from tests.
2018-02-08 17:58:41 -08:00
Eeshan Garg 344cf2c8ee api_tests: Add tests for client.register_queue. 2018-02-08 17:58:41 -08:00
Eeshan Garg 66ca0c725f api/get-all-users: Make fixtures/examples testable.
api/get-all-users now uses the Markdown extension in
bugdown/api_code_examples to generate code examples and fixtures
from tests.
2018-02-08 17:58:41 -08:00
Eeshan Garg 929724e5e7 api docs: Add page for common error payloads.
We now have a separate page for common error payloads, for example,
the payload for when the client's API key is invalid. All error
payloads that are presented on this page will be tested similarly
to our other non-error sample fixtures.
2018-02-08 17:58:41 -08:00
Eeshan Garg ab700fb662 markdown: Add a macro with instructions for creating a bot. 2018-02-08 16:22:55 -08:00
Robert Hönig 537203102a api tests: Update remove-subscriptions fixture.
The remove-subscriptions API client response
changed with python-zulip-api:67cdb6f
2018-02-08 09:37:41 -08:00