Commit Graph

854 Commits

Author SHA1 Message Date
YJDave f83a694fb6 stream subscription: Clean up error handling. 2018-01-04 16:23:57 -05:00
Steve Howell 11af2a6d0f minor: Fix typo for muting message.
The word "in" was missing.
2018-01-04 11:38:31 -05:00
YJDave ce43daa236 stream settings: Fix all dead code related to #subscriptions-status.
Remove all references of #subscriptions-status and add error handling
of stream settings endpoints.

Fixes #4647
2018-01-04 11:35:37 -05:00
Alena Volkova 45f0c76c44 settings: Limit the creation of generic bots.
This commit adds a setting to limit creation of generic bots
to admins for realms that want that restriction.  (Generic
bots, apart from being considered spammy on some realms,
have less locked down permissions than webhook bots).

Fixes #7066.
2018-01-02 18:12:22 -05:00
Aastha Gupta daf86eb664 settings: Add "text" option to emoji_set model.
We no longer have a special UI setting and model
field ("emoji_alt_code") for saying users want text-only
emojis.  We now instead make "text" be a fifth choice
for "emojiset".

Fixes #7406
2018-01-02 14:55:01 -05:00
YJDave fa44d2ea69 settings: Remove autoscroll_forever setting.
Fixes #6845
2018-01-02 10:35:49 -05:00
YJDave c06028159e org setting: Clean code of realm domain modal.
Remove extra lines for reporting alert messages on modal
and add predefined ui_report functions instead.
2017-12-28 15:54:57 -05:00
Balaji2198 de27142e16 stream settings: Fix link to docs about public/private streams. 2017-12-27 15:04:34 -08:00
Steve Howell d52552dcc3 Simplify/unify starring messages from the frontend.
We now do all of the main logic for starring/unstarring
a message in `message_flags.toggle_starred`:

    * mark the message as read (just in case)
    * update the UI (i.e. the green star in the message)
    * update the server

The calling code in both the click handler and the hotkey
handler remains simple--they just handle minor details like
finding the message and clearing popovers.

For updating the server, we now call the new
`send_flag_update` helper.

And we continue to delegate some of the logic to
`ui.update_starred`, but we remove some code there that's
now pushed up to `message_flags.toggle_starred`.

This change should be mostly transparent to users, but it
does remove some inconsistent behaviors between the click
handler and the hotkey handler.  Before this change, the
click handler was more aggressive about updating the UI
and marking the message as read.  For people using the "*"
key to star/unstar, they probably would only have noticed
different behavior on a slow connection or in an edge
case scenario where only half of the message was onscreen.

More importantly, by simplifying how we talk to the server,
this eliminated up to a one-second lag due to the debounce
logic in the batch_updater code.  The complicated debounce
logic is only really needed for batch-updating "read"
messages, and it was overkill and sluggish for starring
messages.

Last but not least, we add defensive code for the local
echo case.  (Users have to wait till the message gets acked
to star it.)
2017-12-26 09:01:21 -05:00
Steve Howell d5d11ff181 Disable message menu for locally echoed messages.
Wait until the server acks a message before we enable
the message popover menu.  This prevents a whole class
of bugs related to re-drawing the message and changing
the message id, and it also makes room for a little
spinner in the future.

Users with decent internet connections will generally
get server responses before they can click on the
chevron or hit esc/i, anyway.
2017-12-26 09:01:21 -05:00
Steve Howell 94da59ff81 local echo: Don't show collapse/uncollapse items.
Trying to collapse a locally echoed message is a rare
thing to do, and it was buggy before this due to races
between the server acking the original message and the
user flipping the collapsed flag.

We now calculate `should_display_collapse` and
`should_display_uncollapse` in the JS code and simplify
the template by eliminating all the inline if/else
logic.

(Note that we are about to disable the message menu
altogether for locally echoed messages, so this change
is partly future-proofing for when we put the menu
back for more innocuous commands.)
2017-12-26 09:01:21 -05:00
derAnfaenger f84a49cee6 bot settings: Fetch embedded bots list from page_params. 2017-12-26 08:50:00 -05:00
Abhijeet Kaur 28b0ebd739 Embedded bots: Add UI for adding embedded bots.
Adds type "embedded bot" to bot creation menu. Lets
users select a bot to run from a list of bots.
Currently, this list is hard-coded into the backend.
2017-12-26 08:50:00 -05:00
Marco Burstein e9d7161418 compose: Warn users when posting to the #announce stream.
Currently, users are warned when mentioning @all and @everyone, but not
when posting on the #announce stream. Confirm with users that they want
to send their message on #announce if over 60 people are going to be
notified.

