Commit Graph

6676 Commits

Author SHA1 Message Date
Sarah de2ec8a05c notification settings: Add UI for stream email notifications.
Previous commits have fully implemented the logic for stream email
notifications; this final commit adds support for configuring it to
the UI.

Fixes #6511.
2018-07-14 12:19:33 +05:30
Harshit Bansal f636882e04 build_emoji: Migrate to use `emoji_names.py` file.
This migrates Zulip to use a dramatically better set of names and
aliases for our emoji set, defined in emoji_names.py (which is in turn
manually generated from our hand-curated CSV file).

This should significantly improve the experience of using Zulip's
emoji picker and emoji typeahead for finding what one is looking for.
2018-07-13 21:18:02 +05:30
Max Nussenbaum 122dcc9760 billing: Style upgrade page.
This styles /upgrade.
2018-07-13 18:32:29 +05:30
Max Nussenbaum 8fd900626d billing: Style billing page.
This adds styles to /billing.
2018-07-13 18:30:38 +05:30
Max Nussenbaum 4af3b8bdda settings: Improve styling of draggable profile field rows.
This changes the icon indicating that you can drug the custom
profile field rows in settings to be the double rows of dots
typically used to indicate draggability. It also gives those
rows the "move" cursor on hover.
2018-07-13 18:17:03 +05:30
Cynthia Lin 960f83238b help: Replace perfect-scrollbar with simplebar in help pages.
The perfect-scrollbar library created one major problem, which is that
`ctrl-F` didn't work, and several smaller problems.

Fixes #9748 and fixes #8887.
2018-07-13 18:03:32 +05:30
Cynthia Lin ab9f167053 help: Refactor help page CSS to eliminate padding on content containers.
This is essential for using simplebar, since simplebar doesn't account
for parent <div> paddings, which might cause scrollbars to be mispositioned
if not considered.
2018-07-13 18:03:32 +05:30
Cynthia Lin 1babd6aa28 help: Prevent scrolling on sidebar when collapsed in mobile view. 2018-07-13 18:03:32 +05:30
Cynthia Lin 8ee034a41c help: Prevent scrolling when cursor is on body.
When you hover above the navbar, the cursor focuses on the page
body and scrolls the entire page, breaking the positioning of the
fixed sidebar and page content.

We disable scrolling on the body but allow the sidebar and Markdown
content page elements to be scrolled to fix this bug.
2018-07-13 18:03:32 +05:30
Aastha Gupta dfde4fac85 invitations: Send 'invites_changed' event for invitations events.
Fixes #7665

In case of invitation events, 'invites_changed' event without
any real payload is sent to all the realm admins and the user.
The event is handled by reloading the list to view recent changes.

Commit tweaked by shubhamdhama:
* Send an `invite_changed` event when an user accept an invite.
    Also, added the test for the same.
* No need to delete the invite list in frontend, current logic
    handles the case when the invite data is changed properly.
* Extracted the common logic for sending an event into
    `notify_invites_changed`.
2018-07-13 18:00:06 +05:30
Cynthia Lin 0ed13e3631 stats: Fix incorrect data-user attribute on Everyone button.
For some reason, it was defined as "realm" instead of "everyone",
resulting in undefined value JS errors when draw_plot() was called.

Fixes #9937.
2018-07-13 10:24:13 +05:30
Joshua Pan 3ac49c1503 mlv: Remove unecessary function names.
We have deprecated this code style.
2018-07-12 11:43:21 -04:00
Anders Kaseorg ae55107560 HTML validation: Replace Drafts button with styled link.
<button> inside <a> is invalid.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-12 18:47:10 +05:30
Anders Kaseorg 6107382b2a HTML validation: Remove invalid <pipe> element from portico-header.
It seems to have been there to paper over a styling problem that was
actually caused by slightly mismatched font sizes (em vs. rem).

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-12 18:46:31 +05:30
Eeshan Garg 3eaf00444a markdown: Render nested multi-line code blocks correctly.
This commit adds a Markdown tree-processor extension that renders
multi-line code blocks that are nested inside lists with the
formatting. Note that the code block could be nested inside multiple
list levels and would still get rendered correctly.

