Commit Graph

3254 Commits

Author SHA1 Message Date
Brock Whittaker 24b5030776 settings: Add perfectScrollbar to uploads table.
This adds the perfectScrollbar to the uploads table so that it will
function properly in the settings container since the parent node has a
perfectScrollbar.
2017-09-28 14:13:33 -07:00
Brock Whittaker 7b8fd1aafb settings: Add file search to the uploads table.
This uses the searching capabilities of the list_render class to search
for files by name; normalized by lowercase locale.
2017-09-28 14:13:33 -07:00
Brock Whittaker 7882039a11 settings: Add `list_render` basics to the uploads table.
This implements the basic form of list_render to the uploads table so
it will now load progressively.

Fixes: #6746.
2017-09-28 14:13:33 -07:00
YJDave e3917b7d63 portico-signup: Strip whitespace from email fields.
This strips out whitespace from the email fields on the register
and login screens.

Fixes: #6578.
2017-09-28 11:53:23 -07:00
Tim Abbott 9187acfb8c apps: Point to the current Android app. 2017-09-28 11:26:52 -07:00
Rhea Parekh 31d3b1ecc0 user settings: Update user popover on updating avatar.
Previously, we were incorrectly not using the latest data available on
the frontend to compute the URL for the larger avatar image.

Fixes: #6702.
2017-09-28 10:03:45 -07:00
Tim Abbott 0744961afe docs: Add more comprehensive documentation on error reporting.
Fixes #2232.
2017-09-27 19:47:08 -07:00
Brock Whittaker 983be4e8ce right-sidebar: Add perfectScrollbar to the right sidebar.
This adds the perfectScrollbar to the right side and theoretically
updates it any time a piece of code interacts with the sidebar and
updates the counts of users displayed in it.
2017-09-27 19:21:20 -07:00
Brock Whittaker 43fd0e8134 /apps/: Show download instructions selectively based on device.
This shows the download instructions only selectively based on
whether the device has download instructions for it. This means
currently it shows the page for Windows, Mac, and Linux.
2017-09-27 18:48:52 -07:00
Brock Whittaker ce6a262c28 settings: Fix "Notifications stream" list scrolling.
The list needs to be set to use perfectScrollbar so that it can
scroll due to the fact that it resides within another instance of
perfectScrollbar.

Fixes: #6351.
2017-09-27 18:46:19 -07:00
Brock Whittaker 38b3eeb332 left-sidebar: Combine two selections for `#stream-filters-container` to one.
This combines two different selections of the
`#stream-filters-container` into one chained selection and writes a
comment on how it is possible due to the return value of `.css`.
2017-09-27 18:09:45 -07:00
Vishnu Ks 17cc32f168 settings: Show error or success message when deleting uploaded files.
Fixes #6519
2017-09-27 17:50:22 -07:00
Vishnu Ks 8faa9ab214 settings: Show upload quota and total uploads size in uploaded files page.
Fixes #6408
2017-09-27 17:50:22 -07:00
Vishnu Ks 865bc06945 settings: Show attachment size and upload date in uploaded files page. 2017-09-27 17:50:22 -07:00
Brock Whittaker 5331e52f6d settings: Convert tables to use perfectScrollbar.
This converts tables in the organization section to use
perfectScrollbar.
2017-09-26 22:54:20 -07:00
Harshit Bansal ef4337edcb hotkey: Remap `+` key to use canonical name for thumbs up emoji. 2017-09-26 16:50:00 -07:00
Tim Abbott bb1b771c44 topic_list: Fix a linter error. 2017-09-26 14:45:27 -07:00
Brock Whittaker be64c43cc5 emoji-popover: Add centered layout for mobile/responsive.
This adds a centered layout for mobile and responsive screens where the
emoji picker is guaranteed to be in the center of the screen, and the
rest of the screen darkens behind it.

