Commit Graph

2741 Commits

Author SHA1 Message Date
Tim Abbott 5a204d7c84 subs: Fix capitalization in stream privacy modal. 2017-02-25 18:36:48 -08:00
Tim Abbott bd03bb76fd subs: Remove unnecessary data-is-private variable. 2017-02-25 18:33:07 -08:00
Harshit Bansal f20993787c subscriptions: Add a modal for changing stream privacy.
Change the remaining "Admin settings" with a button, namely
changing a stream's privacy, to instead be a "[Change]" link
opening a confirmation modal.

Fixes: #3493.
2017-02-25 18:23:15 -08:00
Harshit Bansal 1d33c759e4 subs.js: Make `change_stream_privacy()` function global. 2017-02-25 18:23:15 -08:00
Cynthia Lin 07d1637c96 frontend: Fix edit header display height.
Header navbar covers the entire Mac OS X old Zulip desktop app page; this should fix that error.
2017-02-24 15:21:20 -08:00
Brock Whittaker c4d50f505f Make compose preview box less editable-looking.
This adds a slight background color and a cursor to show that editing
is disabled.
2017-02-24 15:07:33 -08:00
Brock Whittaker 9ee5ac6d23 Redesign compose box.
This redesigns it to closer to the new implementation design.
2017-02-24 15:07:33 -08:00
Brock Whittaker c35d821786 Restyle uploaded files table.
This restyles the uploaded files table to be lighter, more minimal, and
easier to parse than the previous table.
2017-02-24 15:05:06 -08:00
Brock Whittaker e504eaaa68 Change time render to be client-side and formatted.
This changes the time render to be done on the client-side and
therefore take advantage of knowing the client’s timezone, along with
being formatted in a more human-parseable way.
2017-02-24 15:05:06 -08:00
Brock Whittaker 434317b4cc Add "all" and "subscribed" deeplink for subscriptions.
This adds a deep link to “all” which is to show all streams,
along with "subscribed" for only streams you are subscribed to.
2017-02-23 15:34:30 -08:00
Brock Whittaker 461066cab9 Add deep linking to #subscriptions/new and #subscriptions/:stream_id.
This mechanism allows for a user to deep link to a particular
subscription or the form for creating a new subscription.
2017-02-23 15:34:30 -08:00
Brock Whittaker 6a7369b2b6 streams: Remove unnecessary subscriptions header arrow.
This removes the arrow from the subscriptions header at full
widths where the arrow is not required because the subscription
settings/stream creation prompt don't take up the full width of
the screen and require an arrow to go back to the streams list.

Fixes: #3762.
2017-02-23 14:27:35 -08:00
Brock Whittaker 0f9a5108fc settings: Change admin pages to have readonly view for non-admins.
This changes the layout of administration for non-administrators such
that they can view organization settings and emoji settings and
displays everything as readonly unless they have the capability to edit.

For now, we just enabled this for the emoji settings and organization
settings features.
2017-02-23 14:20:31 -08:00
Brock Whittaker 3bb22a6965 Remove all .expectOne statements in settings.
This removes all the .expectOne statements and replaces with a
single broad stroke .hide() that doesn't check if they exist,
but rather just ensures they are hidden by default until triggered.
2017-02-23 14:18:25 -08:00
Brock Whittaker 5fc0c0b6ac Fix the styling for drafts.
This fixes the appearance for drafts to be uniform with the rest of the
site along with general polishing.
2017-02-23 13:00:56 -08:00
Umair Khan 5bf83f9e0a change-email: Implement confirmation flow.
This adds to Zulip support for a user changing their own email
address.

It's backed by a huge amount of work by Steve Howell on making email
changes actually work from a UI perspective.

Fixes #734.
2017-02-23 03:15:17 -08:00
Sampriti Panda 1929cc5190 Implement persistent drafts functionality
* Created a drafts modal to display/restore/delete drafts
* Created a Draft model to support storing draft data in localstorage
* Removed existing restore-draft functionality
* Added casper and node tests for drafts functionality

