Commit Graph

11927 Commits

Author SHA1 Message Date
Aman Agrawal 512f16690a settings_streams: Use hash_util to check if settings is open.
Since both `organization` and `settings` are category of hash,
we can simply check if the current hash's category is among
them.
2021-05-10 17:55:03 -07:00
Aman Agrawal 570306fa69 subs: Use hash_util to get stream id.
Active stream's hash look like this - `#streams/1/announce`
Since the stream_id is present where typically hash section
is for all other hashes, get_current_hash_section should return
the same result.
2021-05-10 17:55:03 -07:00
Aman Agrawal b180c245b4 subs: Use hash_util to check if user is in "#streams/new". 2021-05-10 17:55:03 -07:00
Aman Agrawal b6f14c54e5 subs: Move active_stream function to hash_util.
This function better belongs in hash_util since it relies on
the current window hash.
2021-05-10 17:55:03 -07:00
Aman Agrawal c6a934da4c reload: Use hash_util to get current hash encoded.
We do this change to limit the use of window in other modules,
specifically window.location.hash.
2021-05-10 17:55:03 -07:00
Aman Agrawal e7129af8ac hash_util: Extract functions to be reused without `window`.
These functions can now be used in other libraries without
using window.location.hash in them and directly calling these
functions.
2021-05-10 17:55:03 -07:00
PIG208 d8db797798 doc: Fix configurations for images in the doc of newrelic.
The screenshot generating mechanism doesn't work for newrelic and
causes error because its configuration file doesn't exist. This
commit fixes the configuration and re-generate the screenshots.
2021-05-10 17:50:32 -07:00
PIG208 9b48a36b91 tools: Add support to generating bot avatars for non-webhook integrations.
New bot avatars are generated with this tool. Having the avatars generated,
we can run generate-integration-docs-screenshot to generate the doc
screenshots.

Fixes: #17792
2021-05-10 17:50:32 -07:00
aryanshridhar 69e3b9c7ec keydown_util: Add comments documenting keys. 2021-05-10 17:32:16 -07:00
aryanshridhar 9f9259683c settings_panel: Bind vim keys to SettingsPanelMenu.
Added a commit to bind vim keys with the SettingsPanelMenu,
allowing users to control the settings and organization tabs
using 'h','j','k' and 'l' keys.

vim_left('h') -> Switch between tab by shifting focus to the left.
vim_right('l') -> Switch between tab by shifting focus to the right.
vim_up('k') -> Move up.
vim_down('j') -> Move down.
2021-05-10 17:30:10 -07:00
Abhijeet Prasad Bodas 67cd385cec mute user: Add user documentation page.
Also link to it from the API documentation page,
other help pages, and the confirmation dialog for
muting a user.

With substantial edits by tabbott and alya.
2021-05-10 17:10:40 -07:00
Abhijeet Prasad Bodas 9519221bb5 mute user: Remove development environment checks. 2021-05-10 16:38:21 -07:00
Tim Abbott f83bea76a2 compose: Revert placeholder styling for bottom reply button.
* Revert "frontend: Remove hover effect from small messagebox."
  This reverts commit 27d9643274.
* Revert "frontend: Use placeholder style for small messagebox text."
  This reverts commit 8453aac260.
* Revert "frontend: Make "Reply" button look more like a textbox."
  This reverts commit 9fdd7184c6.
2021-05-10 12:54:30 -07:00
Abhijeet Prasad Bodas 35fb095f61 confirm dialog: Allow specifying /help links.
This makes it easy for users new to a feature to learn
about more it when confirming the action.
2021-05-10 12:36:39 -07:00
Abhijeet Prasad Bodas 22053d8399 people: User "Muted user" placeholder for muted usernames. 2021-05-10 12:36:39 -07:00
Abhijeet Prasad Bodas 5bcc96508d refactor: Extract people.get_display_full_names.
This deduplicates code used to generate message group headers
and the reactions tooltip.
2021-05-10 12:36:39 -07:00
Gaurav Pandey 756ee2c055 right-sidebar: Replace invite-link height with shortcut height.
To calculate the max-height of buddy_list_wrapper, we use
invite-link-height. This works alright if inviting is enabled
for all. However for users who aren't permitted to invite,
the element does not render, hence the logic uses `0` as
default value for subtraction in `get_new_heights` function
under resize.js. This leads to the keyboard-shortcut icon
rendered below the browser window. Hence use the parent div
`right-sidebar-shortcuts` height for the logic.
2021-05-10 12:10:41 -07:00
Gaurav Pandey 96e035a2f0 api: Fix encoding of strings in streams endpoint.
* Remove unnecessary json_validator for string parameters.
* Update frontend to pass right parameter.

Bump api feature level and highlight the fix for `emojiset`
parameter of `settings/display` endpoint in zulip.yaml file.