Fixes #6928.
2017-12-20 07:36:50 -05:00
Utkarsh Patil c9596e12be user settings: fix uploaded files UI
Fix UI and date uploaded
2017-12-18 10:12:33 -05:00
Utkarsh Patil 0b710e41c9 user settings: fix 'Uploaded files' UI
Align table header and its corresponding table data
2017-12-18 10:12:33 -05:00
Brock Whittaker bfda5bbf2b streams: Make stream settings inputs responsive to narrow screens.
This makes the inputs and buttons responsive to narrow screens by
gracefully resizing and falling in place.

Fixes: #7712.
2017-12-14 17:47:54 -05:00
Brock Whittaker a05631d8c6 night-mode: Add experimental text.
This adds "(experimental)" after the night mode text in the
checkbox line so that people know it is not a fully stable
feature.
2017-12-13 17:27:49 -08:00
Vishnu Ks bc37317914 invites: Differentiate users invited as admin by showing bolt icon. 2017-12-13 15:12:21 -06:00
cPhost 97c3d5fce3 user profiles: add tooltip for too long email. 2017-12-13 14:20:18 -06:00
YJDave ffe3776b5f create stream: Show current user on top of "People to add" list
Fixes #7475
2017-12-13 14:16:07 -06:00
Rishi Gupta 48afc55b1b settings: Reword notifications settings strings.
Audible notifications is a confusing term, especially since it could
plausibly mean audible notifications on your phone.

Mobile push notifications is also not great, since most people don't know
what push notifications are.

I removed "receive" from stream settings strings since I think it isn't
necessary, and so that the strings (and translations) would be the same as
what's on the settings pages.
2017-12-11 09:17:31 -08:00
Rishi Gupta 7ae9c2935e org settings: Change wording of restrict to domains setting. 2017-12-11 09:17:31 -08:00
Rishi Gupta f323d59ec0 org settings: Remove double negative from open realm setting.
The current wording is tricky to wrap one's head around.
2017-12-10 23:15:00 -08:00
Cynthia Lin 5f480495f8 invitations: Make stream labels click targets.
Label tags can't be nested in each other.

Fixes #7582.
2017-12-07 14:37:23 -08:00
Alena Volkova 3be8e95d13 settings: Send bot types from the backend instead of hardcoding them. 2017-11-30 15:28:53 -08:00
Brock Whittaker a7c2258e12 dark-mode: Change drafts container to be dark.
This changes the drafts container to be dark.
2017-11-29 16:44:43 -08:00
Rishi Gupta 191f8f1b39 left sidebar: Change Home to All messages.
We made this change because users often unnecessarily click "Home"
first in their use of Zulip, because it seems appealing.  While "All
messages" isn't quite precise (it doesn't include muted streams), it
does describe relatively simply the interleaved view that this
represents.

This commit leaves everything as "home" in the code, and only changes
user-visible strings and docs. Changing the code will be a big project;
there are hundreds of relevant occurrences in variable names, etc.

Further, we'll probably want to convert those various variable names
in different ways.

Tweaked by tabbott to extend the commit message and update a few comments.
2017-11-28 15:42:58 -08:00
Rhea Parekh 1d826ae201 composebox: Warn when linked to private streams.
Fix issue #6860
2017-11-27 07:41:59 -08:00
Balaji2198 585cd36a2e setting: Align elements properly in invite users.
Adds a margin-top to `Check all` and `Uncheck all` elements.

Fixes #7488.
2017-11-26 09:13:33 -08:00
Tim Abbott 13a1b44aa8 settings: Fix missing target=_blank on realm emoji images.
This resulted in problems with the desktop app, where clicking these
links would leave the user in a situation where they needed the "back"
button in order to get back to the webapp.

Fixes zulip/zulip-electron#342.
2017-11-25 09:43:01 -08:00
Vishnu Ks 34689370cd settings: Create UI and backend for setting signups stream. 2017-11-21 17:39:51 -08:00
Steve Howell 4a6c3eeb98 Use realistic filepaths in zuliprc docs and hints.
The first part of this change is to have the "Your bots"
tooltip not lie about creating `.zuliprc`, because it
doesn't put a dot in front of the file.