Fixes #1717.
2017-02-23 02:58:23 -08:00
Brock Whittaker 8b22b94ab1 Add a LocalStorage wrapper for Zulip.
This is a wrapper that allows for versioning and migrations with
localStorage along with safe storage of data that respects data types.
2017-02-23 02:58:22 -08:00
ausDensk 5efb072e63 Change screenshot for HomeAssistant integration docs. 2017-02-22 23:27:43 -08:00
Tim Abbott e15a661720 accounts: Remove unhelpful avatar size advice. 2017-02-22 22:50:16 -08:00
Brock Whittaker c7349178f0 Re-add "Delete Avatar" button to "Your account".
This re-adds the deleted "Delete Avatar" button back to the
settings/your-account tab view in the overlay, which only appears
if you do not currently have a gravitar.
2017-02-22 22:50:16 -08:00
Steve Howell 03386f1485 avatar live updates: Do full re-render.
We now sweep all active messages for avatar changes and update
the message items and re-render, rather than patching the
DOM.  This avoids some quirks that happen when subsequent messages
get sent and we re-render previous messages out of the message
store.

Our approach here is similar to how we do full-name updates.
2017-02-22 22:46:44 -08:00
adnrs96 1458d0d3a2 Clean subscription_creation_form handlebar to use 4 space indents. 2017-02-23 07:14:41 +05:30
adnrs96 cfe57da14b Clean message_group handlebars to use 4 space indents. 2017-02-23 07:14:41 +05:30
adnrs96 13b7247ae2 Clean invite_subscription handlebar to use 4 space indents. 2017-02-23 07:14:41 +05:30
Steve Howell 8de72184e1 Fix avatar message display regression from 1.5 release.
In f75af94984 I added some
lines of code that made it so that live updates for avatar
urls would affect messages currently in the browser.

This change worked well when the live update actually happened,
but then the next time the user would reload, the avatar in
the message pane would regress back to showing the avatar urls
from the server (which could have caching issues of their own).

This fix removes a couple lines of code that had the intended
effect of making all of your messages from any given sender
show the same url (good) but which generally grabbed
the url from an old message (bad).

After this fix, we go back to having old messages possibly
showing the old avatar urls, but new messages will display the
new avatar.

(There are lots of moving parts in the avatar system, because
not only do browsers cache image urls, but our server caches
messages and recipient info, so there have been "fixes" to
avatars since this change that are valid fixes in their own
right but not directly relevant to this commit.)
2017-02-22 07:57:03 -08:00
Tim Abbott e051336ff6 emoji: Tweak emoji reactions CSS to add hover effects.
This provides a fairly intense highlighting of when you're hovering
over a given emoji reaction element.

We may want to tone down the color a bit; I'm hoping for some feedback on this.
2017-02-21 23:12:15 -08:00
hackerkid 10324ba592 Change reaction button color when user reacts.
This makes it easy to see whether you were one of the people who
reacted to a give message.
2017-02-21 23:09:46 -08:00
Ayush Jain 455c1919fc Add customizable invite-new-user text.
This makes life a lot easier for people inviting users to a new Zulip
organization, since they can give some form of context now.

Modified by tabbott to clean up CSS, backend code flow, and improve
the formatting of the emails.

Fixes: #1409.
2017-02-21 22:35:01 -08:00
Tim Abbott e608f09f73 compose: Remove unnecessary snapshot_message call.
The current logic that we have is as follows:

* If a message is locally echoed, the draft is stored via the locally
rendered message, and that system takes care of it.  So no need to
store it here.

* If the message isn't locally echoed, we don't close the compose box
until, so the content is safe here as well.  It'll be saved as a draft
if the compose box is later closed due to a failure sending.
2017-02-21 19:24:38 -08:00
Brock Whittaker 021e43356f Replace settings v1 toggle with v2 component toggle.
This replaces the settings toggle which had the same markup as the
current component toggle, but not the same JavaScript, along with
having an issue with inline-block spacing, with the new JS generated
one.
2017-02-21 11:31:00 -08:00
Brock Whittaker e4008bcf1c Select first toggle tab by default.
The first one is selected by default, so add the class to make it look
visually selected.
2017-02-21 11:30:59 -08:00
Philip Skomorokhov 7a75ed9c4a message_edit: Fix timer text not decrementing.
This fixes a regression introduced in e6369fc, where we simply lost the `--` part.

Fixes #3720.
2017-02-20 21:41:07 -08:00
Steve Howell d4206f2f5f Speed up building user sidebar during page load.
We now call activity.build_user_sidebar when we initialize
the user sidebar, which avoids some janky jQuery code
that was intended for partial updates.

