Commit Graph

4249 Commits

Author SHA1 Message Date
Yashashvi Dave 3654d4f92d jquery-form: Remove jquery-form use from get-API-key form in user settings. 2018-05-30 03:14:39 +05:30
Robert Hönig 04d68d2570 code: Rename flaskbotrc to botserverrc. 2018-05-29 10:19:17 +02:00
Steve Howell 0bc272fc86 hotkeys: Fix very recent regression with down key.
In 1f72647a5a I accidentally
flipped a condition that made the down key "recenter" on
the "normal" case, not in the "is-at-end" case.

This commit undoes that regression, which probably only
affected czo for a weekend, and makes the logic a bit
more clear.
2018-05-28 16:49:57 -07:00
Steve Howell 26e1fca7ed Add message_list.is_at_end() helper. 2018-05-28 16:49:57 -07:00
Shubham Padia 88b4a9f2d7 pm_list: Do not expand pm_list for invalid emails in `pm-with`. 2018-05-28 11:29:54 -07:00
Shubham Padia d9b0ab2ae7 narrow: Show non-existing user message for invalid emails.
Also adds people.is_valid_bulk_emails_for_compose and refactors
narrow_state.set_compose_defaults to use it.
2018-05-28 10:45:42 -07:00
Shubham Padia 6ea6f5e0af search: Do not open compose box if invalid recipient present in `pm-with`.
If atleast one of the private_message_recipients is invalid, compose
box will not be opened.
Thanks to Aastha Gupta <aastha.gupta4104@gmail.com> for some preliminary
work on this.
2018-05-28 10:45:42 -07:00
Yashashvi Dave 40029a0753 user profile: Improve format of date type of custom fields in popover.
In user profile popover, date type of custom fields values are
not showing in correct format as "date_joined" value.
Fix this using moment.js to render date type of fields
in correct format.
2018-05-27 23:01:22 -07:00
Yashashvi Dave a68ff22aed custom fields: Improve date picker popover for date type fields. 2018-05-27 23:01:22 -07:00
Yashashvi Dave b5cf73ae0c custom fields: Add UI for user type of custom fields. 2018-05-27 23:01:22 -07:00
Yashashvi Dave e82c879b85 custom fields: Add user type of custom fields.
Fixes #8878
2018-05-27 23:01:21 -07:00
Yashashvi Dave ba72780678 js/settings_account.js: Add generic func to update custom profile fields. 2018-05-27 22:57:05 -07:00
Steve Howell 1f72647a5a navigate: Use msg_list.prev/next for up/down methods.
We've had rare and hard-to-track-down glitches with our
old implementation for going up and down in the message
list, which was using jQuery selectors.

We now just use MessageListData under the hood to find
our next id.
2018-05-27 22:41:19 -07:00
Steve Howell a074056127 Add prev/next helpers for MessageList. 2018-05-27 22:41:19 -07:00
Rishi Gupta d28a4d1f86 stats: Remove hour from on-hover date for Number of users. 2018-05-26 12:08:05 -07:00
Rishi Gupta 2b97a9488f stats: Fix on-hover behavior of number of users.
Fixes regression introduced in fa9d79e.
2018-05-26 12:08:05 -07:00
Tim Abbott c3a81157de help: Fix ordering of code sections work and scrollbar update.
Conceptually, the scrollbar update should be after we've rendered the
code blocks.
2018-05-26 10:04:46 -07:00
Tim Abbott b7f9139ffc help: Render all HTML tables with the bootstrap striped theme. 2018-05-26 10:04:46 -07:00
Cynthia Lin 818611ac4e user groups: Sanitize pill_container selector to avoid escaped strings.
Fixes #9325.
2018-05-25 12:02:34 -07:00
Robert Hönig 53891a9bed bots: Don't name section headers in flaskbotrc.
The Botserver uses section headers in the flaskbotrc to
determine which bot to run. Silently setting the section
headers to a bot's username is confusing and makes it
harder for Botserver users to figure out how to get the
Botserver to run the bots they want. This commit empties
all flaskbotrc section headers and thus makes the assignment
of bots explicit and mandatory.
2018-05-25 10:33:40 -07:00
Shubham Padia 5d750a5d44 search: Respect spaces in person name in new suggestions only.
Fixes #6515.
New suggestions for `sender:King ha` will respect spaces and the new
suggestion will be `Sent by King Hamlet <email>` instead of `Sent by King,
search for ha`. But if first term of sender operand is a valid user email,
tokens will be seperated by spaces. e.g `sender:hamlet@zulip.com abc`
will show `Sent by King Hamlet <email>, search for abc`.
2018-05-25 09:03:27 -07:00
Steve Howell 034164945f Fix tracebacks related to direct use of msg_list._items.
We had debug code that was reaching into msg_list._items when
it could use msg_list.all_messages() instead.

