Commit Graph

42193 Commits

Author SHA1 Message Date
Aman Agrawal 1152e0ffef default_language: Mark popup text for translation.
Provide link to Read the Docs translation guidelines page which
is more detailed.
2021-05-09 18:48:46 -07:00
Tim Abbott eff0014691 apps: Fix inconsistent sizing of hover bubbles.
They are all now approximately 110x110 squares, rather than having some be
substantially taller than others.
2021-05-09 18:42:13 -07:00
Aman Agrawal 2e46e45f89 apps: Advertise zulip-terminal on apps page.
Link to zulip-terminal's README which contains installation
instructions.

It is marked alpha to indicate that user may not find all
the features that zulip support in the client and may
run into unexpected errors.
2021-05-09 18:34:18 -07:00
Aman Agrawal 1212635151 ui_util: Stop propagation enter keypress when it is already handled.
This is good to do in general for these type of event handlers
and this also fixes a bug where pressing on reply button in
the recent topics will open compose with a new line since
browser assumed enter was pressed on compose_textarea since
process_enter_key returned false.
2021-05-09 18:31:20 -07:00
Tim Abbott 27b04cb7ed settings: Fix position of custom_profile_field hints.
These were confusing when placed below the input element.
2021-05-09 16:55:07 -07:00
Tim Abbott b507efc0d8 settings: Disable form autocomplete for playground name. 2021-05-09 16:18:59 -07:00
Sumanth V Rao f611e83d33 help: Remove typeahead workaround mentioned in our code-blocks doc.
In 215320bc72, we added the typeahead for
the `pygments_name` field which helped lookup the human-readable
`pretty_name`. However, we forgot to remove the workaround method
mentioned in the docs to lookup the name before the typeahead was
introduced.
2021-05-09 16:13:21 -07:00
Sumanth V Rao ad8f27e20c playgrounds: Display the typeahead before the user starts typing.
We display the 5 most popular Pygment languages in the typeahead
when the user clicks on the `pygments_name` field and before they
start typing.
2021-05-09 16:13:19 -07:00
Sumanth V Rao 9c4ed43d6b playgrounds: Add an option to select "Custom language" in typeahead.
Since we support hooking up code playgrounds for custom languages
outside of the list of languages supported by Pygments, we display
an option to select a "Custom language" in the typeahead.
2021-05-09 16:13:04 -07:00
Sumanth V Rao ad76df25ac playgrounds: Add pygment aliases into a parenthetical in the typeahead.
The `pygments_name` field typeahead shows a list of human-readable
`pretty_name`to pick from. However, the Pygment aliases which are
used for code highlighting within a code block are different from
these. This mismatch might be confusing for folks unfamiliar with
technical details of the "code playgrounds" feature.

To bridge the gap, we now include the Pygment aliases within
parenthesis along with its human-readable name, in the typeaheads.

E.g: Python 2.x (py2, python2).
2021-05-09 16:11:30 -07:00
Mateusz Mandera 8bc614abf6 docs: Mention quirk of mixing ALTER TABLE and RunPython in migrations. 2021-05-09 09:38:08 -07:00
Mateusz Mandera ddcb919e4d docs: Mention new AddIndexConcurrently operation in migration doc. 2021-05-09 09:37:28 -07:00
aryanshridhar 9f15de41f3 drafts: Allow vim up and down key to scroll between drafts.
Added a fix to bind vim_up(k) and vim_down(j) keys
with the draft section, allowing users to scroll
between the drafts using 'k' (scroll up) and
'j'(scroll down) keys.

Fixes #18397
2021-05-09 09:18:07 -07:00
aryanshridhar c25155a143 hotkeys: Fix a minor typo in comment.
'Rnter' -> 'Enter'
2021-05-09 09:18:07 -07:00
Wesley Aptekar-Cassels 27d9643274 frontend: Remove hover effect from small messagebox.
Textboxes shouldn't have hover effects.
2021-05-08 08:26:16 -07:00
Wesley Aptekar-Cassels 8453aac260 frontend: Use placeholder style for small messagebox text.
This makes the small messagebox (previously referred to as the "Reply"
button) look more like a textbox.
2021-05-08 08:26:16 -07:00
Wesley Aptekar-Cassels 8bc0c14e81 css: Explicitly set placeholder text style.
Previously, we relied on the browser placeholder text style, but this
makes it impossible to style text to look like a placeholder.

Chrome uses `color` to set the placeholder, while Firefox uses
`opacity`. This commit sets both, since setting one without the other
will lead to strange behaviour.