And then the more significant change here is to make
the "Running a bot" documentation use realistic filepaths,
both in terms of where the download typically puts the file,
and where you want to move it to.
2017-11-21 07:32:24 -08:00
Harshit Bansal 8a4fc9970f reactions.js: Migrate webapp to use the new reactions API.
Fixes: #6909.
2017-11-20 15:27:20 -08:00
Brock Whittaker e806300b51 settings: Use `.modal-bg` class to control background color.
This lets the `.modal-bg` class dictate background color instead of
manually setting it for all modals.
2017-11-17 08:44:04 -08:00
Tim Abbott 638eb7a8e4 docs: Update links to ReadTheDocs to always use https.
This is better security practice.

We also add a lint rule to enforce this for the future.
2017-11-16 10:59:24 -08:00
Tim Abbott 054952a44a docs: Update links from codebase to point to ReadTheDocs. 2017-11-16 10:53:49 -08:00
Brock Whittaker f9f0f356be settings: Add backend storage and interface for night mode.
This allows the night mode setting to be stored in the backend.
2017-11-15 16:36:06 -08:00
Brock Whittaker 744c4af958 left-sidebar: Remove topics help code.
This removes code associated with the dead topic help feature that is
below “more topics”.
2017-11-15 11:01:33 -08:00
Brock Whittaker ca2f93db31 settings: Restyle "emoji style" section.
This restyles and rewords some of the emoji style section to look
better and fit it more with the current style guide.

Tweaked by tabbott to modify the historical migration rather than
adding a new one.  This is OK because the emojiset choices text change
doesn't touch the database; it's just a Django Python code thing.

Also removed translation tags, since we don't need them for a set of
brand names.
2017-11-10 17:04:27 -08:00
Harshit Bansal 439bc2920a settings: Change the control for selecting emojiset to radio group.
Fixes: #7260.
2017-11-10 16:59:03 -08:00
Cynthia Lin 1bcc07f7dd popovers: Add bot icon to user profile popovers for bots.
Fixes #7176.
2017-11-10 11:18:43 -08:00
Cynthia Lin a3e5f2a887 message view: Use new custom bot icon in messages. 2017-11-10 11:18:43 -08:00
YJDave de67bf81fd org settings: Allow users to delete their message.
Fixes #7049.
2017-11-09 10:20:34 -08:00
Angelika Serwa 9930cb43cd stream_settings: Add loading spinner when creating a new stream.
Add a spinner for when a stream is being created to show that
an operation is being performed, while also disallowing users to
modify the form in the meanwhile.

Commit modified by Brock Whittaker <brock@zulipchat.com>.

Fixes: #5268.
2017-11-07 12:26:47 -08:00
Cynthia Lin 6a4e7ad12e user settings: Enhance Uploaded files sorting.
Fixes #7149
2017-10-31 18:33:41 -07:00
Cynthia Lin 5d9327a25b user settings: Improve Uploaded Files design.
* Prevent long file names from corrupting table display.

* Add sticky table header.

Fixes #7189.
2017-10-31 18:33:41 -07:00
Harshit Bansal 5020ba4a20 emoji: Allow users to change emoji set.
This feature was merged in PR #4383 but was disabled due to some
remaining emoji infra changes.

Fixes: #209.
2017-10-28 10:38:33 -07:00
Henrik Pettersson 09cd47c6ad Add UI for viewing and cancelling open Zulip invitations.
Lets administrators view a list of open(unconfirmed) invitations and
resend or revoke a chosen invitation.

There are a few changes that we can expect for the future:

  * It is currently possible to invite an email that you have already
    invited, it might make sense to change this behavior.

  * Resend currently sends an invite reminder instead of resending the
    original invite, this is because 'custom_body' was not stored when
    the first invite was sent.

Tweaked in various minor ways, primarily in the backend, by tabbott,
mostly for style consistency with the rest of the codebase.

Fixes: #1180.
2017-10-27 13:07:43 -07:00
Tim Abbott 3ee53d5de3 auth: Don't offer password reset links when useless.
If an organization doesn't have the EmailAuthBackend (which allows
password auth) enabled, then our password reset form doesn't do
anything, so we should hide it in the UI.
2017-10-24 12:07:43 -07:00