Commit Graph

1506 Commits

Author SHA1 Message Date
Tim Abbott 00903a19c0 Revert "templates: Avoid empty message_content div for /me messages."
This reverts commit 3a73d03e8e.

This was making casper test 08 fail.
2019-03-06 18:28:27 -08:00
Rishi Gupta 99ea5f4e32 popovers: Remove a few entries from stream popover.
These options are pretty low-value, since clicking the stream does the
narrow, and it's likely that almost nobody sends messages via these
buttons.
2019-03-06 17:36:06 -08:00
Steve Howell 3a73d03e8e templates: Avoid empty message_content div for /me messages.
This also makes the template a bit more readable.

(As an aside, copy/paste is broken for /me messages,
but that precedes this commit.)
2019-03-06 12:55:02 -08:00
Anders Kaseorg d7c8d11586 templates: Remove dead <div class="messagebox-border">.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-03-06 12:47:42 -08:00
Steve Howell 028715099e minor: Remove unneeded "arrow" class.
The previous commits made the "arrow" class no longer
necessary for these left sidebar elements.

The "arrow" class was always a bit dangerous, as bootstrap
has a class by the same name for a different concept.

We weren't really using consistent styling for "arrow"
across all our chevrons, so even without bootstrap in
play, it was just creating complexity.
2019-03-04 15:35:40 -08:00
Steve Howell 0a848e412f buddy list: Use user-list-arrow class.
Using a more specific class avoids confusion related
to the .arrow class, which is not only a popover concept,
but also a Zulip concept in the left sidebar.
2019-03-04 15:35:40 -08:00
Steve Howell 3222f170c9 minor: Remove dead code in PM template.
The topic-sidebar-arrow chevron never shows
here--it was just cargo-culted code from
the topic lists.

It's also a landmine--we don't want to
accidentally build a topic-related sidebar
menu for PMs.
2019-03-04 15:35:40 -08:00
Steve Howell 9820b07616 minor: Introduce zero-pm-unreads.
We could arguably just use zero-unreads everywhere,
but we definitely don't want zero-topic-unreads
inside our PM list.

I prefer to just have these two concepts:

    zero-pm-unreads
    zero-topic-unreads

And it's super easy to share CSS properties for both.
2019-03-04 15:35:40 -08:00
okmanl ec869f51b9 admin: Display email addresses in user-edit widget.
When the user logs in as an admin, and clicks on the 'edit user'
button under the url path #organization/user-list-admin, the modal
that was displayed didn't contain the user's email address under the
list of information. This commit adds the email input as a readonly
element, which at the very least provides helpful confirmation that
you have the right user.

Fixes part of #11453.
2019-03-04 09:17:05 -08:00
varunvaruns9 b4f35bd54e poll_widget: Add highlight for vote count if current user votes.
Add a background highlight to vote count button if currently
logged in user votes on that option.

Tweaked by tabbott to use better variable names and Rishi for better
styling.
2019-03-01 16:35:18 -08:00
Tim Abbott 64717d8a45 copy: Fix extra space before > in copy-paste styling. 2019-03-01 16:26:28 -08:00
Steve Howell b38ab9a142 Remove redundant sender_info_hover class.
This class exist on the parent element, and the popover
code that relies on it can use the parent div.
2019-03-01 15:53:47 -08:00
Steve Howell bb5880bf19 refactor: Extract message_avatar partial. 2019-03-01 15:53:47 -08:00
Steve Howell 3ae4d305de minor: Remove noisy comment.
I don't think anybody is actually going to follow that link.
We know avatars are used in multiple places.
2019-03-01 15:53:47 -08:00
Steve Howell 153d65c01f refactor: Extract message_body.handlebars.
This is the real guts of how we render messages.
It only excludes the border effects, which we
leave in single_message.handlebars.

This is a pure code move, and should remove a lot of nesting that
would otherwise clutter one's view.
2019-03-01 15:53:32 -08:00
Steve Howell 3b30ddc4e4 refactor: Remove unnecessary check for include_sender.
The bool `include_sender` will always be `true`
for status messages.  Here is the relevant
excerpt from MLV:

        message_container.status_message = // ...
        message_container.include_sender = true;

We don't need the `include_sender` check in the template.

We could probably also fix the above code, but it's
semantically correct.  I mostly care about simplifying
the template.
2019-03-01 15:42:12 -08:00
Steve Howell d743d56f1c refactor: Extract me_message template.
This is for:

    /me goes to lunch

Which renders to something like:

    <b>Steve Howell</b> goes to lunch [EDITED]
