Commit Graph

4291 Commits

Author SHA1 Message Date
Tim Abbott 4b72b461e5 user_events: Fix buggy-looking logging code.
The previous logging exception looked like it sorta left off.
2017-08-16 16:23:41 -07:00
Aditya Bansal 7beeef9782 emoji_picker: Export emoji_collection and complete_emoji_catalog. 2017-08-16 19:18:26 -04:00
Aditya Bansal 406806b7df emoji_picker: Start using current emoji categories for rendering. 2017-08-16 19:18:26 -04:00
Aditya Bansal 245d571ae9 emoji.js: Refactor to make better use of initialize(). 2017-08-16 19:18:26 -04:00
Aditya Bansal 505262ca0b emoji_picker.js: Export initialize function. 2017-08-16 19:18:26 -04:00
Aditya Bansal 85fe355ba7 emoji_picker: Move click handler out from global scope.
In this commit we are moving the .emoji-popover-emoji.reaction
click handler to register_click_handlers() so as to have parity
with rest of the code design.
2017-08-16 19:18:26 -04:00
Tim Abbott 3a2a396303 zephyr: Fix tracebacks opening user info popovers. 2017-08-16 16:07:27 -07:00
Steve Howell 29c05c82f0 Fix A/D hotkeys for cycling through stream narrows.
We now use similar code for A/D hotkeys as we do for the "n"
key.

The old code was using jQuery operations that got tripped up
by our splitters between active and inactive streams.

Fixes #4569
2017-08-16 15:45:47 -07:00
Steve Howell b4590e1303 Add topic_generator.reverse_wrap_exclude().
This allows us to traverse a list backwards, cycling to the
bottom as needed.

This code is going to be used for the "A" key that cycles
upward in the stream sidebar.  It's probably overkill for
that use case, but it does give us O(1) behavior and avoids
the pitfall of accidentally mutating a list when reversing it.
2017-08-16 15:45:47 -07:00
Tim Abbott dac7cfa026 emoji picker: Fix exceptions with regex characters in emoji filter.
Previously, the Zulip webapp would throw an exception if you used a
character like "+" in your search query, since we were using regular
expressions, when really we should have been just searching for
characters.
2017-08-16 13:06:05 -07:00
Tim Abbott 7a5c6628a6 server_events: Fix formatting of server_events exception. 2017-08-16 11:59:49 -07:00
Vaida Plankyte cd1b01996e frontend: Add perfectScrollbar to invite users modal. 2017-08-16 08:23:34 -07:00
Vaida Plankyte 11d935f52a frontend: Add perfectScrollbar to right pane of manage subs overlay.
Tweaked by tabbott to use a more precise selector.
2017-08-16 08:23:34 -07:00
Vaida Plankyte 8ae263bf15 frontend: Add perfectScrollbar to left sidebar of manage subs overlay.
Tweaked by tabbott to use a more precise selector.
2017-08-16 08:23:33 -07:00
Rafid Aslam 5f7e23e8ef frontend: Add perfectScrollbars to Settings/Organization overlay.
Use perfectScrollbar on settings sidebar, since the default scrollbar
makes settings menu break when not enough vertical space available.

Add perfectScrollbar to main settings section, and reset the scrollbar
position when switching between tabs.

Also delete the z-index on `.settings-list` since it makes the
perfectScrollbar covered.