Fixes: #6291.
2017-09-26 14:18:20 -07:00
Cynthia Lin 0fa8235c5d onboarding: Remove initial whitespace in Custom invitation message.
Fixes #6666.
2017-09-26 14:15:11 -07:00
Alena Volkova abe4196232 urls: Change the method for adding alert words from PUT to POST. 2017-09-26 14:00:51 -07:00
Steve Howell b17fecbf06 Turn off more-topics features temporarily.
The features turned off by this commit require a bit more CSS
polish before we deploy them.  This commit should be reverted
to turn elements back on.
2017-09-26 13:58:54 -07:00
Steve Howell 0b25d3125d Add a help link for topics when we expand topics. 2017-09-26 13:58:54 -07:00
Steve Howell f4f193b5ca topic list: Scroll to the top earlier when zooming.
We want to scroll the left sidebar to the top as soon as the user
zooms in on a stream, and we don't want to wait for the server,
otherwise we'll get jumpiness.
2017-09-26 13:58:54 -07:00
Steve Howell 9f10cc62d6 Show a message when there are no more topics.
This commit is a bit complicated, because we do full redraws of
the topic list frequently, and we don't want to randomly obliterate
our "No more topics found" message, so we need to keep a bit of
extra state around.
2017-09-26 13:58:54 -07:00
Steve Howell cdfa3dea9a Add "searching..." indicator when loading more topics. 2017-09-26 13:58:54 -07:00
Steve Howell 490935249c Simplify rendering of "more topics" link.
We now use a template to render the "more topics" link.

We also remove an unnecessary conditional and an unnecessary
attribute.

Finally, our unit tests are a bit more granular now.
2017-09-26 13:58:54 -07:00
Steve Howell 544bbab480 refactor: Require explicit call to build topic list.
This will make testing a bit easier (we can stub stuff before
building the widget), and it will eventually give us more control
on redrawing the topic list.
2017-09-26 13:58:54 -07:00
Steve Howell 120d83f9c4 refactor: Avoid passing around active_topic as much. 2017-09-26 13:58:54 -07:00
Steve Howell cac54226b2 refactor: Extract build() method in topic_list.build_widget.
This sets us up for the next change.
2017-09-26 13:58:54 -07:00
Steve Howell 28a0139863 refactor: Simplify `max_topics` in topic_list.js.
We were parameterizing max_topics, but it made the calling sequences
unnecessarily complicated.  We don't ever override the value, not
even in tests, so now we just set in build_list().
2017-09-26 13:58:54 -07:00
Steve Howell 99fe3773df topic list: Refactor build_list().
This puts build_list on the widget object, which will make it a
bit easier to unit test, and it's more consistent with the rest of
the function.  This also reduces the scope of the `my_stream_name`
variable and moves the initialization of `self.topic_items` into
build_list.
2017-09-26 13:58:54 -07:00
Steve Howell 7da4dcd692 topic list: Ignore late server responses.
If a user re-narrows to another stream before our server gives
us more topic history, or they zoom out, we can avoid drawing
the topic list.  Note that our data structures will still be
updated, although the only time that really matters is for
the corner case of a low-traffic stream.  For a low traffic
stream that only had 3 or 4 topics in the original message
fetch, but has longer history, the next time you open the
stream in the sidebar, even when you're zoomed out, you will
see more topics.
2017-09-26 13:58:54 -07:00
Steve Howell 46e8005bfb Inline feature_flags.use_server_topic_history.
Despite a few warts, we are going forward with getting topic
history from the server when you click "more topics."  This
commit simplifies the code by removing the feature flag
checks.
2017-09-26 13:58:54 -07:00
Steve Howell d6fb17c424 docs: Add typing-indicators.md. 2017-09-26 13:42:14 -07:00
Tim Abbott 16b3feb97d echo: Document the latest timestamp/rendering changes. 2017-09-26 13:01:39 -07:00
Steve Howell 39a4436af9 Override client-side timestamps when server send messages.
When we get messages from the server, via the event loop, we
should update client timestamps to reflect the server values.

Fixes #6638.
2017-09-26 12:58:44 -07:00
Steve Howell b32c3273dc Always re-render locally echoed messages.
Our old optimizations to prevent re-rendering of locally echoed
messages created a lot of code complexity.  This commit is an
experiment to simplify the code, which it clearly does.  The
danger of re-rendering messages is flicker, but our message
view has changed since the original local echo code was written.
2017-09-26 12:50:01 -07:00
Steve Howell fa6a118d51 refactor: Fix filter-based code in echo.process_from_server.
It's kind of confusing to have a filter function that has massive
side effects.  Now we just have a simple loop where we triage
some messages into non_echo_messages and do an early-exit in the
loop function.  This change also introduces the more explicit
variable name of `non_echo_messages`; before we were shadowing
`messages`.
2017-09-26 12:50:01 -07:00
Rishi Gupta 9cec8f08d1 hotspots: Turn on hotspots for new users.
We need a migration to clear the tutorial_status for existing users,
so that we don't show hotspots to anyone who signed up for Zulip in
the month or so since we deleted the old tutorial.
2017-09-25 15:47:34 -07:00
Brock Whittaker b1e52610dc Remove selection on longtap.
This removes the text selection that occurs on longtap due to the
standard iOS/Android behavior.