When we split out MessageListData, using _items started
breaking this code.
2018-05-25 08:28:56 -07:00
Akash Nimare 683fbf68ce portico: Move carousel forward on clicking inside tour container.
Fixes: #9540.
2018-05-25 18:49:20 +05:30
Tim Abbott 6967b6519d settings: Add a development-only setting for less dense mode.
This should make it easier for us to iterate on a less-dense Zulip.

We create two classes on body, less_dense_mode and more_dense_mode, so
that it's easy as we refactor to separate the two concepts from things
like colors that are independent.
2018-05-24 12:31:37 -07:00
Akash Nimare dc54260cce desktop: Update app version to v2.3.1. 2018-05-24 12:19:43 -07:00
Steve Howell 1b57e568ff Add "zform" functionality to the web client.
A "zform" knows how to render data that follows our
schema for widget messages with form elements like
buttons and choices.

This code won't be triggered until a subsequent
server-side commit takes widget_content from
API callers such as the trivial chat bot and
creates submessages for us.
2018-05-24 09:30:22 -07:00
Steve Howell 435719c65b Add a schema checking concept to the web app.
This starts the concept of a schema checker, similar to
zerver/lib/validator.py on the server.  We can use this
to validate incoming data.  Our server should filter most
of our incoming data, but it's useful to have client-side
checking to defend against things like upgrade
regressions (i.e. what if we change the name of the field
on the server side without updating all client uses).
2018-05-24 09:30:22 -07:00
Steve Howell a5dee62b8f transmit.js: Add reply_message(). 2018-05-24 09:30:22 -07:00
Steve Howell 65841790b8 submessages: Add try/catch around main entry point.
We should probably have a try/catch in MessageListView itself
too, for post-processing kind of stuff, but we want to make
this new module defensive in its own right.
2018-05-24 09:30:22 -07:00
Tim Abbott 5a5ca12f6f hotkey: Move ctrl+[ back from cmd+[.
This was incorrectly changed; the goal here is to match what vim does
for this keyboard shortcut.

Fixes #9525.
2018-05-24 08:31:55 -07:00
Joshua Pan dcee398622 onboarding: Redesign intro_reply hotspot in bottom whitespace.
This is a trial to have the first reply hotspot in the bottom
whitespace (and stick there until "Got it!"  is pressed).

Tweaked by tabbott to clean it up a bit.  Still needs more work on the
visuals.
2018-05-23 14:22:19 -07:00
Harshit Bansal 6ee32ee512 minor: Add a comment explaining the need of `stopPropagation()`. 2018-05-23 14:07:30 -07:00
Yashashvi Dave 958040b1fc user_pills: Extract generic functions for typeahead and pill creation.
This refactoring make it easier to use our user pill typeahead logic
in other parts of the app.

Two commits by Yashasvhi squashed together by Tim.
2018-05-23 12:07:16 -07:00
Shubham Dhama ec4e5e73ab org settings: Make time limit input elements inline to dropdown.
(To make the capitalization pass we added `N` to ignored phrases.)
2018-05-22 19:32:44 -07:00
Steve Howell eb5763ee36 widgets: Prevent traceback for submessage event.
We can have this scenario:

    - somebody else creates a widget-ready message
    - message arrives in storage
    - (message is not yet in view, so no message.widget)
    - new submessage event arrives

We want to just ignore submessage events in that case.

(There's a more complete fix coming for this scenario, where
we at least update message.submessages for the eventuality
that we do render the message later.)
2018-05-22 22:39:24 +00:00
Armaan Ahluwalia 1525e92058 logging/errors/webpack: Improve error stack traces with blueslip.
This commit improves the output that blueslip produces while
showing error stack traces on the front-end. This is done by
using a library called error-stack-parser to format the stack
traces.

This commit also edits the webpack config to use a different
devtool setting since the previous one did not support sourcemaps
within stack traces. It also removes a plugin that was obviated
by this change.
2018-05-22 14:36:41 -07:00
Shubham Dhama a001424a4b org settings: Use do_settings_change for auth method checkboxes.
Fixes: #9224.
2018-05-22 14:03:20 -07:00
Shubham Padia a5db885d62 search: Display invalid operand suggestion for `is` operator.
Fixes #9492.
`is` operator uses predefined categories. This commit
displays an invalid operand message if the operand does not fall into
any of these categories and the `is` operator is not at the last.
e.g. `is:abc sender:abc@zulipchat.com` will have `invalid abc operand
for has operator, sent by abc@zulipchat.com` as a prefix for all its
suggestions.
2018-05-22 18:27:50 +05:30
Shubham Padia e5b3fb332b search: Do not show default suggestion for `is` operator.
Fixes #9492.
Default suggestion e.g `abc messages` as a suggestion for `is:abc`
is not shown in a new suggestion. But if the is operator is already
present before any other operator, the default message text will be
used. e.g `is:abc sender:abc@zulipchat.com` will have all the suggestions
with the prefix `abc messages, sent by abc@zulipchat.com`.
2018-05-22 18:16:02 +05:30
Shubham Padia 4a78c00397 search: Rank "messages sent by" above "PMs with".
Fixes #9313.
2018-05-21 22:38:57 -07:00
Shubham Padia 17d4908667 search: Show negated suggestions for sent by me filters. 2018-05-21 22:38:14 -07:00
Shubham Padia d5976e9501 search: Show negated suggestions for stream filters.
Fixes #9461.
Adds negated suggestions for stream filters when the query is negated
which were previously being returned empty.
2018-05-21 22:38:14 -07:00
Shubham Padia 3d545abf9d search: Remove redundant get_containing_suggestions function.
`get_containing_suggestions` was used to get the operand suggestions
for the `has` operator. `get_special_filter_suggestions` is now used
to get both the operand and operator suggestions for `has`.
2018-05-21 22:38:14 -07:00
Shubham Padia 547f2ccae6 search: Show negated suggestions for category wise filters.
Partially fixes #9461.
Negated suggestion for both operand and operators are handle in
get_special_filter_suggestions. A bug is get_operator_suggestions
causing the removal of `-` symbol from the operand was also fixed.
2018-05-21 22:38:14 -07:00
Tim Abbott 106d06b235 streams: Rename change_change_subscription_type to reference permissions.
This is a preparatory refactor for when we start having other
permissions options available in this UI (e.g. announcement-only streams).
2018-05-21 16:14:18 -07:00
Tim Abbott 9df3480263 streams: Remove now-obsolete can_make_public and can_make_private.
Now that we've moved it into a bulleted set of options inside a modal,
there's no good reason to have separate variables for the corner cases
around who can manage a stream.
2018-05-21 16:12:50 -07:00
Eeshan Garg 9c8865ba76 frontend: Add UI to create/edit private streams with public history.
This completes the effort of making this a user-facing feature.
2018-05-21 16:03:06 -07:00
Steve Howell d81419c79d Fix regression with stream_has_topics().
Our logic for stream_has_topics never accounted for
us creating essentially "empty" stream buckets that
don't have topics, but we recently added some code
related to unread counts that violated the original
assumptions of the code.

Now we check deeper into the stream bucket to find
actual topics.

This bug manifested in the left sidebar where users
were seeing streams as recently active just because
some muted topics had unread counts, when in fact
the stream was inactive for practical purposes.
2018-05-21 12:58:04 -07:00
Steve Howell 0816f2552b widgets: Remove spammy blueslip.info for submessages.
Having submessages will become common enough that the
info message here is too spammy, and there are other
ways to observe incoming submessages if you're doing dev
debugging, which this was originally written for.
2018-05-21 12:58:04 -07:00
Steve Howell f26e85ded3 widgets: Fix tracebacks for events without messages.
We could get submessage events for messages that weren't
in our message store if somebody played with a widget
that was on an "old" message for somebody else.
2018-05-21 12:58:04 -07:00