Fixes part of #18035.
2021-05-10 10:29:22 -07:00
Gaurav Pandey 9abe1cafbe api: Fix encoding of strings in display settings endpoint.
* Remove unnecessary json validator for string validator.
* Update frontend to pass right validator.
* Update zulip.yaml to pass right parameter for curl request
  in openapi.
* Update python_examples to pass right paramater.

Fixes part of #18035.
2021-05-10 10:03:32 -07:00
Anders Kaseorg 544bbd5398 docs: Fix capitalization mistakes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-10 09:57:26 -07:00
Anders Kaseorg 41e8872b0f realm_playground: Stop using Map incorrectly.
Commit ad76df25ac (#18405) uses Map
incorrectly.  A JavaScript Map needs to be indexed with .get() and
.set(), not with [].

Also, clean up the API: ‘lookup_table’ is a meaningless variable name,
and there was no information in the array that wasn’t also in the Map.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-05-09 22:01:00 -07:00
PIG208 7150fe5dc5 backend: Extract check_update_message from update_message_backend. 2021-05-09 20:44:04 -07:00
Ryan Rehman 5041616adb panels: Fix incorrect frb positioning.
The previous `top_offset` calculation didn't include the height
of the panels which led the calculations to be performed as if
a portion which was hidden behind the searchbox, was visible to
the user.

The new formula is corect as the frb_top calculation in
panel.resize_app also uses panels_height.
2021-05-09 20:42:27 -07:00
Ryan Rehman aa00ef3a32 refactor: Remove hardcoded frb height. 2021-05-09 20:42:27 -07:00
Adam Birds 589a7799dc integrations: Add Uptime Robot integration.
Note that the documentation cannot fully use our macros, because
Uptime Robot requires an & of the end of the URL, because of how it
passes its payload.

Fixes #13854. Fixes #13939.
2021-05-09 20:34:19 -07:00
Tim Abbott 831b7ca965 css: Fix style for buttons that are just a pencil icon. 2021-05-09 20:29:06 -07:00
Tim Abbott 1d9b5ffa92 lint: Fix badly quoted strings tagged for translation.
We also remove an aria-label on a placeholder that matches the input
element's actual label field.
2021-05-09 20:16:28 -07:00
akshatdalton 43aee21dcc linkifiers: Add frontend support to edit linkifier.
A modal is added to edit the realm linkifier which
supports ui_report error.

Puppeteer tests to verify linkifier update and an
invalid test to verify that linkifier error messages
are reported on the modal are added as well.
2021-05-09 20:12:25 -07:00
akshatdalton 8f290216ef linkifiers: Add `title` attribute to `Delete` button.
This commit adds `title` attribute and removes
`aria-hidden` attribute in `Delete` button in
linkifiers table.

`aria-hidden` attribute is used only for icons on buttons
that have a plain-text label.
2021-05-09 19:55:06 -07:00
Tim Abbott 99636c36a3 css: Remove inconsistent topic edit modal margin.
Similar elements in both the compose box and main message edit UI have
no margin in this location, and look better.
2021-05-09 19:47:27 -07:00
Tim Abbott 3e4a819722 css: Centralize topic edit modal CSS. 2021-05-09 19:47:08 -07:00
aryanshridhar 85fc8d5472 popovers: Allow Move topic's dropdown_list_widget to overflow.
Added a CSS overflow property to Move topic popover so that the
dropdown_list_widget doesn't hide behind the modal.
2021-05-09 19:35:51 -07:00
aryanshridhar 42c02f0788 popovers: Add search typeahead to Move topic popover.
Implemented dropdown_list_widget in Move topic popover which enables,
the functionality to search for streams while moving a particular topic.

The aim is to reduce the user effort by having an input
typeahead instead of haivng a dropdown list of streams.

Closes #14860.
2021-05-09 19:32:33 -07:00
aryanshridhar 2c50c67d07 dropdown_list_widget: Properly bind focus event to input field.
Previously, the focus event was triggering on a hidden
dropdown input field, which caused it to not gain focus when
clicked on dropdown button.

This is so because focus events cannot be triggered to
hidden elements or elements that aren't visible in DOM.

Added a fix by explicilty triggering the focus event to
dropdown input field only if the input field is visible in the DOM.
2021-05-09 19:26:40 -07:00
aryanshridhar a3baf90d3a move_topic_to_stream: Replace modal confirmation text to Confirm.
Followup of zulip#17926.
Basically, the aim is to concise modal texts
to use 'Confirm' instead of long labels since they can
tricky for translators and can also create bad strings
having long words.
2021-05-09 19:21:46 -07:00
Wesley Aptekar-Cassels 6639342892 shared: Add link to mobile @zulip/shared docs in README. 2021-05-09 19:12:09 -07:00
Tim Abbott 9a5ad4163e i18n: Rewrite text explaining default language panel.
* Explain what the percentages mean.
* Adjust old verbiage from before we had many translations.
2021-05-09 19:02:09 -07:00
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 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 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
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