2019-03-01 15:42:12 -08:00
Steve Howell 7412a097b5 refactor: Extract edited_notice template.
This is a pure code move.  All three places where we use
this partial had the exact same markup, except one place
where I think `auto-select` was inadvertently left off.
2019-03-01 15:42:12 -08:00
Steve Howell 76e379bd4f refactor: Extract message_controls template.
This is a pretty coherent chunk of template code
related to these icons:

    - edit pencil
    - reactions
    - chevron
    - star

Moving it to a partial will simplify future diffs
where we re-work the message HTML.

This is a pure code move.
2019-03-01 15:42:12 -08:00
Steve Howell 386dde2923 refactor: Clean up single_message template.
Some changes here:

    * more whitespace
    * avoid else, and just re-state the condition
    * avoid long if blocks, just re-state the condition
    * use standard `{{#if foo}}` construct

The refactoring of conditionals here will make more
sense in subsequent commits.
2019-03-01 15:42:12 -08:00
Rishi Gupta 812f62c8b3 help: Add user-groups. 2019-02-28 17:11:27 -08:00
Tim Abbott 1ce0e8256b zoom: Avoid sending Zoom API secret to other admin clients.
Fixing this involves fixing the backend to handle unchanged field
submissions of the Zoom credentials without trying to re-validate the
credentials (for performance) as well as to fetch the already-sent
secret.
2019-02-28 15:43:42 -08:00
Tim Abbott 0a0ac24d62 settings: Disable autocomplete on various text fields.
This prevents browser autocomplete from annoying trying to insert
values into these settings fields.
2019-02-28 15:39:34 -08:00
Rishi Gupta d833c70dc7 org settings: Explain Zoom support is experimental, and fix a few strings.
Visually, #zoom_help_text acts like
.organization-settings-parent div:first-of-type when the Zoom option
is selected, but isn't treated as such.

No visual change with the #google_hangouts_domain change; just there to make
the code more readable/defensible.
2019-02-28 15:09:35 -08:00
Tim Abbott ab95704d2d settings: Fix mismatch of templates with JavaScript.
The alignment between the "Organization settings" code/labels and the
actual logic was broken in 65f6bea7d7
and the related commits.
2019-02-27 16:18:36 -08:00
Wyatt Hoodes 5231b27dea popovers: Add a clear status option in user popover.
Accomplished by adding a function to clear the status message with
an empty string. The html is then updated to reflect changes without a
refresh.

Currently, it's a small hassle to clear a status message.  This option
makes things a bit easier.

Fixes #11630.
2019-02-26 14:40:17 -08:00
Tim Abbott 7312189be0 message_edit: Fix compose icons appearing for topic-editable messages.
The is_editable field includes topic edits, so we need a separate
field for whether to display these icons which are all for content
editing.

Fixes #11666.
2019-02-24 11:29:37 -08:00
Tim Abbott 094dcac2dc message_edit: Fix content editing icons appearing in "view source".
These icons was misplaced during a recent refactoring, resulting in
the compose icons appearing even for non-editable messages.

Fixes part of #11666.
2019-02-24 11:29:07 -08:00
Hemanth V. Alluri 3134453220 streams_edit: Prevent newline characters in the description.
This commit achieves two things:
  1. Changes the UI of the "Create stream" form to make the
     textarea previously used to get the stream description
     a simple input field of type text (to suggest a single
     line description).

  2. Adds an extra check on the frontend side to make sure that
     when users create a new stream via. the "Create stream"
     option in the settings panel, they can't enter any newline
     characters (i.e. we disallow the enter key from being
     registered when typing out the stream description).
     We must also make sure that they cannot copy-and-paste over
     descriptions containing newline characters.

  resolves #11617
2019-02-20 12:27:54 -08:00
Tim Abbott fe4a0d0fcd capitalization: Fix night logo lint errors. 2019-02-18 15:53:55 -08:00
sahil839 7157edf4af settings: Add support for uploading logo for night mode.
This adds a new field named realm_night_logo which is used for
displaying the organization logo when the user is in night mode.

Fixes #11176.
2019-02-18 15:15:57 -08:00
Steve Howell e67cf30dfd private messages: Add user circles to top left.
This is mostly adding markup, calling some convenient
functions in buddy_data.js, and adjusting CSS.

To make the circles update dynamically, I mostly
orchestrate this though activity.js for now.  It's
possible we'll want to adjust that eventually to
happen through something like a `presence_events`
dispatcher, but that's essentially what
a good part of `activity.js` does now.
2019-02-18 14:22:37 -08:00
Steve Howell 1adcaad04a refactor: Simplify logic for circles.
We now have a function get_user_circle_class
that returns one of these values:

    "user_circle_green"
    "user_circle_orange"
    "user_circle_empty"