Fixes: #6480.
2017-09-25 12:31:07 -07:00
Joshua Pan 178f5080cf hotkey.js: Switch 'q' and 'w' hotkeys.
On a standard keyboard, 'q' is to the left of 'w', so it makes sense
for the hotkeys for the left and right sidebars to be `q` and `w`,
respectively, not the other way around.
2017-09-25 12:14:07 -07:00
Cory Lynch 1c0043ea47 Add empty narrow msg for group-pm-with.
Also added test case.
2017-09-24 15:13:58 -04:00
Cory Lynch f8c49f4dab Make 'group-pm-with' more error-resistant.
Previously, if the operand was an invalid email, the site would
throw a scary-looking browser error. Now, it has the same behavior
as other search exeptions, and simply returns no messages found.
2017-09-24 15:13:55 -04:00
Cory Lynch a90eda0154 Add 'group-pm-with' to operator autocomplete.
As you're typing this new keyword, it should be suggested
via get_operator_suggestions. Added relevant test.
2017-09-24 13:56:33 -04:00
Abhijeet Kaur 2bf3324395 frontend: Add ability to search by "group-pm-with" search operator.
This allows user to view all group private conversation messages
with a specific user. That is, it views all the the group private
messages from groups which include the given user.

Add search suggestion for group-pm-with. Add operator name
and description in "Search operators" tab.

Add change in tab name to "Group Messages" when using this operator.
Add frontend_tests for group-pm-with search operator.

Fixes: #3882.
2017-09-24 11:58:48 -04:00
Abhijeet Kaur 4bd8638193 js: Update variable name from message_ids to user_ids in 'filter.js' file.
Update variable name in static/js/filter.js from 'message_ids'
to 'user_ids' for better understanding. As it is an array of user
recipients of a particular message.
2017-09-24 11:40:44 -04:00
Steve Howell f965a156a9 Revert "Get unread messages from the server in the web app."
This reverts commit c953759486.

The client side logic for dealing with server counts is actually
fine, as far as we know, but there are still some data-related
issues with cleaning up old unread counts.
2017-09-22 10:20:19 -07:00
Cynthia Lin 395a71a433 subs: Fix jerky stream subscriptions scrolling with up/down keys.
Fixes #4230.
2017-09-22 05:09:14 -07:00
Brock Whittaker e0a9310c41 subscriptions: Maintain scroll position when subscribing.
The current behavior is that when you subscribe to a new stream
the scroll position moves back up to the top because the list updates,
when in reality the user shouldn't notice this, so we record the
previous scroll position and then apply it once the DOM update is
finished before the next paint cycle.

Fixes: #6606.
2017-09-21 09:09:45 -07:00
akashnimare ab11b7213b js: Replace ZulipDesktop useragent check for old desktop app.
Checking for window.bridge !== undefined is how the old desktop app
had always been tested for in the JS codebase.

Also, "Zulip Desktop" is how this should have been spelled in the first place.

Tweaked by tabbott to provide a proper commit message.