With 2000 users in dev, the amount of time to build the sidebar
decreases from 1100ms to 700ms in my tests.  (Times vary a bit,
but it does seem consistently faster now.)
2017-02-20 18:07:01 -08:00
Steve Howell 2aa7d20a51 refactor: Split build_user_sidebar() from update_users().
Activity.update_users() is still used to handle partial
updates of users in the buddy list, but now all the places
that want to re-build the whole widget go through
build_user_sidebar().
2017-02-20 15:53:14 -08:00
Steve Howell 2566a89f81 refactor: Extract activity.set_presence_info(). 2017-02-20 15:02:56 -08:00
vaibhav 8ac4fe1a73 activity.js: Move info_for and get_num_unread.
We are just moving these functions out to the module
level.  They didn't need to be inner functions.
2017-02-20 14:02:57 -08:00
chao1995 b3119b0d67 left-sidebar: Sort pinned streams by lowercase stream name.
The pinned streams were sorted in alphabetic order (i.e. Verona appears
before devel). The reason is that after we plucked pinned streams out from
stream_data.subscribed_streams(), we didn't sort them again, so they
remained in the alphabetic order used in stream_data.

However, we did sort unpinned streams explicitly by using custom compare
function in stream_list.js (by default sort by lowercase stream name,
but when there are more than 40 subscribed streams, sort active streams
first). That's why this issue only relates to pinned streams.

Changes were made to sort pinned streams by lowercase stream name, always,
whether they are active or not (different from unpinned streams).

Tests were added to ensure this overall sort order is correct, i.e.

1. pinned streams are always sorted by lowercase stream name.
2. pinned streams are always before unpinned streams.
3. unpinned streams are sorted by lowercase stream name, if there are more
   than 40 subscribed streams, sort active streams at the top, among active
   and inactive streams, still sorted by lowercase stream name.

Fixes #3701
2017-02-20 10:46:05 -08:00
vaibhav 35c1272525 Include stream description matches in filter results.
User search for streams will now return results where the stream
description (but not the stream name) include the string in the
user query.

The filtering process first obtains the streams whose names match the
user search query, then sorts and displays them. From the remaining
streams, it obtains streams whose description matches the query and
displays them in sorted order after the name match results. Other
streams are not displayed.

Fixes: #2674.
2017-02-20 06:56:59 -08:00
Sourav Badami eaaec4c908 reactions: Fix emoji picker scrollbar overflow issue.
Fixes #3644.
2017-02-19 21:11:39 -08:00
Steve Howell f28158d301 Live-update default streams when deleting streams.
When an admin deactivate a stream, we now remove the
appropriate row from the default streams tables for other
folks viewing default streams in the admin tables.
2017-02-19 18:06:20 -08:00
Steve Howell 6af83e31f6 admin screens: Encapsulate default streams table.
We add a default_streams_table() function that builds an
object encapsulating the defaults streams table in the admin
system.

This function allows us to simplify the click handler code by
closing on row/stream_name rather than picking those values out
of the DOM.
2017-02-19 18:06:20 -08:00
Kartik Maji 1a697b6e02 Add frontend to show message edit history.
Fixes #268.

Modified significantly by tabbott to:
* improve code cleanliness / repetition
* add missing translation tags
* move code into message_edit.js
* correspond with the new backend.
* not display the option for messages only topic-edited
2017-02-19 17:41:06 -08:00
Kartik Maji 0cf6c292d8 Add edit_history of message in update_messages.
Modified by tabbott to not be confused by embed_links edits.
2017-02-19 17:20:48 -08:00
Tim Abbott 78b2eaefc9 timerender: Add get_full_time function.
We'll need to do some iteration, but something like this will be
useful for message edit history.
2017-02-19 15:18:22 -08:00
Tim Abbott e29663a2b3 compose: Fix behavior hitting enter with the preview area open.
The new behavior is:
(1) If enter-sends is enabled, just send the messsage.
(2) If enter-sends is not enabled, return focus to the compose area.

Based on great work by khantaalaman in #3673.

Fixes #3489.
2017-02-18 23:31:54 -08:00
ausDensk 14024963f2 Add a simple Home Assistant integration for Zulip. 2017-02-18 21:18:10 -08:00
Cynthia Lin 5090de41f2 user docs: Add responsive design. 2017-02-18 20:54:56 -08:00
Cynthia Lin d75a1b0bfc user docs: Add user guide for *Add an emoji reaction to a message*.
Fixes #3616.
2017-02-18 14:13:57 -08:00
Cynthia Lin 3647a6414a user docs: Add"emoji reaction" to Zulip glossary. 2017-02-18 09:21:35 -08:00