We pick the color for the light and day themes to ensure that we meet
WCAG standards for accessibility.
2021-05-08 08:26:16 -07:00
Wesley Aptekar-Cassels 9fdd7184c6 frontend: Make "Reply" button look more like a textbox.
* Use "text" cursor effect
* Reduce padding
* Remove blue color in placeholder text
2021-05-08 07:59:31 -07:00
Adam Birds 49b920d33a integrations: Fix bug with github multiple reviews requested on PR.
Fixes a bug in which multiple of the same messages are posted when
multiple reviewers are added to a PR.

Fixes #18393.
2021-05-08 07:56:48 -07:00
Tim Abbott 747cbb5dde integrations: Fix JavaScript exception on category pages.
This logic threw an exception ever since we added new buttons at the
bottom of the page that were inside the container this looped over.
2021-05-08 07:54:51 -07:00
Adam Birds 7c5340dc21 docs: Update how to build an incoming webhook docs.
Update docs on how to build an incoming webhook integration to be more
accurate on exactly what is needed at this point in time as they were
quite out of date.
2021-05-08 07:46:26 -07:00
Adam Birds 5fa8cf042d docs: Make it easier to locate docs for how to build integration.
Make it easier to locate docs for how to build an integration by adding
a link to the docs at the top of the docs on how to document an
integration.

Tweaked by tabbott to adjust the whole first paragraph and make the
link more contextual.
2021-05-08 07:43:39 -07:00
Tim Abbott d4e2abb53a docs: Clean up documentation writing page. 2021-05-08 07:41:40 -07:00
Adam Birds 3508ec01c9 docs: Add link to integrations developer documentation. 2021-05-08 07:33:34 -07:00
Tim Abbott e319a1e5e8 templates: Fix typo in stream deactivation modal. 2021-05-08 07:31:40 -07:00
aryanshridhar 5e47d8446f deactivate_stream: Add Help link widget for UI modal.
Added Help link widget for deactivate_stream UI modal
which redirects to /help/archive-a-stream within
the user documentation.
2021-05-08 07:29:24 -07:00
aryanshridhar 5a254bf495 deactivate_realm: Add Help link widget for UI modal.
Added Help link widget for deactivate_realm UI modal
which redirects to /help/deactivate-your-organization within
the user documentation.
2021-05-08 07:29:24 -07:00
aryanshridhar e1fc389d79 deactivate_account: Add Help link widget for UI modal.
Added Help link widget within account settings for
deactivate account UI modal which redirects to
/help/deactivate-your-account within the user documentation.
2021-05-08 07:29:23 -07:00
Anders Kaseorg 9ba48c4ed3 requirements: Upgrade Python requirements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-07 22:42:39 -07:00
Anders Kaseorg d0c6f4f400 python: Strip leading and trailing spaces from docstrings.
This is enforced by Black ≥ 21.4b0.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-07 22:42:39 -07:00
Tim Abbott ad0be6cea1 puppet: Remove thumbor.conf nginx configuration.
This was missing in 405bc8dabf.
2021-05-07 16:57:29 -07:00
Abhijeet Prasad Bodas eadbce4b0c message list: Don't exclude 1:1 PMs with muted users in pm-with narrows.
Previously, we used to hide 1:1 PMs with muted users everywhere
in the UI. This commit makes it so that such messages will now be
visible in `pm-with/<muted_user>` narrows, meaning these will not
be excluded from message lists, but will still be hidden under
the "This message was hidden." dialog implemented earlier.
2021-05-07 16:21:35 -07:00
Abhijeet Prasad Bodas a59f545136 message lists: Exclude 1:1 PMs with muted users.
* We hide 1:1 PMs from and to muted users throughout
the UI, because doing so will not lead to loss of
conversational context. The "to" part is also important,
because the last few messages sent to a user before
muting them would probably be asking them to stop
spamming.

* After this change, we will need to do filtering for either
user or topic muting in pretty much all narrows, so we need
to keep the `_all_items` list in MessageListData always
up-to-date.

* A further commit will relax this and make it possible to
view these messages only when in a `pm-with/muted_user`
narrow.
2021-05-07 16:21:35 -07:00
Abhijeet Prasad Bodas e64e5936ce message lists: Don't allow user/topic mute message filtering independently.
This basically reverts 4bd7ec7c36 and
3a9dfc02e6.

The plan earlier was to have compeletely different codepaths
for user and topic muting, so that we could call seperate
functions in the message list class on receiving the respective
events.

However, this cannot be done, because if we, for example, on
receiving a `muted_users` event, filter `_all_items` based on
just user mutes, and store the result in `_items`, then, that
result may still contain topic-muted messages, which is
undesirable. Hence whenever we filter messages, we must do so
based on both user as well as topic muting.
(The code for the former will be added in further commits.)