Fixes #6580.
2017-09-20 05:22:24 -07:00
Joshua Pan b201e2c311 hotkey.js: Simplify ctrl+[ hotkey logic. 2017-09-19 19:07:30 -07:00
Joshua Pan d387291b6c reactions.js: Extract open_reactions_popover().
Added tests for open_reactions_popover() also.
2017-09-19 19:07:30 -07:00
Joshua Pan 67064a46e5 compose_state.js: Extract focus_in_empty_compose().
Wrote some tests for the function also.
2017-09-19 19:07:30 -07:00
Brock Whittaker 79933e27a4 Utilize lower 40px of the page for the left sidebar.
This makes the total left sidebar real estate 40px taller and brings
it flush with the bottom of the screen, giving more room to the
streams list.

Fixes: #6549.
2017-09-19 18:44:50 -07:00
Brock Whittaker d1ef863f96 Add perfectScrollbar to default streams table.
This adds perfectScrollbar to the default streams table
because it currently is inside another perfectScrollbar which
actually makes it impossible to scroll the table normally without
enabling the perfectScrollbar library on this.

Fixes: #6391.
2017-09-19 18:43:33 -07:00
Cynthia Lin bd7d9da668 hotkeys: Disable 'n' stream creation if user cannot create streams.
Tweaked by tabbott to handle a corner case and add test coverage.
2017-09-16 09:12:38 -07:00
Harshit Bansal 5662726a22 emoji_picker: Add ability to search by emoji aliases.
Fixes: #6250.
2017-09-16 08:24:05 -07:00
Harshit Bansal 6f7bf32e15 emoji_picker: Extract `toggle_reaction()` function. 2017-09-16 08:24:05 -07:00
Harshit Bansal 60b0e0f801 emoji_picker: Add `get_alias_to_be_used()` function.
Given a `message_id` and `emoji_name` this function returns the
alias of the emoji user used for reacting to this message, otherwise,
if he has not reacted returns the passed `emoji_name` as it is.
2017-09-16 08:24:05 -07:00
Harshit Bansal cf712b36c0 emoji.js: Add `emoji_aliases` dictionary.
This new dictionary contains a mapping from codepoint of an emoji to
all of its aliases.
2017-09-16 08:24:05 -07:00
Harshit Bansal dae51b821d message_controls: Don't auto-hide message control if a popover is open.
If a reactions picker is open then don't auto-hide the element over
which it is based off. Earlier we were inconsistently auto-hiding
some elements while keeping others visible.
2017-09-16 08:17:41 -07:00
Harshit Bansal afba03f84e emoji_picker: Change reaction popover's base element.
Change the reaction popover to be based off the container elements
for the various message control icons. This will enable us to easily
control the visibility of the base element when the popover is opened
or closed. Also removes redundant `reactions_hover` class.
2017-09-16 08:17:41 -07:00
Harshit Bansal 16885ef0a7 emoji_picker: Correctly restore the title attribute of base element.
Bootstrap's `fixTitle()` function removes the base element's original
title attribute. This commit fixes some weird behaviors by restoring
the original title of the element on which the popover is based off.
2017-09-16 08:17:41 -07:00
Harshit Bansal 918e2519b0 emoji_picker: Bring focus back to filter on typing while navigating.
Fixes: #6112.
2017-09-16 08:14:47 -07:00
Tim Abbott e8820f4456 modals: Don't close settings modals when clicking inside modal.
We only want to close the modal if you click outside its area.

Fixes #6566.
2017-09-16 03:44:42 -07:00
Brock Whittaker 32af99cd4d Display an error for the ZulipDesktop unsupported platform.
This displays an error at the top of the screen on page load that
will inform any user with the userAgent string "ZulipDesktop" that
they should upgrade to our newer electron app

Fixes: #6551.
2017-09-16 03:01:51 -07:00
Brock Whittaker b5db5c9703 Show javascript exceptions and `blueslip.error` in development.
This now shows `blueslip.error` and other JS exceptions in development
in the alert box at the top of the page.  Hopefully this will make it
a lot easier to notice newly introduced JS exceptions when working on
Zulip.

Tweaked by tabbott to handle all JS errors, not just blueslip.error.

Fixes: #6155.
2017-09-16 01:02:28 -07:00
Rishi Gupta b9c8747bd0 hotspots: Use tutorial_status to manage whether we show hotspots. 2017-09-15 04:14:52 -07:00
Rishi Gupta ac48772732 hotspots.js: Fix timeout millisecond conversion. 2017-09-15 04:14:52 -07:00
Rishi Gupta a8deedbbb6 hotspots: Replace stream_settings with intro_streams and intro_topics. 2017-09-15 04:14:52 -07:00
Rishi Gupta 0677bd2a6d hotspots: Rename and update new_topic_button. 2017-09-15 04:14:52 -07:00
Rishi Gupta 4a383544af hotspots: Rename and update click_to_reply. 2017-09-15 04:14:52 -07:00
Rishi Gupta c985791773 hotspots.js: Inline map_hotspots_to_DOM.
The function is confusing and added unnecessary complexity, given that it is
only called in one place, and is not a function that should be exposed to
other modules.
2017-09-15 04:14:52 -07:00
Rishi Gupta 546384ce30 hotspots.js: Refactor place_icon for clarity. 2017-09-15 04:14:52 -07:00
Rishi Gupta 91819fa694 hotspots.js: Give names to long selectors in place_icon. 2017-09-15 04:14:52 -07:00
Rishi Gupta 9f7b310a3e hotspots.js: Do not place_popover if icon is not visible.
Attempting to do so throws an exception if hotspot.location.element can't be
found.
2017-09-15 04:14:52 -07:00
Rishi Gupta 836a2c502e hotspots.js: Clean up icon positioning code.
Also will allow more fine-grained positioning.
2017-09-15 04:14:52 -07:00
Tim Abbott 27bb680aa5 message_list: Fix exception with nonexistent streams.
If the stream no longer exists, we don't need to try to show a stream
resubscribe UI.
2017-09-15 01:59:24 -07:00
Tim Abbott c330c75e3c message_list: Refactor stream->stream_name local variable. 2017-09-15 01:59:24 -07:00
Sampriti Panda e98d7a6ee8 Fix issues with left-sidebar stream search and multiple words.
If you typed in more than one word for a stream with multiple words in
it's name, it would not show up in the search list. This fixes that
and adds some more tests covering the entire functionality of the
filter.
2017-09-15 00:22:59 -07:00
Cory Lynch f4a09b7758 recent_senders: Add sort by stream message recency.
If both users haven't posted in the current topic, then
as a second order sort, check which user has posted first
in the stream as a whole.

Fixes part of #5956; we still need to sort by sending in the
organization.
2017-09-14 07:20:52 -07:00
Vishnu Ks d8f8e29ff5 frontend: Show link to delete files in quota exceeded error. 2017-09-14 06:04:09 -07:00
Joshua Pan 0fd9f0bcc9 hotkeys: Make 'v' hotkey toggle. 2017-09-14 05:56:55 -07:00
Joshua Pan 42b05912f8 hotkeys: Make '?' hotkey toggle. 2017-09-14 05:56:55 -07:00
Sarah c3a8138f74 user_settings: Add push notifications for all stream messages.
Add setting to enable push notifications for all stream messages.
2017-09-14 05:41:37 -07:00
Steve Howell c953759486 Get unread messages from the server in the web app.
The server sends down lists of unread message ids in various
buckets, and we now use those on the client to provide more
complete counts of unread messages.
2017-09-12 06:02:40 -07:00
Sampriti Panda 073bc318cf compose: Fix rendering error with message edit forms.
Fixes #6412
2017-09-11 09:24:11 -07:00
Yusei Tahara 56cb06dc19 lightbox: Fix repeated code in exports.open.
Call display_XXX function after the payload if-clause, don't repeat
the same thing.
2017-09-10 00:40:03 -07:00
Cynthia Lin b2f7c80ed2 click_handlers: Remove duplicate compose state checks. 2017-09-08 23:20:43 -07:00
Cynthia Lin 19e134698e compose: Refocus compose box if message view link is clicked.
Fixes #4331
2017-09-08 11:30:57 -07:00
Cynthia Lin ead2a4c071 left sidebar: Prevent closing in responsive mode.
Fixes #2913
2017-09-08 11:20:36 -07:00
Cynthia Lin 99025c8f10 search: Remove search close button when narrowed to home view.
Fixes #6426
2017-09-08 11:13:06 -07:00
Akash Nimare bf470d3d1e updated desktop app to v1.4.0 2017-09-08 07:55:25 -07:00
Greg Price 0986fe700d i18n: Keep markup out of a translated string where we easily can.
Use jQuery DOM construction methods, rather than string concatenation,
to keep things structured and to stay clear of the lint rules introduced
in ee6235d71.
2017-09-07 13:00:54 +09:00
Steve Howell 8e2d9b8f68 Make recipient bar styling more compact and clean. 2017-09-06 18:49:54 -07:00
Steve Howell ad52ef27ee Make tab styling more compact and clean. 2017-09-06 18:49:54 -07:00
Robert Hönig 910f04af29 bot settings: Properly hide bot_table_error. 2017-09-06 13:44:02 -07:00
Cynthia Lin ec36382857 settings: Prevent backdrop leak when clicking outside of modal.
Fixes #3791 and closes #3794
2017-09-06 09:35:16 -07:00
Cynthia Lin f697e6bb0e modals: Implement new modal methods. 2017-09-06 09:35:16 -07:00
Cynthia Lin aa21b2bce6 overlays: Create modal helper methods to manage display status. 2017-09-06 09:35:16 -07:00