Tim: This fixes the need for unpleasant workarounds like
f5bfa4e793 and makes nested code blocks
in our documentation look exactly how users would expect them to.
2018-07-12 12:22:04 +05:30
Aditya Bansal c47db1a1e8 left_sidebar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:31:18 +05:30
Aditya Bansal 82877fa116 recipient_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal fb839c1d5b compose.html: Upgrade to use font-awesome 4.7 icon prefixes.
We also adjust some CSS so that icons after this upgrade look exactly
or nearly the same as they did before the upgrade.
2018-07-11 20:31:17 +05:30
Aditya Bansal 61e4bb1bf4 user_info_popover_content.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal f605fdf2c8 topic_edit_form.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 1fb2dc5b65 tab_bar.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 6f5a1d3893 stream_sidebar_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal dad1b60355 stream_sidebar_actions.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 66096e9509 single_message.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 37b1100a2c organization-settings-admin.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 4731ad1a1b account-settings.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 69afb0673c message_edit_form.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 5f459e0bb1 draft.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 9b57f859cc bot_avatar_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 376ac9bdec alert_word_settings_item.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:17 +05:30
Aditya Bansal 21364316e9 admin_profile_field_list.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:16 +05:30
Aditya Bansal 76ed02dd35 admin_invites_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:16 +05:30
Aditya Bansal a2c58072a7 admin_filter_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:16 +05:30
Aditya Bansal 092a8e05e2 user_group_info_popover_content.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:31:16 +05:30
Aditya Bansal f1059e2760 uploaded_files_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:31:16 +05:30
Aditya Bansal 21b9e8dee1 typeahead_list_item.handlebars: Upgrade to font-awesome 4.7 icon prefixes.
We also remove a CSS hack that was required because the original icon
was poorly centered.
2018-07-11 20:31:03 +05:30
Aditya Bansal ae6c8692a9 subscriptions_settings_modal: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal aeac7fb5b5 stream_privacy.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 37fc0072c4 sidebar_private_message_list.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 44dd01b603 profile-field-choice.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 880986b9ee invites-list-admin.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 2e6e331439 bot-settings.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 145af3f7c8 emoji_popover_content.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 576c6eeb2c all_messages_sidebar_actions.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal f41db6a532 admin_user_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 27f238c2f1 admin_emoji_list.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 53969385fe admin_default_streams_list.handlebars: Use fa-4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 975ab6ac16 user_presence_row.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 65eaf92acd user_profile_modal.handlebars: Upgrade to font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal 5552bfbeda settings_overlay.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Aditya Bansal ccb4e11eb4 navbar.html: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-11 20:17:11 +05:30
Tim Abbott 1381603c29 portico: Remove unused Stamp font-face.
This was used for the very early-stage Zulip "ask for invite" form,
which was built around a stamped envelope concept.  The form was
removed from Zulip a couple years ago in
bded0d9d54, but this CSS was missed in
the removal.
2018-07-11 20:09:00 +05:30
Steve Howell e1fdb96882 refactor: Use early-exits in can_apply_locally().
The early-exit style is nice for writing longer
comments about edge cases.
2018-07-11 20:00:56 +05:30
Steve Howell 5db9b7a2ba refactor: Extract rtl.set_rtl_class_for_textarea().
We can now theoretically use this for any textarea
that supports our markdown (besides the compose box),
plus we keep the RTL code a bit more self-contained.
2018-07-11 19:20:22 +05:30
Steve Howell ebb4b21f78 refactor: Limit scope of "range" variable.
We don't need this at outer scope, and it complicates
tests slightly.
2018-07-11 19:20:22 +05:30
Max Nussenbaum 568aa43838 flatpickr: Hide the up/down arrows in the Flatpickr datepicker.
This hides the up and down arrows that appear in the year input
of the Flatpickr-provided datepicker. (This is only used in
settings for now, but the arrows will be hidden anywhere Flatpickr
is used.)
2018-07-11 19:16:25 +05:30
Max Nussenbaum 9be31d2b1b settings: Restyle x that clears date field.
This restyles the x that clears a date field to be more consistent
with the rest of the app, and to appear inside the field.
2018-07-11 19:16:25 +05:30
Tim Abbott 0132816471 profile fields: Fix fragile JavaScript for deleting date fields.
The JavaScript click handler for this feature was fragile in a way
that would break with upcoming changes to how we display the X
element.  We clean this up with a replacement implementation that
should be much less fragile.
2018-07-11 19:16:24 +05:30
Cynthia Lin e790f35d0e settings UI: Change user profile pill containers to match input styling.
Previously, commit e5d2e95 attempted to change the styling of the user
profile pill containers to match the inputs above it. However, it used
an incorrect selector (#settings_page), resulting in all other pill
containers on settings pages being changed to match it as well
(example: User groups pill containers in Organization
settings). Additionally, its selector's specified background attribute
resulted in problems in dark mode.

To correctly style the user profile pill containers to match the other
input's styling, we apply the uneditable-input class native to
Bootstrap so that we don't need to create an entirely new selector to
style it.

Note that the .custom_user_field .pill-container selector was added so
that it could match the padding of inputs. Also, the
.custom_user_field .pill-container:focus-within selector was added
with attributes straight from Bootstrap's input:focus selectors so
that .custom_user_field .pill-container would have a blue outline
while users were typing in the input pill, just like the other inputs.
2018-07-11 19:06:04 +05:30
Rohitt Vashishtha 43988c4c8d reactions: Fix minor formatting in log message.
Changes -> "Unknown user_id 8888in reaction for message 1001"
to ------> "Unknown user_id 8888 in reaction for message 1001".
2018-07-10 16:22:52 -04:00
Anupam Dagar 88ddf2bf5d settings UI: Add copy zuliprc button to bot information box.
Fixes: #9510
2018-07-10 15:19:05 +05:30
Shubham Padia 7a3f2bbfb5 pills: Enable user avatar images for user pills.
Fixes #9842.
Enables avatar images in pills wherever user_pill.js is used.
(e.g composebox, user group settings)
Changes to search_pill.js are not made as search pills haven't been
added yet completely and search_pill.js just contains the preparatory
code right now.
No change to compose_pm_pill.js is not required as it uses
`user_pill.create_item_from_text` in its `create` function.
2018-07-10 15:07:56 +05:30
Shubham Padia 549d5af1a3 pills: Explicitly declare height of input pill as 20px.
Adding the 20*20 image inside the pill caused a minor increase in
pill height. Making the image 19*19 causes some increase in the height
under different zoom conditions. I'm not sure about the reason behind
this, so this can be counted as a hack.
2018-07-10 15:07:56 +05:30
Shubham Padia e5f28e8960 pills: Add basic support for images in input pills.
Allow passing image link in the item passed to appendValidatedData.
When passing image link via any of the append* functions, make sure
that create_item_from_text for that pill also adds the image link to
the item created.
This commit does not make any visual change to the current app.
Changes to user_pill.js are necessary to enable user avatars for
pills.
2018-07-10 15:07:56 +05:30
Steve Howell c407ba5175 Add narrow_state.is_reading_mode(). 2018-07-10 14:20:24 +05:30
Steve Howell bec40af614 Remove redundant narrow_state.get_current_filter().
We now use narrow_state.filter() everywhere.  The
two functions did the same thing, and I slightly
prefer the concise name, which was already in use
in lots of places.
2018-07-10 14:20:24 +05:30
Rhea Parekh fe4cad15a4 widgets: Add todo widget. 2018-07-10 11:18:05 +05:30
Shayan Toqraee 0757d022f5 messages: Add support for right-to-left messages.
This implements right-to-left message automatic detection support in
the compose box as well as the message feed.  Full unit tests and
support in the message-editing UI are for future work (as are
potentially more fancy things like supporting things like
right-to-left multi-word names for users/streams/etc.).

Fixes #3123.
2018-07-10 10:47:56 +05:30
Eeshan Garg 8362d927d0 css: Refactor CSS responsible for rendering multi-paragraph lists.
I also removed the comment that said "this is just a workaround".
It is not, it is technically correct for us to do apply different
CSS rules to <p> tags that aren't the first child of the <li>
element in question.
2018-07-10 10:01:16 +05:30
Anders Kaseorg ecb4fd2193 HTML validation: Rename custom on-page attribute to data-on-page.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 09:45:42 +05:30
Anders Kaseorg 37dfa7f7d4 HTML validation: Remove xmlns:svg attribute.
xmlns:svg is an XML namespace declaration that would be valid in XHTML
but not in HTML.  Even in XHTML, it wouldn’t be necessary because we
don’t write SVG tags prefixed like <svg:circle>, only unprefixed like
<circle>.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2018-07-09 09:45:42 +05:30
Steve Howell 930f3937dc Remove feature_flags.mark_read_at_bottom.
We removed all code related to the possibility
of it being false.
2018-07-07 10:19:15 +02:00
Steve Howell ed24d1c413 Remove unused feature_flags.collapsible field. 2018-07-07 10:19:15 +02:00
Steve Howell b88206a637 Remove code for full-width feature.
The full-width feature has been turned off for
about four years.
2018-07-07 10:19:15 +02:00
Armaan Ahluwalia ba6543b850 webpack: Fix missing exposed modules left out of transition.
This commit fixes some modules that were erroneously left out while
transitioning app.js to webpack. This commit exposes them using
expose-loader or setting them directly to window.
2018-07-07 08:00:34 +02:00
Jack Zhang 8fe422794d register-accounts: Align terms of service checkbox.
Fixes an invalid css property from
https://github.com/zulip/zulip/commit/30815b402, which addressed #9328.
2018-07-06 22:54:37 +02:00
Shubham Dhama 1e157057c3 voting_widget: Don't update question in question.outbound function.
We should wait for server response(event) for updating the question.
2018-07-06 11:30:12 -04:00
Shubham Dhama 1e32f66832 voting_widget: Minor refactor of jquery elements selectors. 2018-07-06 11:30:12 -04:00
Cynthia Lin 642111b6fa settings UI: Expand bot card width in narrow windows.
Fixes #9513
2018-07-05 12:29:52 +02:00
Armaan Ahluwalia 54d3d8e8b3 webpack: Transition app.js to be compiled by webpack.
This commit moves all files previously under the 'app' bundle in
the Django pipeline to being compiled by webpack under the 'app'
entry point. In the process, it moves assets under the app entry
to a file called app.js that consumes all relevant css and js files.

This commit also edits the webpack config to be able to expose certain
variables for third party libraries that are currently required by
some modules. This is bad coding form and should be refactored to
requiring whatever dependencies a module may have; we're just
deferring that to the future to simplify the series of transitions we
need to do here. The variable exposure is done using expose-loader in
webpack.

The app/index.html template is edited to override the newly introduced
'commonjs' block in the base template. This is done as a temporary
measure so as not to disrupt other pages on the app during the transition.

It also fixes the value of the 'this' context that was being inferred
as window by third party libraries. This is done using imports-loader
in the webpack config.  This is also messy and probably isn't how we
want things to work long term.
2018-07-05 11:03:08 +02:00
Armaan Ahluwalia 6d255efe4c app: Prepare JS files for consumption by webpack.
This commit prepares the frontend code to be consumed by webpack.

It is a hack: In theory, modules should be declaring and importing the
modules they depend on and the globals they expose directly.

However, that requires significant per-module work, which we don't
really want to block moving our toolchain to webpack on.

So we expose the modules by setting window.varName = varName; as
needed in the js files.
2018-07-05 10:53:36 +02:00
Aditya Bansal b10822efcf subscriptions.scss: Remove dead CSS.
We remove css which has been dead since convertion of subscriptions
page to an overlay. This should ideally have been dealt with in
commit 1886f0a which actually did the converstion but we forgot to
handle it at that time.
2018-07-04 23:51:45 +05:30
Aditya Bansal 69904e04d8 help: Remove dead css and js left over from the time of redesign.
This removes some left over dead code from the redesign which was
introduced in commit 1cf7ee.
2018-07-04 23:51:45 +05:30
Aditya Bansal e3aa479cc3 zulip.scss: Remove dead CSS from 2013.
We remove the dead CSS which was introduced in commit 963a93367
back in 2013 and doesn't seem to have any use now. Its probably
the case that we removed the actual html structure which used this
CSS since 2013 and forgot to clean up the css part.
2018-07-04 23:51:45 +05:30
Aditya Bansal 4f090861e7 admin_streams_list.handlebars: Remove since its dead.
This was killed when the "Deleted Streams" feature was dropped
in commit 7bbe44d7 but we forgot to deal with it at the time.

squash to admin_streams_list
2018-07-04 23:51:45 +05:30
Aditya Bansal db7448c4e3 subs: Remove dead css and js left over from a redesign.
This cleans up some leftover js and css from the effort of
redesign the rows of the #subscriptions table. Redesign happened
in commit 368b5859 and but we forgot to clean up these js and css
pieces.

squash to subs.js.
2018-07-04 23:51:45 +05:30
Steve Howell 7b8d3023f5 Fix saving of collapsed flags.
This was broken in 7a362861.  It was a refactoring
related to cleaning up unread flags.
2018-07-03 06:05:22 -07:00
Shubham Padia 17cbafe0e0 bot settings: Scroll to bottom after showing bot_error.
Fixes #9868.
The error went unnoticed as the error remains hidden below due to
the scrollable div.
2018-07-03 06:02:49 -07:00
Shubham Padia d07f5eef22 bot settings: Change top and bottom margins of bot_error. 2018-07-03 06:02:49 -07:00
Steve Howell d90d1a04bb bot settings: Clean up error handling.
The error handling for delete/reactivate was broken.
The old code related to appending id_suffix to the ids of
the per-bot error divs did not have corresponding
selectors in the actual error handling.

Things still aren't great, but there's a bit more
encapsulation now, and you'll see errors for the
delete/reactivate cases.
2018-07-03 06:02:49 -07:00
Steve Howell fef98c932b bot settings: Fix reactivation feature.
The reactivation feature was broken, because the
template was still using email when we were looking
for user_id.
2018-07-03 06:02:49 -07:00
Steve Howell 26b48b95dc refactor: Export settings_bots.render_bots().
We also now call this explicitly when we need to
re-render (instead of triggering a custom event).
2018-07-03 06:02:49 -07:00
Shubham Dhama b938523592 widgets: Increase node tests coverage to 100%. 2018-07-03 08:48:49 -04:00
Shubham Dhama 617c79545a widgets: Extract function for current list update on narrow deactivation. 2018-07-03 08:48:49 -04:00
Steve Howell 1fdfe11e8b node tests: Add tests for voting_widget.js.
This first commit starts by testing handling of
inbound data.
2018-07-02 13:46:30 -04:00
Rhea Parekh 7c7e3dcd3f slash commands: Add /settings command. 2018-07-01 20:32:36 -04:00
Rhea Parekh b22d266667 widgets: Add question for poll widget in the message itself.
Use the command '/poll question?', to start a question.
2018-07-01 19:56:19 -04:00
Rhea Parekh 784e7249a5 widgets: Add question in the poll widget itself.
The user can also edit the question after adding it.

The question in the poll can only be added/edited
by the user who started the poll.

The input bar will be disabled for the other users
if the question is not yet added. If the question is
added, the input bar will not be visible to the other
users.
2018-07-01 19:56:19 -04:00
Rhea Parekh 3d5cecdad5 widgets: Avoid voting while adding a new option in poll widget. 2018-07-01 19:56:19 -04:00
Rhea Parekh 19725b74d5 widgets: Add basic styling for poll widget. 2018-07-01 19:56:19 -04:00
Rhea Parekh 2673a7f71f widgets: Add basic styling for tictactoe widget. 2018-07-01 15:09:18 -04:00
Aditya Bansal 3cf8ba33d8 integrations: Upgrade to use font-awesome 4.7 icon prefixes. 2018-07-01 06:02:10 -07:00
Eeshan Garg 061e760d1e webhooks: Add Clubhouse integration. 2018-07-01 04:01:17 -07:00
Yashashvi Dave e7a172293f user popover: Display name of user instead of id in user-type-custom field. 2018-07-01 02:05:00 -07:00
Yashashvi Dave 554a0773dc custom fields: Add icon to delete value of date-type-custom-field. 2018-07-01 02:05:00 -07:00
Yashashvi Dave 52b6d0ce9f custom fields: Add default value choice in choice-type-custom-fields.
Add default choice option in choice type of custom profile field.
2018-07-01 02:05:00 -07:00
Yashashvi Dave aa39b1e28e custom field: Allow admin to change custom fields order using drag & drop.
Using sortablejs library, allow admin to modify custom fields order
in admin settings using drag and drop of custom field list element.

Fixes #9351
2018-07-01 02:05:00 -07:00
Yashashvi Dave a6c03a4738 custom fields: Fix custom fields header not rendering properly.
Even when admin removes all custom fields from org, custom
fields header "Profile" doesn't get removed.
Render header "Profile" whenever custom fields data get changed.
2018-07-01 02:03:56 -07:00
Shubham Dhama 9a45e52f75 widgets: Fix empty message_content of "All messages" widgets.
Fixes: #9827.
2018-06-28 14:04:37 -04:00
Akash Nimare d5e3ab761b settings: Unify code for setting-panel. 2018-06-27 11:48:50 -04:00
Akash Nimare 00a34fb46a settings: Remove duplicate code from setting panel.
We don't need to update this classes since we have
already added those classes in the setting_panel_menu.js.
2018-06-27 11:48:50 -04:00
Akash Nimare 68cf2b1690 settings: Fix broken setting items in smaller window.
Fixes: #9780.
2018-06-27 11:48:50 -04:00
Akash Nimare c82734d9c5 streams-settings: Fix toggle icon not updating.
This commit fixes a regression which was introduced while
we were removing icon-vector and replacing the same with
font-awesome. We forgot to update the toggle icons from the
JS file.
2018-06-27 11:30:35 -04:00
Shubham Padia 2977a4cb6f right-sidebar: Narrow pm/group-pm on clicking unread count badge.
Fixes #9797.
Clicking on the unread count badge on the right sidebar did not
narrow the selected pm/group-pm. This commit moves the count div
inside selectable_sidebar_block. Also uses flexbox instead of
inline-blocks for user presences selectable_sidebar_block.
2018-06-27 11:26:24 -04:00
Shubham Padia 3442fde126 sidebar: Fix unread count shifted right in stream list.
The reason for the bug was 71e3f778cc.
This commit makes the width 100% for selectable_sidebar_block only
on the right sidebar, the left sidebar selectable_sidebar_block
width is unset.
2018-06-27 11:26:24 -04:00
Shubham Padia e4fa02e8e3 integrations: Use phrase_match instead of fuzzysearch.
Fixes #9822.
fuzzysearch matched query if the query letters appeared in sequence.
Here we use the extracted phrase_match to match query with the prefixes
of words.
2018-06-26 20:38:47 -04:00
Shubham Padia 1364971a17 search: Extract phrase_match to common.js.
Extracts phrase_match to common.js so it can be used by other
components like integrations search.
2018-06-26 20:38:47 -04:00
Rishi Gupta c0751c0644 stream settings: Rename stream accessibility section heading.
The content of this section has recently changed to include posting
restrictions. "Stream accessibility" was sort of an awkward name anyway.
2018-06-23 18:40:42 -07:00
Rishi Gupta d5c48af365 stream settings: Fix link to stream-permissions user doc. 2018-06-23 18:40:42 -07:00
Rishi Gupta c6048527bf stream settings: Rename average messages to estimated messages. 2018-06-23 12:48:15 -07:00
Yashashvi Dave 317a2fff2a bots settings: Improve API for editing bot owners to refer to users by ID.
Fixes #9502
2018-06-23 12:47:50 -07:00
Vishnu Ks 66dead7fee signup: Fix the full_name hidden bug when user has no other account.
Fixes #9802
2018-06-23 10:56:47 -07:00
Shubham Dhama eaeaf2d851 list_render: Remove rows sort click handler from the body.
This removes the click handler previously attached to the body, now
we just need to pass `parent_container` which at least contains the
table heads.
2018-06-22 09:21:47 -04:00
Shubham Dhama 5b18a381fb list_render: Extract sort handler function from data-sort click handler. 2018-06-22 09:21:47 -04:00
Shubham Dhama 92d843add9 list_render: Remove redundant `list_render.delete` method. 2018-06-22 09:21:47 -04:00
Shubham Dhama 2aba7c239f list_render: Make list creation logic as an export in list_render module.
This changes how we create lists i.e.
    from `list_render($container, list, opts)`
        to `list_render.create($container, list, opts)`
2018-06-22 09:21:47 -04:00
Marco Burstein 9643c8ed26 hotkeys: Deactivate `ctrl + shift` hotkeys.
This disables `ctrl + shift + [`, while `ctrl + [` will still trigger
an action.

Also, add a test for ensuring that the `ctrl + shift` combinations fall
through.
2018-06-22 09:10:23 -04:00
Marco Burstein 56f711d5ff hotkeys: Deactivate `cmd-or-ctrl + shift` hotkeys.
This disables `cmd-or-ctrl + shift + k` and `cmd-or-ctrl + shift + s`,
while `cmd-or-ctrl + k` and `cmd-or-ctrl + s` will still trigger
actions.

Also, add tests for ensuring that the `cmd-or-ctrl + shift`
combinations fall through.

Fix #9779.
2018-06-22 09:10:23 -04:00
Shubham Padia 6853530eba search: Add search_pill.js with basic operations.
Adds search_pill.js to the static asset pipeline. The items
for search pill contain 2 keys, display_value and search_string.
Adding all the operator information i.e the operator, operand and
negated fields along with the search_string and description was tried out.
It was dropped because it didn't provide any advantage as one had to
always calculate the search_string and the description from the operator.
2018-06-22 09:05:36 -04:00
Cynthia Lin 71e3f778cc right sidebar: Expand sidebar block width for greater click area.
Fixes #9797
2018-06-22 08:57:01 -04:00
Shubham Dhama 42f9ecb841 search: Remove a redundant preventDefault & export is_using_input_method.
Return false is equivalent to preventDefault and stopPropogation.
is_using_input_method is exported for node testing.
2018-06-22 07:58:06 -04:00
Shubham Dhama 35be5a88ac search: Remove redundant re-declaration of variables for search box.
This is just a minor refactor.
2018-06-22 07:58:06 -04:00
Shubham Dhama 053b5a0da6 search: Refactor update_buttons_with_focus.
This just change `attr` to `prop` as it is more preferred.
Also, a minor renaming of variable is done here.
2018-06-22 07:58:06 -04:00
Rishi Gupta d466f3fffc org settings: Update labels for organization profile. 2018-06-21 12:47:19 -07:00
Rishi Gupta f52765be5b user docs: Update create-your-organization-profile. 2018-06-21 12:47:19 -07:00
Rhea Parekh d066c11b47 zcommand: Strip the slash in the backend.
The slash in command is stripped in the backend,
rather than in the client to make the client code
cleaner.
This would make client code cleaner in the slash
commands which include parameters.
2018-06-20 16:49:29 -04:00
Shubham Dhama 9b5986d320 search: Fix "Enter to search" while using an input method.
NOTE:   To test this locally I've used Google Chrome input tool.
        This change will not affect users who don't use input tools.

Here is the algorithm used to deal with this case and other important
points:

* Here I've used `compositionend` event which is triggered
as soon as an input tool completes a word or user press "enter"
to get the suggested text. (There was a situation where it is
triggered even when input tool wasn't closed, that is when we
press space, but it also triggers another `compositionstart`
event simultaneously so our logic can't be affected by this.)

* We are using a variable `is_using_input_method` which sets to
`true` when `compositionend` event is triggered.

* Basically our searching is initiated by `keyup` event which
is triggered by the same keypress which triggers `compositionend`
event to get the text, so our main goal is to suppress the searching
triggered by this key pressing.

* Observation shows that `compositionend` is triggered before the
`keyup` and calling of callback `narrow_or_search_for_term`
used by typeahead.
    i.e. chronological order of triggering of this event is
`compositionend` > calling of `narrow_or_search_for_term` > `keyup`.

* So the main logic is to set `is_using_input_method` to `false`
by default and if used the input tool then when we press enter
to get the suggested text we set it to `true` which indicate
further events triggered after it to skip the searching and
finally in `keyup` we set it to default `false` so when pressed
enter again we have it set to false and we have a successful
search.

Fixes: #9396.
2018-06-20 16:32:51 -04:00
Shubham Dhama 9387efc399 scroll_bar: Initialize scroll_bar in ui_init.js.
This will help in making the order of ui modules initialization
more explicit and clear.
2018-06-20 07:38:22 -04:00
Max Nussenbaum e5d2e953bd settings: Clean up styling of the Mentor field.
This restyles the Mentor custom profile field in Settings >
Your account to better match the rest of the profile fields.
2018-06-20 07:33:30 -04:00
Akash Nimare 8973ece70b night-mode: Remove background from edit topic form. 2018-06-20 07:31:39 -04:00
Cynthia Lin 35a0fc17ab help: Prevent anchor link text from being selected.
Double clicks sometimes cause the anchor link text to be selected accidentally.
2018-06-19 14:19:23 -07:00
Cynthia Lin dcfc2e10b8 help: Fix broken anchor link scrolling in documentation pages.
Whenever a link is clicked, the page link changes, and the content
of the `.markdown .content` node updates, preventing the old
listener to catch any future anchor link clicks. 

We attach the listener to the document instead and only activate
it when the target element is a proper anchor link heading.

Fixes #9767.
2018-06-19 14:19:23 -07:00
Vishnu Ks 3dd9f61851 signup: Show profile details during settings import. 2018-06-19 11:25:23 -07:00
Shubham Dhama 8e032376f9 guest: Restrict guest access to user group creation and updation. 2018-06-19 11:04:14 -07:00
Shubham Dhama 05323e776e user groups: Refactor settings_user_groups.can_edit. 2018-06-19 11:04:14 -07:00
Shubham Dhama 281611f64c night mode: Fix loading-ellipsis visiblity on clicking "more topics". 2018-06-19 11:04:14 -07:00
Shubham Dhama acd2528038 transmit: Refactor logic for deferring the socket initialization.
This makes sure that CSRF token is available while initializing
Socket, irrespective of the order of execution of deferred callbacks
after document becomes ready.

This is part of #9416.
2018-06-18 06:51:42 -07:00
Shubham Dhama 6eaa54a876 sockets: Remove redundant defering in `_setup_sockjs_callbacks`.
This deferment is redundant because we are already waiting for document
ready in transmit.js where we initialize this Socket object.
2018-06-18 06:51:42 -07:00
Shubham Dhama e42e3af7a1 settings_org: Refactor 'get_property_value' to be more readable. 2018-06-17 09:28:19 -04:00
Yashashvi Dave 8909cb1d15 custom fields: Allow list of users in user type of custom fields.
Allow user to add more than one user-value in user type of custom
fields.

Tweaked by tabbott to improve the models.py code and type annotations.
2018-06-16 09:37:49 -07:00
Tim Abbott b0db90648a topic_edit_form: Disable autocomplete for topic editing.
Browser autocomplete is just annoying for this context.
2018-06-16 09:06:34 -07:00
Max Nussenbaum 42f10addd8 sidebars: Update unread pills to handle zoom better.
This updates the unread pills in the left and right sidebar
to look better at a wide range of zoom values. (It doesn't change
their appearance at all.)
2018-06-16 09:04:13 -07:00
Jack Zhang ac76935f25 integrations: Hide page content until all data has loaded.
Set the initial visibility of the page content to hidden via
the stylesheet, and allow any data fetching and rendering to
complete before making content visible.

Adjust the conditional logic within `render` to first check for
the case in which a user goes to a doc link, the case in which
we asynchronously fetch data prior making content visible.

Fixes #9577.
2018-06-16 08:50:16 -07:00
Shubham Dhama 417f01386d bots: Hide UI for adding new bots for guest users. 2018-06-16 06:33:14 -07:00
Shubham Dhama 603139500a settings_bots: Extract logic for ability to create bots.
This is a minor refactor/deduplication and renaming of
'admin_only_bot_creation' to 'can_create_new_bots'
2018-06-16 06:33:14 -07:00
Shubham Dhama d40c2bb166 emoji: Make uploading new realm emoji inaccessible for guest users. 2018-06-16 06:33:14 -07:00
Shubham Dhama 596ce5b60f invite: Make inviting new users inaccessible for guest users. 2018-06-16 06:33:13 -07:00
Shubham Padia 3a742d8ae4 popovers: Fix keyboard navigation for user profiles except their own.
For other users' profile, keyboard navigation worked only upto 2
items as the third item with '.mention_user' could not be focused.
This was due to href missing from the anchor tag. $.focus() requires
href to be defined, even if it is '#' to focus the anchor tag.
2018-06-13 05:57:14 -04:00
Shubham Padia 5f9cdf9b08 popovers: Enable keyboard navigation on user profile menu.
Fixes #9318.
Calls popovers.user_info_popover_handle_keyboard in process_hotkey.js.
Makes popovers.message_info_popped public.
2018-06-13 05:57:14 -04:00
Shubham Padia 655175c9f7 hotkey: Rename actions_dropdown_hotkeys to menu_dropdown_hotkeys.
actions_dropdown_hotkeys are also to be used for user profile menu
keyboard navigation, so renaming it to a more generic name.
2018-06-13 05:57:14 -04:00
Shubham Padia 5481dd11bc popovers: Focus on first menu item when user profile opened by hotkey.
Adds focus_user_info_popover_item to popovers.js. When menus are
opened by hotkeys, first menu item is focused to enable further
keyboard navigation.
2018-06-13 05:57:14 -04:00
Shubham Padia 4516a72676 popovers: Add get_user_info_popover_items.
Gets menu items for the user profile popover. To be used to add
keyboard navigation to user_profile_menu.
2018-06-13 05:57:14 -04:00
Shubham Padia 68d58b92cc popovers: Refactor functions using get_action_menu_menu_items.
actions_menu_handle_keyboard now only gets the action menu items
and passes them to the newly added popover_items_handle_keyboard.
popover_items_handle_keyboard takes the key and menu items as its
parameters. The function can be used when handling keyboard input
like user profile popover. Similar refactor has been carried out in
focus_first_action_popover_item. This refactor is a part of adding
the missing support of keyboard navigation to user profile popover.
2018-06-13 05:57:14 -04:00
Lyla Fischer 3ccae20566 docs: Remove the footer, which directed people to help with docs. 2018-06-12 13:42:30 -04:00
Eeshan Garg 0a43e5e257 Replace all user-facing references to "invite-only" with "private".
Fixes #9611.
2018-06-12 13:37:45 -04:00
Shubham Dhama d060101cfa message: Fix opening of compose box on mobile webapp. 2018-06-12 13:31:42 -04:00
Cynthia Lin 7772b99d24 night-mode: Fix incorrectly-colored user profile in mobile view. 2018-06-12 13:13:19 -04:00
Steve Howell 31a8eca4d0 refactor: Extract do_populate_profile_fields.
This makes it easier to write tests (since you
can't set meta.loaded to true directly) and
separates out the concern of short-circuiting
updates.
2018-06-12 10:15:18 -04:00
Shubham Dhama 80a2d5bc59 eslint: Enable `conditionalAssign` config of no-trailing-spaces rule. 2018-06-11 07:51:24 -04:00
Shubham Dhama dcb6254a4e eslint: Enable `no-extra-parens` rule.
Following sub-configuration is disabled:
                "nestedBinaryExpressions": false,
2018-06-11 07:51:24 -04:00
Yashashvi Dave 40590bb6b9 custom fields: Fix exception in rendering custom profile field template.
The function `settings_account.add_custom_profile_fields_to_settings`
called twice, which resulted in two templates objects being
rendered.

The function also didn't check whether settings overlay was open or
not when processing new events, and thus would throw an "undefined"
error if a custom profile field was editing while the overlay was not
open.

Fixes #9668.
2018-06-10 13:50:38 -07:00
Shubham Dhama 51ae82fbcf left-sidebar: Fix opening of compose box on narrowing using hotkeys.
Explaining the problem a bit: When we narrow to a stream/private message
using `q+Enter`/`w+Enter` compose box opens which isn't desirable here.
The bug here was the propagation of event after getting handled in
`keydown_util.handle` to `hotkeys.process_enter_key`.

Fixes: #9679.
2018-06-09 12:53:24 -04:00
Rishi Gupta 283d530f68 portico: Add svgs and update pngs for why-zulip. 2018-06-09 00:08:54 +03:00
Felix Yan 974f015837 js: Fix a typo in search.js. 2018-06-08 12:14:55 -07:00
Cynthia Lin 88795898a2 message edit: Fix edit author text overflow on images.
Fixes #9175.
2018-06-08 07:49:28 -07:00
Akash Nimare 9955580251 help: Remove outline from article links.
This commit removes the ugly dotted outline from the article links.
This bug can only be seen in Mozilla since it adds the outline in all
the links.
2018-06-07 11:21:13 -07:00
Akash Nimare 64c668b881 help: Update default article heading on help pages.
We should only open the default article heading which is "Guides",
if the user is on the index page i.e. /help/. For non index pages
we don't need to open this heading.
2018-06-07 11:21:12 -07:00
Akash Nimare 4b3309f3f0 help: Close other article headings on click.
This commit adds a minor improvment in clicking
the left sidebar behaviour. So if you click on
an article heading then other opened headings will
be closed automatically. This makes the toggle
experience better.
2018-06-07 11:20:10 -07:00
Akash Nimare 733b1a14bb help: Highlight article heading in left-sidebar.
This fixes a bug where we don't toggle the article heading
if you open it direclty.

Fixes: #9700.
2018-06-07 10:51:59 -07:00
Shubham Dhama ed7373febb profile: Fix glitch when exiting custom profile display UI.
Tweaked by tabbott to add a brief comment explaining the issue.

Fixes: #9702.
2018-06-07 09:03:19 -07:00
Yashashvi Dave f7f039e772 custom fields: Add endpoint to delete value of custom profile data.
Add delete endpoint at `users/me/profile_data` to delete value of
custom profile data.

Fixes #9669
2018-06-07 08:35:04 -07:00
Yashashvi Dave f725fa591d custom fields: Fix all fields background color.
Fix url and date type of fields background color to
match with other filed's background color.
2018-06-07 08:31:27 -07:00
Adam Birds 5855fe3e53 integrations: Add Zabbix webhook.
With a few changes to the documentations by Eeshan Garg.
2018-06-07 08:31:24 -07:00
Yashashvi Dave b9b923aab6 user profile: Display local date format in user profile.
Display local date format in date type of inputs in user profile
popover, i.e. joined_date, date-type-custom-field.
2018-06-06 15:06:26 -07:00
Anupam Dagar 8939767452 message view: Add loading indicator to bankruptcy modal.
Tweaked by tabbott to remove the old logic, which wasn't be displayed
and regardless didn't look as nice.

Fixes: #9629.
2018-06-06 15:06:05 -07:00
Max Nussenbaum 0f77a1f81d portico: Restyle blockquotes on Why Zulip.
This restyles the blockquotes on the Why Zulip page.
2018-06-06 14:54:38 -07:00
Rishi Gupta 634c4516a7 portico: Add svgs of sea creatures. 2018-06-06 13:57:55 -07:00
Max Nussenbaum d57beb40c7 portico: Small style fixes for landing page tour.
Updates the landing page tour to improve some of the included
images.
2018-06-06 13:26:30 -07:00
Steve Howell 3065bf0c58 settings: Make the enter key go to panels.
This is less than perfect, but for most settings hitting
the enter key will now take you to the first element in
the right panel.

The two exceptions are below.  They have checkboxes with
kind of strange markup:

    Notifications
    Authentication methods
2018-06-06 09:42:33 -07:00
Steve Howell 8af04ac3cd toggler: Stop supporting payload target.
We no longer need the payload target for our callbacks.
2018-06-06 09:42:33 -07:00
Steve Howell e7e38253ec settings: Add better keyboard navigation for panel menus.
You can now use all four arrow keys intuitively in the
Settings/Organization panel menus.
2018-06-06 09:42:33 -07:00
Steve Howell a5f0163a67 Keep track of which settings sections are open.
If you toggle between Settings and Organization now, it
will remember where you were the last time (not counting
reload).  Likewise if you go in and out of settings.

The old code always put you in the first section, which I
think was an accident of implementation.  Of course, we'll
continue to default to the first row if you haven't gone
anywhere else.
2018-06-06 09:42:33 -07:00
Steve Howell beecee4b8c Move panel click handler into settings_panel_menu.js.
This is mostly a code move, but because things are more
modular now, we don't need the two conditionals to find
out what kind of panel menu we're inside of, and our
selectors are less brittle.
2018-06-06 09:42:33 -07:00
Steve Howell 8ce8e93645 refactor: Extract settings_panel_menu.js. 2018-06-06 09:42:33 -07:00
Steve Howell db514002ec settings: Use separate lists for the two sidebar panels.
The list with the options for normal settings now has
the class normal-settings-list.

The list with the options for org settings now has
the class org-settings-list.

The new markup helps us avoid code like this:

    $(".settings-list li:not(.admin)")

We also have funny hacks in our key handlers related
to the old combined-list approach, which we can
eventually eliminate.
2018-06-06 09:42:33 -07:00
Shubham Dhama f148ed5bbf org settings: Improve error handling status elements.
With styling work by @maxnuss.

Fixes: #9188.
2018-06-06 09:00:35 -07:00
Akash Nimare 84d3a4dbf3 help: Fix back button on help pages.
We should use update_page function for popstate
event so that we can fetch and update the help
articles correctly.

Fixes: #9617.
2018-06-06 03:18:58 +05:30
Akash Nimare 3a8a5a39bd help: Extract code for updating the page.
This commit extracts the code for updating
help page to update_page function.
2018-06-06 03:13:56 +05:30
Akash Nimare 5a2c19c67e help: Refactor code in help.js.
This commit organizes the code properly i.e.
declaring variable on top of the function and
moving window events in the bottom.

Fixes: #9617.
2018-06-06 03:01:52 +05:30
Tim Abbott d5206be969 settings: Fix high contrast mode not being development-only.
This feature is unfinished and doesn't do anything yet.
2018-06-05 10:10:53 -07:00