So, we will have a single function which will handle updating
the message lists for muting.
2021-05-07 16:21:35 -07:00
Abhijeet Prasad Bodas 2fc87ec644 node tests: Prefer actual Filter instances over dummy objects.
These mock objects did not buy any ease in testing, as
evident from the fact that this commit hardly contains
any changes to the tests themselves.

This commit also removes some unnecessary `filter: undefined`,
parameters sent to MessageList constructor.
2021-05-07 16:21:35 -07:00
Aman Agrawal 0dd8ce6ff9 recent_topics: Hide reply button when search or filters selected.
Since there is no context for a message in the search or filter buttons,
we don't show reply button either of them are focused.
2021-05-07 16:07:52 -07:00
Aman Agrawal 5040246474 recent_topics: Load enough topics to maintain scroll position.
We were losing scroll position after re-render because there
were not enough rows present in the table to focus back to
the same position. With this commit it is possible now since we
always render with enough rows to do so.
2021-05-07 16:07:52 -07:00
Aman Agrawal 2066553635 recent_topics: Always keep a `visible` topic row in focus.
We save the scroll position of the user by keeping the topic
row at the center of the visible scroll container in focus. The
avoids focus being reset to first topic row when recent topics
renders. Thus, this improves the UX of recent topics.
2021-05-07 16:07:52 -07:00
Aman Agrawal d2e3dbeb50 list_widget: Allow instance to change load_count as per state.
Add a function which is called before every render to
get the number of items it can render. This can be used by
instance to load custom number of items as per its state.
2021-05-07 16:07:52 -07:00
Aman Agrawal 7d6b65e8f4 list_widget: Give instances more control over scrolling behaviour.
We allow ListWidget instances to pass functions in opts that can
be called after scrolling to determine when to render.
Also, allow a callback function to be called pre render.
2021-05-07 16:07:52 -07:00
Aman Agrawal 51acbefc8a recent_topics: Display compose box & enable compose hotkeys.
We move compose from being a part of message feed to
being a part of  middle column which is a common parent of recent
topics and message feed. This allows us to use a common compose
box for both the views. Fortunately, compose actions were
independent of this change so there weren't any evident
side effects.

Fixes #17543
2021-05-07 16:07:51 -07:00
Aman Agrawal 1bc21a6a2f compose: Extract function to update compose buttons.
These two functions just have text_stream different, rest are
same.
2021-05-07 15:51:54 -07:00
Steve Howell 91599df0e2 send performance: Optimize create_user_messages.
We combine the two loops into one, so that we
can check our flags before creating the
UserMessageList object.

And we lift a few calculations out of the loop.

For 8k users, with 95% long-term-idle, this was
about a 10x speedup for me.  (~30ms -> 3ms)
2021-05-07 18:40:30 -04:00
Tim Abbott 0044c8f85f docs: Remove recommendations of json_validator with check_string.
See #18035 for background.
2021-05-07 15:12:18 -07:00
Gaurav Pandey 00647b6fa7 api: Fix encoding of strings in video calls endpoint.
This removes unnecessary json_validator for string parameters in the
BigBlueButton video calls endpoints.  Note that this breaks links to
video meetings sent before the upgrade; there's not much we can do
about that.

Since this is the last commit in this series, we update the
ZULIP_FEATURE_LEVEL for this batch of changes.

Fixes part of #18035.
2021-05-07 14:11:48 -07:00
Gaurav Pandey 36ad9b7d0e api: Fix encoding of strings in user settings endpoints.
* Remove unnecessary json_validator for string parameters.
* Remove unnecessary JSON encoding in frontend calls.  Structurally,
  JavaScript does correct encoding without explicit JSON encoding.

Fixes part of #18035.
2021-05-07 14:10:45 -07:00
Gaurav Pandey 232c7107eb api: Fix encoding of strings in tutorial endpoint.
* Remove unnecessary json validator for string parameter.
* Update frontend to pass right parameter.

Fixes part of #18035.
2021-05-07 14:06:54 -07:00
Gaurav Pandey d4219da254 api: Fix encoding of strings in realm domain endpoint.
* Remove unnecessary json_validator for string parameters.
* Update frontend to pass right parameters.

Fixes part of #18035.
2021-05-07 14:06:54 -07:00
Gaurav Pandey b2111f5753 api: Fix encoding of strings in default stream groups.
Remove unnecessary json_validator for string parameters.  This change
does not modify JavaScript because we don't have a frontend for these
API endpoints yet.

Fixes part of #18035.
2021-05-07 14:06:37 -07:00
Gaurav Pandey d6cf1ef27b api: Fix encoding of strings in hotspot endpoint.
* Remove unnecessary json_validator for string parameter.
* Update frontend to pass right parameters.

Fixes part of #18035.
2021-05-07 11:45:25 -07:00