And we put that in the templates.

And then CSS renders the circle of the appropriate
color.

The unit tests now explicitly capture whether
we are rendering the correct kind of circle.
2019-02-18 14:22:37 -08:00
Steve Howell ba91f628c7 css: Use user_circle_fraction for group PM circles.
We rename this CSS class to something super concrete,
since all the associated CSS is very specifically
about drawing circles.
2019-02-18 14:22:37 -08:00
Challa Venkata Raghava Reddy 815d009006 left_sidebar: Add scrollbar for private messages region.
This fixes a longstanding UI issue when you have way too many recent
private message conversations, as you can now scroll down the list to
find what you're looking for.

Fixes #5384.
2019-02-18 14:20:55 -08:00
Rishi Gupta ea8a087fd7 user popover: Rename user profile to full profile. 2019-02-16 11:39:10 -08:00
Rishi Gupta b856d9c0f9 user status: Change away to unavailable. 2019-02-16 09:28:58 -08:00
Tim Abbott 7a49611a94 settings_invites: Display links for multi-use invitations.
This makes it possible to figure out which is which if you have
several active at the same time.
2019-02-15 14:28:07 -08:00
Vishnu Ks 763eca6ca9 invites: Add UI for revoking multiuse invites. 2019-02-15 14:13:31 -08:00
Vishnu Ks ef52f541fe invites: Fix the invalid invite time bug during filtering. 2019-02-15 13:58:30 -08:00
Steve Howell 5442b38a20 popovers: Rename template to `no_arrow_popover`.
The `user_info_popover` template is a generic
way to make a popover without the arrow effect,
and we'll want to reuse it for other popovers.
2019-02-14 16:16:04 -08:00
Vaibhav fb111d017f drafts: Remove left border from draft-box.
This removes the left border extending the stream label from the
recipient bar in from the drafts in drafts modal.  Those borders are
important in the message feed for containing several messages, but
here we're only ever going to show individual drafts, and this change
avoids potential color clashes with the blue box surrounding the
recipient blocks.
2019-02-14 11:33:08 -08:00
Vaibhav 2ca8ec371e drafts: Change foreground for dark background streams in drafts modal.
In drafts modal, dark background streams still had black foreground;
This changes the foreground to white for the same.
2019-02-14 11:32:11 -08:00
Steve Howell 8a4aa0e49a drafts: Add reminder of hotkey. 2019-02-13 16:16:34 -08:00
Steve Howell 0f21020783 drafts: Put 30-day notice in header (to prevent scroll). 2019-02-13 16:16:34 -08:00
Anders Kaseorg 89897bcf70 css: Move inline date separators from messagebox to message_row.
Fixes border-related glitches introduced by commit
51c6c82003 (#10820).  Alternative
to #11534.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-13 16:03:21 -08:00
Anders Kaseorg dae6aa21d8 css: Remove dead CSS classes message_data, prev_is_same_sender.
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2019-02-13 16:03:16 -08:00
Tim Abbott 944d590298 settings: Offer starred messages count setting publicly.
Previously, this was only available in the Zulip development
environment.

Further work is needed on documenting this and how to use it for
managing work to follow up on.
2019-02-13 15:11:17 -08:00
Tim Abbott 51c6c82003 message_list: Don't split message groups for a date divider.
This adds date dividers within a single message group when the only
reason we had previously been splitting apart two message groups is a
change of date.  The overall effect is a cleaner message list user
experience.

The downside of this change would be that the recipient bars no longer
will always show a new date for date changes; to fix that, we rewrite
how the floating recipient bars both set the date field on the
floating recipient bar itself, as well as ensure that non-floating
recipient bars don't show duplicate dates.

In a future design update where we modify how message recipient bars
look, we may very well be able to simplify this logic by removing some
of the dynamic nature of the recipient bar calculations.  But this is
a good implementation of what remains.

Tweaked significantly by tabbott from Steve Howell's original, both to
extract these changes from a larger PR as well as to modify the
first_visible_message logic to handle some tricky corner cases.

Fixes #10171.
2019-02-11 15:56:09 -08:00
Amadeo234 7d42d7b4db message_edit: Fix message edit history breakdown on large messages.
The message_edit_history UI was incorrectly inheriting its content
div's structure from message_edit_content, i.e. the form for editing
message content, and not message_content, i.e. the class for rendering
the content of messages in the message feed (which we also use for
drafts).

Fix this by changing the inheritance, while also adding a (currently
unused) class for any future customizations.

Fixes: #5629.
2019-02-08 15:47:17 -08:00
Tim Abbott 21a86f3ef7 message_list: Rename show_date_separator to show_group_date_divider. 2019-02-08 11:30:15 -08:00
Tim Abbott 0d66d3fafd message_list: Rename show_date to group_date_divider_html.
This is much more clear about what this actually means.
2019-02-08 11:26:24 -08:00
Rishi Gupta fe28d0731e org settings: Move "allow message content in email" to different subsection. 2019-02-08 10:16:09 -08:00
Rishi Gupta 3a26daf911 org settings: Remove unnecessary titles from Organization settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 65f6bea7d7 org settings: Move video chat provider into other settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 16042ba15d org settings: Reorder the major sections of Organization settings. 2019-02-08 10:16:09 -08:00
Rishi Gupta 76488bd2fe settings: Remove button styling from role. 2019-02-08 10:16:09 -08:00
Rishi Gupta 0f3125582b org settings: Reposition instructions for user groups, and hide from guests. 2019-02-07 11:46:09 -08:00
Rishi Gupta 9f2995a6f6 org settings: Reorder options under org permissions -> other permissions. 2019-02-07 11:46:09 -08:00
Rishi Gupta 9572c5ddb0 org settings: Update explanation for Default user settings. 2019-02-07 11:46:09 -08:00
Rishi Gupta abe67a3000 org settings: Reorder options in org settings -> message edit. 2019-02-07 11:46:09 -08:00
Rishi Gupta aae9773f09 delete topic: Update wording in confirmation modal. 2019-02-06 22:16:24 -08:00
Vaibhav a494244427 message edit: Rearrange order of control icons.
This arranges the control icons in similar order as that in compose
box.
2019-02-05 13:42:58 -08:00
Rishi Gupta a7a5188030 user status: Style status message in user popover. 2019-02-05 13:42:32 -08:00
Vaibhav 61ebee6993 message edit: Add "preview" option to edit UI.
This add the "Preview" option to message edit controls similar to that in
compose UI.

Fixes #11438.
2019-02-05 11:35:30 -08:00
Abhinav Singh e7c8077abc edit: Add support for using video call link in message edit.
This code will correctly add video call link to the message
textarea based on whether 'Add video call' was selected from
message composition form or message edit form.

The implementation was semi-rewritten by tabbott to remove an
unnecessary global variable, with fixes for the unit tests from
showell.

Fixes #11188.
2019-02-02 11:03:31 -08:00
kunal-mohta ac55a5222c messages: Add support for quickly deleting all messages in a topic.
This is primarily a feature for onboarding, where an organization
administrator might send a bunch of random test messages as part of
joining, but then want a pristine organization when their users later
join.

But it can theoretically be used for other use cases (e.g. for
moderation or removing threads that are problematic in some way).

Tweaked by tabbott to handle corner cases with
is_history_public_to_subscribers.

Fixes #10912.
2019-02-01 17:09:44 -08:00
Shubham Dhama 5779320874 invites: Use stream_id instead of stream names in invitation.
This replaces the current usage of stream names with stream ids.

This commit also removes the `traditional` attribute from the invite
form as now we are sending stream_ids as an argument; this was the
only place in the codebase we used traditional=true, and it's great to
have it removed.
2019-02-01 15:47:20 -08:00
Steve Howell 9ce5d51bdc user status: Fix tiny green dot in user popover.
We now compute the class that drives the tiny
green/orange/empty dot in the user popover using
the same logic as the buddy list.

This was broken in the early implementation of
set/clear-away, but it was never released.

Fixes #11413
2019-02-01 15:23:35 -08:00
Steve Howell 6375d72862 user status: Change icon for set/clear away. 2019-02-01 15:23:35 -08:00
Steve Howell 3e615fd8b0 user status: Fix wording in user popover. 2019-02-01 15:23:35 -08:00
Steve Howell ab8b50453b user status: Show status in user info popovers. 2019-02-01 15:23:35 -08:00
Steve Howell a1a7047819 top left: Remove home-link markup in the main app.
The `home-link` markup wasn't used in the app,
and it was confusing, since we do use that
markup for the portico system.
2019-01-30 13:53:20 -08:00
Steve Howell 090227e809 tab bar: Remove unused markup.
The only time we set the `home` flag to true
is when it's the last (and only) item in the
list, in which case we flip `hash` to false
at the end of `make_tab_data()`.

So the section of code where both `home` and
`flag` were true is dead code.

Also, we can use `else` instead of `unless`.
2019-01-30 13:53:20 -08:00
Rishi Gupta fa2b5df107 settings: Update tip strings for adding custom emoji. 2019-01-30 10:34:16 -08:00
Steve Howell a964977960 user status: Add ability to edit status text. 2019-01-29 10:27:49 -08:00
Rohitt Vashishtha c176891c2e poll-widget: Refactor comment to option.
We had initially designed the poll widget like a blog
post with comments beneath it but it makes more sense
to think of it as just a simple poll with options.
2019-01-29 09:34:14 -08:00
Steve Howell 17c906d6bb user status: Surface status in the buddy list.
When you hover over a user that has set a user
status, we now show something like "out to lunch."

You can test this in the console by doing:

    user_status.server_update({status_text: 'out to lunch'})

And then hover over your name in the buddy list.
2019-01-25 16:53:51 -08:00
Pragati Agrawal 1e811b42ec org settings: Add realm level setting for missed message content in email.
This adds a setting under "Notification" section of
"Organization settings" tab, which enables Organization administrator to
control whether the missed message emails include the message content or
not.

Fixes: #11123.
2019-01-25 14:34:10 -08:00
Vaibhav 746870df65 stream settings: Hide creating admin-only streams in members UI.
This commit takes away the ability for non-admin members to create
streams where only admins can post messages by hiding the option from
them.

Fixes #11290.
2019-01-24 10:51:49 -08:00
Steve Howell bacf896228 poll widget: Clean up code and add edit controls.
NOTE: If you revert this commit, you want to revert
the immediately prior commit as well.  The history
is that Ishan made some improvements to the widget,
but there were some minor bugs.  I decided not
to squash the commits together so that the git
history is clear who did what.  (In particular, I
want questions about the JS code to come to me if
somebody does `git blame`.)

Anyway...

This is a fairly significant rewrite of the polling
widget, where I clean up the overall structure of
the code (including things from before the prior
fix) and try to polish the prior commit a bit as
well.

There are a few new features:

    * We tell "other" users to wait for the poll
      to start (if there's no question yet).
    * We tip the author to say "/poll foo" (as
      needed).
    * We add edit controls for the question.
    * We don't allow new choices until there's
      a question.
2019-01-22 10:27:39 -08:00
ishanrai05 85535ae09c poll-widget: Change "Edit question" UI to edit-pencil button.
This changes the "Edit question" UI to be just an edit-pencil button
rather than a large "Edit question" button for a poll.
Fixes part of #11010.
2019-01-22 10:27:39 -08:00
Shubham Dhama 9e3423129b invite: Clean error handling and use ui_report.
This also fixes few unusual UI issues like an invitation got failed when
certain emails can't be invited then the error box is left with "warning"
even when next request got succeed and another case when invitation got
succeed after failing it's still reported with "alert-error" class alert
banner.
2019-01-17 10:28:59 -08:00
Yashashvi Dave b53857b168 settings: Add admin UI for editing users' custom profile fields.
This commits add UI which will allow admin to edit every user's
custom profile field data from admin settings.

Fixes #10161
2019-01-15 15:34:35 -08:00
Jeswin 060f40c356 settings: Use standard error handling in settings/invites.
Changed the error message element from organization-status to
an alert-notification block within this page.
2019-01-15 14:52:31 -08:00
Jeswin 17a5d6c1f7 settings: Improve status messages styling on "users" changes.
The legacy "Updated Successfully" message shown after saving changes,
is removed, and replaced with our standard "Saving" spinner and
animation.

Fixes: #11177.
2019-01-15 14:50:17 -08:00
Abhinav Singh e6493ef0c8 emoji: Add support for using emoji picker in message edit.
This code will correctly render emoji to the message textarea based on
whether emoji was selected from message composition form or message
edit form.

Fixes part of #11188.
2019-01-15 12:00:02 -08:00
Marco Burstein 9ddadd39f4 compose: Add support for using Zoom as the video chat provider.
This adds Zoom call properties to the `Realm` model, creates endpoints
for creating calls, adds a frontend and tests.

Fixes #10979.
2019-01-07 10:00:02 -08:00
Rishi Gupta cfc1138abc org settings: Improve labels and styling for realm logo/avatar. 2019-01-05 16:26:56 -08:00
Yashashvi Dave e8fbd855e6 subscriptions: Add tooltip, only subscribers can add user in private stream.
Add explanation in popover on disabled add-subscriptions input elements,
admin can't add subscribers to non subscribed private streams, only
subscribed users can.

Fixes #10593
2019-01-05 16:21:41 -08:00
Yashashvi Dave 7f3724dc5d subscription: Rename add subscription input placeholder.
In stream membership section, rename add subscription input
placeholder to 'Name or email' from 'Email address'.
2019-01-05 16:14:46 -08:00
Harshit Bansal f8f971bfd6 typeahead: Rename `codepoint` to `emoji_code`. 2019-01-05 15:09:04 -08:00
Shubham Dhama e26cba062b settings_invites: Add invited_as column to the table.
This makes it possible to review the roles used in active invitations.
2019-01-05 14:53:09 -08:00
Steve Howell d844a070fd ui: Render feedback widget client side.
We re-render the feedback widget on every call to
show().  This allows us more flexibility to mess
with the markup for particular use cases.
2019-01-04 10:54:10 -08:00
Steve Howell 4baa65f38a muting: Rename container template to feedback_widget.html.
We now load the specific content for unmuting from
a handlebars template.
2019-01-04 10:48:19 -08:00
AsociTon 0ce7e613c7 message_edit: Add maxlength attribute in template.
Previously, we didn't enforce the maximum length of a message in the
browser, resulting in potential bad experiences for users.

Fixes #11137.
2019-01-03 14:31:00 -08:00
Tim Abbott 1a72256e05 settings: Fix hiding of email address visibility.
Apparently, the only development-only logic system broke saving this
settings block in production.

Fixes #11168.
2019-01-02 10:56:21 -08:00
Steve Howell 8444326bf3 status: Add menu option to "View PMs to myself". 2019-01-02 09:27:33 -08:00
Steve Howell 7b5f282aee status: Show "(away)" next to yourself if you're away. 2019-01-02 09:27:16 -08:00
Steve Howell cb691694d1 status: Add user menu options to set/revoke away status. 2019-01-02 09:23:20 -08:00
Hemanth V. Alluri e3aed0f7bc custom profile fields: Markdown rendering for custom profile field values.
This makes it possible it include our standard markdown formatting in
one's custom profile fields, allowing for links, emphasis, emoji, etc.

Fixes #10131.
2019-01-01 21:06:21 -08:00
Hemanth V. Alluri 28d344b4b5 custom profile fields: Pass value as part of a dictionary.
While we're at it, we remove the JSON parsing that was part of the
user field code path, since this function isn't responsible for
rendering user fields.
2019-01-01 21:05:28 -08:00
Cynthia Lin 55c1a2e525 settings: Add guest avatar marker to account settings. 2018-12-30 11:07:00 -08:00
Cynthia Lin 053c4a2250 popovers: Add guest avatar marker to user profile popover. 2018-12-30 11:07:00 -08:00
Cynthia Lin 4d97909764 popovers: Add guest avatar marker to user info popover. 2018-12-30 11:07:00 -08:00
Cynthia Lin bcea4f10e6 message view: Add guest avatar markers to message sender avatars. 2018-12-30 11:07:00 -08:00
Steve Howell 3fc8597119 popovers: Avoid passing message to actions popover template.
We instead get the specific fields from message
that we use.  This is particularly helpful
for subject -> topic migration; we no longer
have to account for "subject" fields in
client-side templates.
2018-12-29 14:19:18 -08:00
Steve Howell c293e37237 unread: Rename zero-subject-unreads to zero-topic-unreads. 2018-12-29 14:18:32 -08:00
Joshua Pan ad1df0ebeb settings: Add support for customizing the top-left logo.
This adds a new realm_logo field, which is a horizontal-format logo to
be displayed in the top-left corner of the webapp, and any other
places where we might want a wide-format branding of the organization.

Tweaked significantly by tabbott to rebase, fix styling, etc.

Fixing the styling of this feature's loading indicator caused me to
notice the loading indicator for the realm_icon feature was also ugly,
so I fixed that too.

Fixes #7995.
2018-12-18 12:44:52 -08:00
Rishi Gupta d2b47dc270 org settings: Rename linkification regular expression field to pattern.
We use pattern in the table, so we should match that in the form.
2018-12-17 12:58:52 -08:00
Tim Abbott d469c14d11 docs: Advertise arbitrary org GitHub patterns for linkifiers.
Now that we support this, we should make it really obvious that we do.

Also, link to the Help Center article.
2018-12-17 12:58:52 -08:00
Tim Abbott ad9e063a5c settings: Rename realm_filters template to use linkifiers. 2018-12-17 12:29:39 -08:00
Marco Burstein 046ecc5d50 styles: Fix compose options hidden when editing.
Fix an issue that when a message is being edited, sometimes compose
options are hidden if there is no time limit. Also, move the options
further from the time limit to make them more noticeable.

Fix #11056.
2018-12-16 13:45:43 -08:00
Tim Abbott 5d31c57638 poll widget: Move the "Add option" feature below options.
This is the more normal ordering for a poll.  Fixes part of #11010.
2018-12-16 11:39:04 -08:00
Steve Howell f18ce4f923 muting: Use stream_id in markup for action menus. 2018-12-14 16:05:37 -08:00
Steve Howell d75ff80eb2 muting: Add stream_id to markup for mute settings.
We also prefer `attr` over `data` (it's more greppable).
2018-12-14 16:05:35 -08:00
Marco Burstein ba46dc83c6 notifications: Add a setting for changing the notification sound.
Also, add a new notification sound, "ding". It comes from
https://freesound.org, where the original Zulip notification sound comes
from as well. In the future, new sounds can be added by adding audio
files to the `static/audio/notification_sounds` directory.

Tweaked significantly by tabbott:
* Avoided removing static/audio/zulip.ogg, because that file is
  checked for by old versions of the desktop app.
* Added a views check for the sound being valid + tests.
* Added additional tests.
* Restructured the test_events test to be cleaner.
* Removed check_bool_or_string.
* Increased max length of notification_sound.
* Provide available_notification_sounds in events data set if global
  notifications settings are requested.

Fixes #8051.
2018-12-09 21:25:30 -08:00
Akash Nimare e827e36429 settings: Show current user's role in Your Account.
This makes it easier to figure out what's going on if you're a guest.

Fixes: #10969.
2018-12-07 12:07:12 -08:00
Joshua Pan bc74abae41 user_events: Create delivery_email update event procedure.
This ensures the "account settings" UI for managing a user's own email
address uses the delivery email, since that's what users care most about.

Eventually, we'll need to add support for at least viewing both email
addresses in "account settings", but this is the right long-term
behavior.
2018-12-06 20:09:57 -08:00
Joshua Pan 67f0b1bbca admin: Add UI for editing realm_email_address_visibility.
This new setting is still hidden in the UI when not in the development
environment, because the feature isn't ready for production, but
merging this will help simplify future work on the feature.
2018-12-06 16:01:09 -08:00
Tim Abbott be0604dcf0 left sidebar: Show recipients in "private messages" hover.
When the list of recipients of a group private message conversation is
truncated due to being long in the "Private messages" area, we didn't
provide easy access to the full list of people.  Fix this by adding a
title attribute for the area.

Fixes #10978.
2018-12-06 10:23:10 -08:00
Tim Abbott cc54dddd84 settings: Fix settings UI indicators for guest users.
This correctly shows guest users that they cannot interact with
anything in the "Organization" tab, though we preserve the read-only
access to it so that they can (e.g.) browse the organization's custom
emoji.
2018-12-05 17:41:48 -08:00
dipu989 524ef509fe user settings: Fix download zuliprc button styling. 2018-12-03 16:30:58 -08:00
Marco Burstein 307799113e right sidebar: Fix night-mode presence styling.
Fix the background color of night-mode presence indicators by setting
the background color to transparent instead of white when inactive.

Fix #10932.
2018-12-02 19:14:40 -08:00
Yashashvi Dave 28c38a44c8 static/js/popover: Use predefine func to append user pills in field.
This commit remove repetitive code to append user pills in
custom field of user profile popover. And call already defined
function there.
2018-11-28 16:22:35 -08:00
Tim Abbott d9e8380981 copy: Add whitespace before timestamps in messages without sender.
This changes:

  Iago 4:11 PM
test not edited

4:11 PM
test edited

to this:

  Iago 4:11 PM
test not edited

  4:11 PM
test edited
2018-11-27 16:29:32 -08:00
Tim Abbott c43a00fd60 copy: Include EDITED notices in more copy-paste cases.
Previously, they were only included in messages that were the first in
their recipient block and were not /me (status) messages.
2018-11-27 16:24:04 -08:00
Tim Abbott 3ef0d6016c copy: Fix copy-pasting of EDITED notices in messages.
Previously, because the parens were added via CSS, copy-pasting the
EDITED notices resulted in junk like this:

 Iago 3:51 PMEDITED
edited message content

Now, you get:

 Iago 3:51 PM (EDITED)
edited message content
2018-11-27 16:20:46 -08:00
Tim Abbott e159f052bb status: Allow selecting status message text.
Status messages were incorrectly not selectable, due to a bug in how
we setup the no-select hierarchy (for making copy-paste not have weird
whitespace issues).

Fixes #10456.
2018-11-27 15:55:51 -08:00
Tim Abbott bddf23894d buddy list: Add marker for which user is yourself.
This helps make clear what's going on with the potentially confusing
"you" user.
2018-11-27 15:07:58 -08:00
Steve Howell 3e860fbc39 subject -> topic: Fix group.subject references. 2018-11-16 11:05:43 -08:00
Steve Howell 55362263dd Isolate/eliminate uses of "match_subject". 2018-11-16 11:05:43 -08:00
Steve Howell 89c278d1e5 Isolate/eliminate use of "subject_links".
For message groups, I just changed the internal name
to "topic_links".

For uses of "subject_links" that are tied to how the
server names fields, I introduced these wrappers:

    * util.set_topic_links(obj, topic_links)
    * util.get_topic_links(obj)

These can be used for either messages or events.
2018-11-16 11:05:43 -08:00
Nolan Darilek 5d291eb52c accessibility: Model messages as a list with items, each representing a single message.
Previously, messages were a string of disconnected regions. Modeling them as a list brings several benefits:
 * Quickly jump to the message list by using a screen reader's list navigation hotkey.
 * Quickly jump between messages by using a screen reader's list item navigation hotkey.
 * Quickly jump to the beginning or end of message lists in screen readers that support it.
2018-11-16 08:54:01 -08:00
Steve Howell 7ae8907b3f subject -> topic: Rename narrows_by_subject. 2018-11-14 23:24:06 -08:00
Yashashvi Dave 766bdbfe89 stream settings: Rephrase info to state guest user can't join public stream.
Change wording of public stream description to
"Any member of the organization" from "Anybody"
to indicate that guest users can't subscribe even
public stream of organization.
2018-11-12 17:00:38 -08:00
Yashashvi Dave 89eebad14f user profile: Add user type/role in user profile popover.
Add user type/role in user's detail profile popover.

Fixes part of #10754
2018-11-12 15:13:44 -08:00
Yashashvi Dave 54dd7f0a43 user info popover: Add user type/role in user information popover.
Add user role-- "Administrator", "Member", "Bot" or "Guest"
under 'Local time' in user information popover.

Fixes part of #10754
2018-11-12 15:13:44 -08:00
Nolan Darilek c0a8f0a66e accessibility: Add button role and tabindex to sender names.
This facilitates interacting with them via keyboard.
2018-11-09 17:33:42 -08:00
Nolan Darilek fb54ea82b2 accessibility: Make the recipient row more accessible.
This primarily just exposes hidden icons.
2018-11-09 17:33:32 -08:00
Nolan Darilek ef8ea330fa accessibility: Make individual messages more accessible.
We do this by setting a region and exposing hidden icons.
2018-11-09 17:33:21 -08:00
Shubham Dhama d5e1e8e5e3 settings: Move deactivate account button under "User settings".
This moves the deactivate account which was previously placed under
"SETTINGS / YOUR ACCOUNT" -> "Deactivate account" to "SETTINGS / YOUR
ACCOUNT" -> "User settings" for making it more visible.
2018-11-08 22:27:22 -08:00
Nolan Darilek 33c2bbf0f1 accessibility: Make another reactions button semi-accessible. 2018-11-08 14:10:48 -08:00
Nolan Darilek 95781c913d accessibility: Hide non-actionable profile image from screen readers. 2018-11-08 14:10:11 -08:00
Yashashvi Dave f6b4e65b92 compose: Hide sub-btn in compose-to-unsub warning if user can't subscribe.
Hide subscription button in compose-message-to-unsubscribe-stream
warning, if user can't subscribe back to stream.
2018-11-02 11:57:04 +05:30
Marco Burstein 05b486182d compose: Create the mobile compose popover.
When a user clicks the compose `+` button, create a popover at the
bottom right of the screen including buttons for opening a new stream
message or a new private message.
2018-10-31 16:47:48 -07:00
Shikhar Vaish 5ffca5e388 settings: Warn if server is unable to deliver mobile push notifications.
The "notification settings" page previously advertised support for
mobile push notifications via checkboxes, even if the server hadn't
yet been registered for push notifications.  This was a frequent
source of onboarding pain for new Zulip organizations.

We fix this by providing a clear warning and disabling the relevant
inputs on the settings pages.

Modified significantly by tabbott to correct some tricky logic errors
as well as some copy-paste bugs.

Fixes #10331.
2018-10-31 13:18:17 -07:00
Tim Abbott deb29749c2 people: Add a CSS class to label guest users.
This doesn't do anything yet, since we still need to add the actual
CSS, but it should make it easy for someone to just do the design
work.
2018-10-31 10:15:49 -07:00
Rishi Gupta ef8113556a settings: Update dropdown in user roles modal. 2018-10-30 10:48:06 -07:00
Rishi Gupta 37e00dce78 settings: Update organization permission strings to reflect guests. 2018-10-30 10:48:06 -07:00