Commit Graph

1360 Commits

Author SHA1 Message Date
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
Rishi Gupta d3b6b4e885 settings: Remove extra column from table in bot-list-admin. 2018-10-29 23:16:45 -07:00
Pragati Agrawal d5df0377cc settings_users: Support guest user in admin-user-table.
This supports guest user in the user-info-form-modal as well as in the
role section of the admin-user-table.

With some fixes by Tim Abbott and Shubham Dhama.
2018-10-29 12:33:35 -07:00
Aditya Ramesh c242433dcb message view: Fix order of dynamic elements in recipient bar.
This swaps the order of the "blue square" outgoing link and the edit
pencil.

Fixes #10681.
2018-10-19 15:42:47 -07:00
dipu989 ef2345414d settings: Change username label. 2018-10-16 17:09:21 -07:00
dipu989 ea5bb4a150 settings: Interchange Username and Bot Type positions. 2018-10-16 17:09:20 -07:00
Shubham Dhama 3e0b420423 settings: Extend `settings_checkbox` for dependent checkboxes.
This deduplicate code for the checkboxes which are dependent on other
parameters and it makes no sense changing them when that parameter is
false.  For example, changing `message_content_in_email_notifications`
makes sense only when `enable_offline_email_notifications` is true.
2018-10-16 13:08:55 -07:00
Cynthia Lin c0edcf6fe4 user profiles: Remove empty space under profiles with no set fields.
Fixes #10652.
2018-10-14 09:37:18 -07:00
Steve Howell 3545bc1893 settings: Confirm before deleting user groups.
Fixes #10498.
2018-10-12 10:38:56 -07:00
Steve Howell b7f764aa29 settings: Add confirm_dialog module.
This module makes it really easy to create are-you-sure
dialogs for dangerous operations.

Basically it's one function with five parameters.  You
give three chunks of HTML, a callback function, and
a parent container.

The first use of this will be in settings_user_groups,
coming up in a couple commits.
2018-10-12 10:37:06 -07:00
Pragati Agrawal 749e034863 org settings: Rename "Filter settings" to "Linkifiers".
Fixes: #10551
2018-10-09 08:50:45 -07:00
Pragati Agrawal 8a9959b4be org settings: Remove bolt-icon from active users' list.
Since now we have a "role" column under org settings->active-users, so
this bolt admin icon is redundant,thus removing it.
2018-10-05 15:50:27 -07:00
Pragati Agrawal 8ae008abe4 org settings: Add column for "role" under active-users.
Fixes: #10413
2018-10-05 15:50:27 -07:00
Cynthia Lin 6d0aa68591 custom profile fields: Add and restyle default user profile fields.
Refactor selectors to utilize SCSS features.

Fixes some issues in #10545.
2018-10-04 17:02:09 -07:00
Akash Nimare 138cef0906 hotspots: Change styling of intro to reply hotspot.
Updated the styling so that it looks like other hotspots.
2018-10-02 11:38:26 -07:00
Rishi Gupta 0c7be02b99 user docs: Update stream guidelines link in stream subscriptions modal. 2018-10-01 12:45:59 -07:00
Pragati Agrawal 6adabd20f5 settings: Remove dependency of message_content_in_email_notifications.
Since now we have email notifications for streams messages too, so
there is no direct dependency of
`message_content_in_email_notifications`checkbox on
`enable_offline_email_notifications` setting and neither we can say it's
dependent on `enable_stream_email_notifications` as well because we may
have email notifications set for individual streams. So removing this
checkbox dependency is the best solution here.
2018-09-21 12:46:02 -07:00
Akash Nimare b539dedfcd stream-settings: Remove unnecessary delete text from button.
We are already showing the Delete icon so it's unnecessary to have
the "Delete" text. This PR removes the same.
2018-09-21 12:17:17 -07:00
Harshit Bansal e7311cdf5d emoji: Bring back the feature of changing emojisets.
This is largely inspired by requests from people not liking the
Google's new emojiset. A lot of people were requesting to revert
back to old blobs emojiset so we are re-enabling this feature
after making relevant infrastructure changes for supporting google's
old blob emojiset and re-adding support for twitter emojiset.

