Commit Graph

6891 Commits

Author SHA1 Message Date
Vishnu KS 3ec64b6092 team: Include users without an associated GitHub profile.
Including anon=1 in API requests will retrieve all contributors
of the repo. If there is no asscoiated GitHub account present for
the commits then the email and name of the author mentioned in
commit messages is returned.
2020-07-24 10:51:47 -07:00
Anders Kaseorg e3b3df328d eslint: Replace sort-imports with import/order.
import/order sorts require() calls as well as import statements.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 09:42:56 -07:00
Anders Kaseorg 40be4df57a lint: Format JSON files with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-24 09:42:56 -07:00
Gittenburg f9459bba12 upload: Do not open compose box when editing.
Previously editing a message and uploading a file in
the edit textarea opened the message compose box.

Fixes #15890.
2020-07-23 11:29:32 -07:00
Anders Kaseorg e123f8f723 subs: Fix set_muted parameter order.
The status_element parameter is optional, and the other caller in
stream_popover.js does not provide it.  This fixes a regression in
commit e6a66063a9 (#15868).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-23 11:22:47 -07:00
Vishnu KS 6b9e7a4022 team: Rename contrib_total_commits to calculate_total_commits. 2020-07-23 10:22:28 -07:00
Vishnu KS 9e0ff58a6d team: Rename contrib to contributors in page_params. 2020-07-23 10:22:28 -07:00
Vishnu KS 2190dbd4b0 team: Map repo name to tab name in frontend.
fetch-contributor-data's job is to fetch the data. How the data
is presented in frontend is something it don't have to know about.
2020-07-23 10:22:28 -07:00
Vishnu KS fe9b700fab team: Use a better API for getting contributor data. 2020-07-23 10:22:28 -07:00
Ryan Rehman 6a245d6d93 minor: Refactor `set_up_typeahead_on_pills` function interface.
This is a prep commit which passes the `update_func` and `source`
data through an object. This will be helpful as there are plans
to pass furthur information to the function (i.e. whether we should
allow creating pills from streams and/or user-groups).
2020-07-22 17:00:34 -07:00
Anders Kaseorg bc7bec9a95 landing-page: Clean up ready callbacks.
jQuery’s $(callback) already checks document.readyState to decide
whether to run the callback immediately (that’s like, jQuery’s entire
value proposition).  We probably don’t need ready callbacks at all
anymore thanks to <script defer>, but that’s a larger change.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 15:48:33 -07:00
Anders Kaseorg e9df82ac31 landing-page: Remove onunload hack.
This was there for the page transition animation that was removed in
commit a0dacea811 (#9334).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 15:48:33 -07:00
Anders Kaseorg 498fe285fa js: Access ‘disabled’ as a property, not an attribute.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 12:20:23 -07:00
Anders Kaseorg 6800c3363f message_edit: Use the jQuery css method for style, not removeAttr.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 12:20:23 -07:00
Anders Kaseorg a2a5871088 js: Replace deprecated $.trim method.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 12:20:23 -07:00
Anders Kaseorg 611f2a4321 js: Replace deprecated $.unbind method.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 12:20:23 -07:00
Anders Kaseorg 7ba3a26cd5 search: Replace deprecated jQuery event trigger shorthand.
$.fn.typeahead, on the other hand, returns the jQuery object back (not
the Typeahead object, which also happens to have a select method), so
this should be converted.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-22 12:20:23 -07:00
Anders Kaseorg a8bef38151 js: Fix incorrectly converted blur, click, focus method calls.
Commit a9ca5f603b (#15863) incorrectly
converted these.  e.target is a DOM element, not a jQuery element;
likewise for the elem parameter of activate_element.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 20:01:57 -07:00
Anders Kaseorg 2d8cab2cee stream_sidebar_actions: Rename toggle_home to toggle_stream_muted.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 18:26:20 -07:00
Anders Kaseorg e6a66063a9 stream_edit: Restore keyboard accessibility to checkboxes.
Listen to change events from the checkbox and pay attention to its
actual value, rather than simulating it by toggling booleans on click
events.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 18:26:20 -07:00
Anders Kaseorg 11bde22cb3 ui_util: Fix incorrectly converted focus method call.
Commit a9ca5f603b (#15863) incorrectly
converted this; el is a DOM element, not a jQuery element.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 18:26:05 -07:00
Gittenburg 45e19dd6b9 emoji: Rename :slight_smile: to 😄.
Zulip converts :) to the 1F642 Unicode emoji and promotes the same emoji
in the popular section of the emoji picker.

Previously Zulip has labeled 1F642 as "slight smile". While that name
conforms to the Unicode standard (which describes the code point as
SLIGHTLY SMILING FACE), it didn't match our use case of the emoji.

If a user types :) or selects the first smile in the emoji picker they
probably mean to express a regular "smile" and not a "slight smile",
which raises the question why they are only smiling slightly.

This commit relabels 1F642 as 😄 and our previous 😄 263A as
:smiling_face:. Note that 263A looks different in our three supported
emoji sets, so it is not suited to be our "default smile".

This change does not require a migration since our emoji system stores
both unicode points and names and handles name changes transparently.
2020-07-21 16:49:54 -07:00
jagansivam28 5f874a51f7 upload widget: Rename image upload widget upload text CSS class.
Previously, image upload widget delete text CSS class name was
`settings-page-upload-text`.
We can change the CSS class name to `image-upload-text`
so that the name can be more generic.
2020-07-21 16:19:21 -07:00
jagansivam28 ad0ff10598 upload widget: Rename image upload widget delete text CSS class.
Previously, image upload widget delete text CSS class name was
`settings-page-delete-text`.
We can change the CSS class name to `image-delete-text`
so that the name can be more generic.
2020-07-21 16:19:21 -07:00
jagansivam28 90cb72b103 upload widget: Rename image upload widget delete button CSS class.
Previously, image upload widget delete button CSS class name was
`settings-page-delete-button`.
We can change the CSS class name to `image-delete-button`
so that the name can be more generic.
2020-07-21 16:19:20 -07:00
jagansivam28 1702f7f802 upload widget: Change image upload widget CSS class name.
Previously, image upload widget CSS class name was
`avatar-icon-logo-settings`  it is not relevant to the widget so
we can change the CSS class name to `image_upload_widget`
so that the name can be more generic.
2020-07-21 16:13:23 -07:00
Tim Abbott 51d4d210d4 stream_edit: Use preventDefault and stopPropagation.
We should be using these patterns consistently in our click handlers.
2020-07-21 13:32:31 -07:00
SiddharthVarshney fb3484df52 stream-settings: Change checkbox UI.
These checkboxes will now be more consistent
in design as we have in other part of the UI.

e.preventDefault() is added inside the
stream_is_muted_clicked function will disable
the default checkbox and make sure click event
come from only <span> part of the checkbox.
2020-07-21 13:27:21 -07:00
Anders Kaseorg 96dcc0ce6e js: Use ES6 object literal shorthand syntax.
Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:42:22 -07:00
Tim Abbott 9b8255d741 compose: Rename blur_textarea to better describe its purpose.
This blurs all the input elements in the compose area, not just the
textarea for the message body.
2020-07-21 12:08:40 -07:00
Gittenburg ed5a56ce53 composebox: Blur PM recipient input after close.
Previously the private_message_recipient input remained focused after
closing the composebox with Escape. On Firefox this resulted in it
gobbling up all further keyboard shortcuts until you clicked
somewhere. On Chromium this bug didn't occur because it automatically
blurs hidden inputs.

Introduced in 3a1bf04a56.

Fixes #15849.
2020-07-21 12:02:31 -07:00
Anders Kaseorg a9ca5f603b js: Replace deprecated jQuery event trigger shorthand.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:01:26 -07:00
Anders Kaseorg 4e42137bd9 js: Replace deprecated jQuery event handler shorthand.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:01:26 -07:00
Anders Kaseorg 97feea42a1 js: Replace deprecated jQuery.fn.hover.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:01:26 -07:00
Anders Kaseorg 25883d7827 copy_and_paste: Replace deprecated jQuery.fn.bind.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 12:01:26 -07:00
Ryan Rehman 1696c9ac20 ui: Fix loading spinner glitch.
On calling `loading.make_indicator` for the second
time or more no spinner is being displayed.

This bug can be viewed on visiting a `near: 1` narrow
and the spinner for the newer messages is displayed
only once (i.e. the first time it is rendered), while
the logo is displayed every time.

This happens because `loading.destroy_indicator` sets
the css of that container to display: "none". This can
be removed as we are emptying the container just above.

Introduced in 953d475274.
2020-07-20 11:00:37 -07:00
Anders Kaseorg b65d2e063d js: Reformat with Prettier.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:25 -07:00
Anders Kaseorg 8046b6477a js: Remove extra consecutive spaces.
Prettier would do this anyway, but it’s separated out for a more
reviewable diff.  Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:25 -07:00
Anders Kaseorg 883e2fd325 js: Remove inner spacing from object literals.
We’re configuring Prettier with bracketSpacing: false.  Generated by
ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:25 -07:00
Anders Kaseorg a20c12366f js: Use inside variant of IIFE wrappers.
Prettier would do this anyway, but it’s separated out for a more
reviewable diff.  Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:25 -07:00
Anders Kaseorg 6924d501bc js: Indent case clauses in switch statements.
Prettier would do this anyway, but it’s separated out for a more
reviewable diff.  Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:25 -07:00
Anders Kaseorg f3726db89a js: Normalize strings to double quotes.
Prettier would do this anyway, but it’s separated out for a more
reviewable diff.  Generated by ESLint.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:31:24 -07:00
Anders Kaseorg 67773bc834 support: Move eslint-disable comment to Prettier-compatible position.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:30:52 -07:00
Anders Kaseorg 569b38fe34 js: Fix no-useless-escape errors.
Generated manually, since ESLint doesn’t have a fixer for this.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-17 14:30:52 -07:00
Gittenburg e15189b20c click_handlers: Don't focus links on middle / right click. 2020-07-16 10:50:40 +02:00
Anders Kaseorg ffdbf1afec favicon: Replace favicon PM indicator with red dot.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-16 01:37:08 -07:00
Anders Kaseorg c2f9db4602 logo: Update Zulip logo.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-16 01:37:08 -07:00
Gittenburg c42c2a9a22 click_handlers: Don't focus elements on dragstart.
Chrome focuses elements when you start dragging them,
which can confuse users because of our focus outline.
2020-07-16 01:32:26 -07:00
Rohitt Vashishtha ea1c178305 markdown: Format spoilers for desktop notifications.
We hide the spoiler content in browser/desktop notifications.

Note: its not worth adding zjquery tests for this bit of code because
the tests do not operate on the actual data and are likely to get stale
if we change the syntax for spoilers.
2020-07-15 23:30:28 -07:00
Anders Kaseorg c080b4da06 favicon: Remove ancient browser workarounds.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-15 20:56:58 -07:00