Fixes #5216.
2017-08-16 08:23:30 -07:00
Vaida Plankyte 971dc71ed6 ui.js: Create perfectScrollbar functions. 2017-08-16 08:07:28 -07:00
Vaida Plankyte d3f0d2cc9f help: Add perfectScrollbar to markdown container. 2017-08-15 21:10:14 -07:00
Brock Whittaker 83184d5c60 /about/: Merge with /authors, redesign page.
This adds the authors to the Zulip repository on GitHub from
/authors/ along with re-styling the page to fit the same
aesthetic as /for/open-source/ and other product-pages.
2017-08-15 16:09:01 -07:00
Brock Whittaker eec26c5da6 Extract "open source" feature column into its own section. 2017-08-15 15:26:46 -07:00
Tim Abbott c043d31074 portico: Fix accidental console.log statement. 2017-08-15 15:23:16 -07:00
Brock Whittaker 41dbbcf062 Change the notice text to be on the same line and grey. 2017-08-15 13:27:48 -07:00
Brock Whittaker cc8de243a5 Switch from #errors to new .alert.alert-error.
This switches to the newer style of displaying alerts.
2017-08-15 13:27:48 -07:00
Brock Whittaker dfb3d03c0b Fix broken input sizing for subdomains.
In the case of no subdomains, the input is too large because the JS
calculated size does not account for padding. The correct solution is
to do this in JS.
2017-08-15 13:27:48 -07:00
Akash Nimare eb88bd9552 portico: Point desktop app links to latest release. 2017-08-15 10:51:22 -07:00
Tim Abbott 842bf77efb unread: Convert mark_topic_as_read to use stream IDs.
This is safer in its handling of potentially renamed streams.
2017-08-15 10:40:02 -07:00
Tim Abbott f3a41ac796 unread: Convert mark_stream_as_read to use stream IDs.
The logic is simpler and more robust.
2017-08-15 10:40:02 -07:00
Steve Howell 89f9017686 Create new endpoints for marking streams/topics as read.
The new endpoints are:
    /json/mark_stream_as_read: takes stream name
    /json/mark_topic_as_read: takes stream name, topic name

The /json/flags endpoint no longer allows streams or topics
to be passed in as parameters.
2017-08-15 10:17:29 -07:00
Tim Abbott 9081f2cf44 reactions: Store the emoji codepoint in the database.
This is the first part of a larger migration to convert Zulip's
reactions storage to something based on the codepoint, not the emoji
name that the user typed in, so that we don't need to worry about
changes in the names we're using breaking the emoji storage.
2017-08-15 09:29:27 -07:00
Robert Hönig 4be814fc16 integrations: Add OpsGenie integration. 2017-08-15 08:42:19 -07:00
Steve Howell b59d7d54de tab_bar: Remove a now-irrelevant comment. 2017-08-14 17:34:55 -07:00
Steve Howell 57f17ae543 Extract top_left_corner.js.
Here are the functions in top_left_corner:

    get_global_filter_li: pure code move
    update_count_in_dom: simplifed copy of similar function in stream_list.js
    update_dom_with_unread_counts: pure code move, split out from function
       of same name in stream_list.js
    delselect_top_left_corner_items: pure code move
    handle_narrow_activated: pure code move + rename
    handle_narrow_deactivated: pure code move, split out from from function
       of smae name in stream_list.js
2017-08-14 13:03:57 -07:00
Steve Howell 0f3b565d40 Create explicit handlers for stream activate/deactivate.
Calling explicit functions ensurest that the sidebars
get activated for narrows before less important things
happen, and it also makes testing easier.
2017-08-14 13:03:57 -07:00
Steve Howell 8655fae910 Make deselect_top_left_corner_items() more accurate.
This function was actually de-selecting stream sidebar items
before.  Now we just explicitly de-select top-left items in it,
and we do stream-sidebar stuff in update_stream_sidebar_for_narrow().
2017-08-14 13:03:57 -07:00
Harshit Bansal 99d3668523 emoji_picker: Change emoji picker to be category based. 2017-08-14 12:52:35 -07:00
Steve Howell 78be1b362e Remove home icon in tab bar for non-home narrows.
This reduces clutter, particularly on mobile web.
2017-08-14 12:48:09 -07:00
Steve Howell 81708e3e2a tab_bar: Extract is_all() helper. 2017-08-14 12:48:09 -07:00
Steve Howell 274938bf5f Eliminate approximate_unread_count().
We use page_params.unread_msgs.count in the web
app instead.