Fixes: #10158.
2018-08-31 11:52:24 -07:00
Steve Howell 7b2f5ccabc Rename markdown-help to message-formatting.
This just makes the id match the name of the
menu item.
2018-08-31 11:51:22 -07:00
Pragati Agrawal ba4e4e38ae user settings: Add setting to make login notifications optional.
This adds a feature in the "Notification" section of "Settings" tab,
which lets user enable or disable login emails notification.

Tweaked by tabbott to simplify the test.

Fixes: #5795, progress towards #5854.
2018-08-28 14:02:31 -07:00
Yashashvi Dave 1400a040fd user settings: Improve style of "Preview profile" btn.
This commig update button to show user profile in user
settings. This commit change text in button, add external
link icon and change style of button.
2018-08-28 13:59:45 -07:00
Cynthia Lin e92ec362ca popovers: Show line breaks in Long type fields in user profile popovers. 2018-08-27 17:38:15 -07:00
Yashashvi Dave 9a09513b4d user settings: Add link to user profile popover.
Add button to view current user's profile popover
from user settings page.
2018-08-27 17:26:07 -07:00
Yashashvi Dave 4049a08b88 user popover: Display text as link for URL custom field.
In user profile popover, for URL type custom field
display text as link in popover, so user can easily
click on link directly.
2018-08-27 17:26:07 -07:00
Yashashvi Dave 1c14e0166c user profile popover: Enhance popover style.
This commit make changes in style of exit-sign of modal,
and also remove spacing between fields in modal.
2018-08-27 17:26:07 -07:00
Marco Burstein 76511aeed6 settings: Add a minimum width to "person picker" custom fields.
Empty "person picker" fields appear with a much smaller width than all
other custom fields. Increase the `min-width` of the field that it
matches the widths of other text boxes.

Fix #10414.
2018-08-26 23:05:10 -07:00
Joshua Pan 3ec34eda11 display settings: Implement UI for starred_message_counts. 2018-08-21 13:42:23 -07:00
Yashashvi Dave 4f9ca03c13 user profile popover: Display user pills in custom user field.
Display user pills instead of user names in custom user field
on user profile popover.
2018-08-21 12:10:35 -07:00
Yashashvi Dave 9812b81a1e user pills: Rename class `notmem` to `not-editable` for generalization. 2018-08-21 11:50:01 -07:00
Tim Abbott 5f10fa1692 user_profile_modal: Remove profile_data conditional.
It's no longer possible for profile_data to be empty, and the
conditional was in the wrong place anyway.
2018-08-21 11:49:36 -07:00
Yashashvi Dave 92782e2f89 static/js/popovers.js: Modify structure of user popover template data.
Modify structure of template data used to render
`user_profile_modal.handlebars`.

This is preparatory commit to display user pills in user profile
popover instead of user names in user type custom fields.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 150ea61271 custom profile field: Improve style of user pills in user type field.
Improve style of user pills in user-type-custom-field on
account settings page.
2018-08-21 11:42:59 -07:00
Yashashvi Dave 66c2b6d2a6 custom profile field: Remove unnecessary table header from edit form.
Remove unnecessary table header in edit-choice-field form.
2018-08-21 11:42:58 -07:00
Yashashvi Dave d5f3c9b3bc custom profile field: Rename field types in UI. 2018-08-21 11:37:51 -07:00
Yashashvi Dave 6e65235a6d zerver/lib/events.py: Add FIELD_TYPE_CHOICES_DICT to page_params.
This commit add FIELD_TYPE_CHOICES_DICT to page_params and replace
FIELD_TYPE_CHOICES.