Fixes #1300.
2017-08-14 12:39:00 -07:00
Tim Abbott 5f87037bf5 Fix upwards scrollback when narrowing to streams centered on old messages.
Previously, when you switched to a stream narrow with the central
message outside the range of messages cached in the browser, we would
reset the UI for loading more messages, but not actually reset the
state for whether it should be possible.

This seems to have been an oversight in refactoring back in 2014.

Fixes #6109.
2017-08-14 12:05:40 -07:00
Brock Whittaker 41f98bbdb9 Remove the slide animation from product pages. 2017-08-14 11:34:14 -07:00
Brock Whittaker 158bd23b59 left-sidebar: Style "More topics" to be more consistent.
The "More topics" link was not lined up with the topics due to a
recent change anymore; we also increase the font size slightly.

Fixes: #6090.
2017-08-14 11:33:51 -07:00
Steve Howell 612e3766ce Turn on feature_flags.user_server_topic_history.
With this flag turned on, all streams will have a "more topics"
link, and clicking that link will always fetch topics from the
server to show a complete list of topics that you have had messages
for on that stream.

Note that if you only recently joined a public stream, your list
of topics won't go back to before you joined the stream, even though
that content is searchable.  We may change that in the future, but
we will need to be careful about spamming folks who frequently
unsubscribe from streams.
2017-08-11 13:01:39 -07:00
Steve Howell 60cca43d5e Always show "more topics" link if you have server history.
Until we have an easy way to consistently determine whether a
stream has more topics than have been loaded already, we err
on the side of showing a "more topics" link.  This in some ways
leads to a more consistent experience where you can zoom in on
any stream, even one that's really new.
2017-08-11 13:01:39 -07:00
Steve Howell 24e9dbe80b Use data-stream-id for zooming topics. 2017-08-11 13:01:39 -07:00
Steve Howell 17ff7317b9 Replace #stream_sidebar_{id} with data-stream-id.
We weren't actually using #stream_sidebar_{id} anywhere, and
data-stream-id allows for more conventional idioms in future
commits.
2017-08-11 13:01:39 -07:00
Steve Howell fad024ebda Simplify stream sidebar narrows.
This fix simplifies how we re-render topic lists when we
re-narrow or zoom out from a topic list.

    * The topic_list.zoom_out() no longer gets called as
      part of re-narrowing, and we eliminate the clear_topics
      option.

    * For all situations where we narrow to a filter that does
      not have a topic, we simply call the new function
      clear_topics().

    * The stream_list code no longer calls remove_expanded_topics()
      in cases where the new narrow has a topic.  This allows us
      to optimize away scroll/flicker churn a little more easily.

As part of this, we rename maybe_activate_stream_item() to
update_stream_sidebar_for_narrow(), since the function clears
stuff as well as turning stuff on.
2017-08-11 13:01:39 -07:00
Steve Howell 2146e17709 node tests: Improve topic_list tests.
We test a little deeper now, covering rebuild (albeit mostly with
stubs) and active_stream_id.
2017-08-11 13:01:39 -07:00
Steve Howell f706efe12e Add topic_list.active_stream_id(). 2017-08-11 13:01:39 -07:00
Steve Howell 089670ac1c Extract stream_list.show_all_streams(). 2017-08-11 13:01:39 -07:00
Steve Howell d2686bdcdd Simplify maybe_activate_stream_item().
We extract get_sidebar_stream_topic_info() and just call
topic_list.rebuild() directly, which allows us to eliminate
rebuild_recent_topics().
2017-08-11 13:01:39 -07:00
Steve Howell cd4dd90641 Extract stream_list.update_top_left_corner_for_narrow().
This is mostly a pure code extraction.  It makes the call
to reset_to_unnarrowed() happen later in sequence.

The order of operations here is mostly unimportant, but
there may actually be some tiny user-facing benefit
in terms of having the logic happen more sequentially.

BEFORE:
    reset streams
    fix top left
    redraw streams

AFTER:
    fix top left
    reset streams
    redraw streams
2017-08-11 13:01:39 -07:00