FIELD_TYPE_CHOICES_DICT includes all field types with keyword, id
and display name. Using this field-type-dict, we can access field
type information by it's keyword, and remove all static use of
field-type'a name or id in frontend.
This commit also modifies functions in js where this page_params
field-types is used.
2018-08-21 11:37:51 -07:00
Yago González 6949ce1bad templates: Replace   with normal spaces.
This line full of non-breaking spaces dates back to before Zulip being
open sourced (ca4e6a0ff), so we can assume it was a fix that we don't
need anymore.
2018-08-21 11:13:47 -07:00
Yashashvi Dave 8ef0c6d99a custom profile field: Add length validation on field name and hint.
Add max length validation for custom field name and hint
on create-field and update-field backend views and
frontend forms.

Fixes #10284.
2018-08-17 08:37:27 -07:00
Yashashvi Dave f8b6bb6614 custom profile field: Remove add-btn of choices.
This commit
- Remove `add-btn` in choices, to create new input
  for choice
- Add logic which create blank input for choice at
  the bottom if user start typing into above input choice.
2018-08-14 10:17:57 -07:00
Yashashvi Dave 3c9a2a6d53 custom profile field: Remove logic of choice-field-delete-btn.
Hide `delete-btn` of first choice in create-new-custom-field and
edit-choice-type-field form, so user can not delete all choices
and have to submit at least one choice.
This commit remove this logic of choice-field-delete-btn from
both settings.
This is preparatory commit of adding new logic in `delete-btn`.
2018-08-14 10:17:57 -07:00
Cynthia Lin 300c4c496f user groups: Display error on user group name edit failure.
Fixes #10234.
2018-08-13 16:13:49 -07:00
Cynthia Lin 736388b4df user groups: Improve styling of user groups in admin view. 2018-08-13 16:13:49 -07:00
Shubham Padia e21e8c1bae compose: Hide subscribe button and change text for waiting period users.
Fixes #10124.
Users in the waiting period category cannot subscribe other users to
a stream. When a user tries to mention another unsubscribed user, a
warning message appears with a subscribe button on it to subscribe
the other user.
This commit removes the subscribe button and changes the warning text
for users in the waiting period category.
2018-08-13 10:18:35 -07:00
Shubham Padia 3f019cafb2 compose: Improve error handling when subscribing other users to a stream.
Instead of displaying a fixed error message inside the yellow bar itself,
now the yellow bar disappears on error and a red compose_error is shown.
The error message is the one returned from the server.
2018-08-13 10:18:35 -07:00
Harshit Bansal 9057e543ac emoji: Disable support for letting users switch emojisets.
Due to copyright issues with potentially displaying Apple emojisets on
non-apple devices, as well as iamcal dropping support for the emojione
emojiset (see https://github.com/iamcal/emoji-data/pull/142), we are
dropping (perhaps temporarily) support for allowing users to switch
emojisets in Zulip.

This commit just hides the feature from the user but leaves most of
the infrastructure in place so that in the future if we decide to
re-enable the support we will not need to redo the infrastructure work
(some JS-side code is deleted, mostly because we'll want to re-add the
feature using the do_settings_change infrastructure anyway).

The most likely emoji set to add is the legacy "blobs" Google emoji
set, since it seems popular with some users.

Tweaked by tabbott to remove some additional JS code and update the
changelog.
2018-08-08 15:48:04 -07:00
Yashashvi Dave 4aedc055ce custom profile fields: Fix click handler executed multiple times.
Previously, we incorrectly setup the click handler on
create-custom-field-btn each time settings overlay opens, which
executes handler multiple times results in more than one HTTP request
to server for custom field creation.

This commit creates an ID for create-field-btn and initializes the
click handler on this button, instead of the form; the side effect of
that change is that we're now no longer double-adding this click
handler every time the page is opened.

This isn't a clean solution; ideally, we'd only call the function to
add the click handler once in the first place.

Fixes #10126.
2018-08-08 14:54:37 -07:00
Yashashvi Dave 07959bf18e custom profile field: Reset delete-btn of choices on choice ordering.
Admin user must enter at least one choice for choice type fields
in create new custom field form. Admin can not delete all choice
options in form.
Reset delete-btn of choice inputs on choice reordering so that
admin can delete all choice except first choice input option.
2018-08-08 11:31:15 -07:00