Commit Graph

1895 Commits

Author SHA1 Message Date
Gittenburg 4cd23103db message feed: Make message controls more accessible.
We already have single-key shortcuts for all message controls but Zulip
should be usable from the keyboard without having to learn a bunch of
Zulip-specific keyboard shortcuts.
2020-07-30 16:53:00 -07:00
YashRE42 b4891a5841 navbar: Rename tab_bar to message_view_header.
Prior to commit eb4a2b9d4e the center
area of the navbar was based on a structure that appended crumbs or
"tabs" as <li>s, forming a tab_bar and a tab_list.

However, in eb4a2b9d4e we apply a new
style and structure to the navbar which lets go of the convention of
tabs. Hence, we'd like to purge the tab_bar and tab_list labels from
our code base.

We purged tab_list in 1267caf5009118875f47fdafe312880af08024e1.

This commit purges tab_bar, it includes:
- A blanket search and replace of tab_bar with message_view_header.
- Splitting a single line comment in
  tab_bar.js / message_view_header.js.
- The renaming of tab_bar.js to message_view_header.js.
- The renaming of tab_bar.hbs to message_view_header.hbs.
- A blanket search and replace of tab_data with
  message_view_header_data.
- Replacing the single occurrence of tabbar with message_view_header
  (it was within a comment.)
2020-07-30 16:23:13 -07:00
Vinit Singh 1f54918c8a message_controls: Use a template instead of passing html as a string.
This commit adds a handlebar template for the View source/Edit message
button in message controls in the message view.

This change also fixes the broken html titles that were added in
commit fdbab54614, and adds proper
internationalization for the title text.
2020-07-27 11:05:44 -07:00
Anders Kaseorg 2d8cab2cee stream_sidebar_actions: Rename toggle_home to toggle_stream_muted.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 18:26:20 -07:00
Anders Kaseorg e6a66063a9 stream_edit: Restore keyboard accessibility to checkboxes.
Listen to change events from the checkbox and pay attention to its
actual value, rather than simulating it by toggling booleans on click
events.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-07-21 18:26:20 -07:00
jagansivam28 5f874a51f7 upload widget: Rename image upload widget upload text CSS class.
Previously, image upload widget delete text CSS class name was
`settings-page-upload-text`.
We can change the CSS class name to `image-upload-text`
so that the name can be more generic.
2020-07-21 16:19:21 -07:00
jagansivam28 ad0ff10598 upload widget: Rename image upload widget delete text CSS class.
Previously, image upload widget delete text CSS class name was
`settings-page-delete-text`.
We can change the CSS class name to `image-delete-text`
so that the name can be more generic.
2020-07-21 16:19:21 -07:00
jagansivam28 90cb72b103 upload widget: Rename image upload widget delete button CSS class.
Previously, image upload widget delete button CSS class name was
`settings-page-delete-button`.
We can change the CSS class name to `image-delete-button`
so that the name can be more generic.
2020-07-21 16:19:20 -07:00
jagansivam28 d1b0a12c2d upload widget: Rename image upload widget background css class. 2020-07-21 16:13:24 -07:00
jagansivam28 1702f7f802 upload widget: Change image upload widget CSS class name.
Previously, image upload widget CSS class name was
`avatar-icon-logo-settings`  it is not relevant to the widget so
we can change the CSS class name to `image_upload_widget`
so that the name can be more generic.
2020-07-21 16:13:23 -07:00
SiddharthVarshney fb3484df52 stream-settings: Change checkbox UI.
These checkboxes will now be more consistent
in design as we have in other part of the UI.

e.preventDefault() is added inside the
stream_is_muted_clicked function will disable
the default checkbox and make sure click event
come from only <span> part of the checkbox.
2020-07-21 13:27:21 -07:00
Aman Agrawal ddef014eea recent_topics: Patch colors.
Don't allow bootstrap to override row hover colors.
Show unread topics in same color as others.
2020-07-15 23:57:58 -07:00
Aman Agrawal c1b047b0d1 recent_topics: Use simplebar for scrolling. 2020-07-15 10:16:56 -07:00
Aman Agrawal 57b6f9179b settings: Fix simplebar scrollbar in org settings dropdown.
This commit fixes the dropdown_list_widget to use simplebar for
scrolling.

It was not being used because data-simplebar should not be inserted
to the element being rerendered. This commit adds a new element
wrapping 'dropdown-list-body' which was being rerendered and
data-simplebar is added to that new element 'dropdown-list-wrapper'.

Also, there should always be a max-height property on data-simplebar
element and it is also added in this commit.

There is also a change to set margin of 10px only on the first div
element and which is direct children of organization-settings-parent
element. This is correct because we only want margin to add some space
between the heading of subsection and the first setting of that
subsection. Previously, the margin was being added to first div of all
the other child containers also and this was adding unnecessary margin
to the first div element of different simplebar containers.
2020-07-15 10:16:56 -07:00
Aman Agrawal c4bbdf040e recent_topics: Fix search clear icon overflowing in next line.
Sometimes, the clear icon overflows on the next line on specific
widths. This makes sure it never happens by wrapping them in a
block.
2020-07-15 10:00:52 -07:00
Aman Agrawal e7a65fa688 recent_topics: Show action buttons next to topic.
We remove the action column and show action buttons next to topic
after unread count (if present). This save us a lot of extra space
on small window sizes.
2020-07-15 09:59:37 -07:00
Aman Agrawal 8951f77e5d recent_topics: Show read topics in a darker shade. 2020-07-15 09:59:37 -07:00
SiddharthVarshney 972a1019cf message_controls: Replace chevron-down with ellipsis-v icon.
After migrating chevron-down with ellipsis for
sidebar-menu, this commit will do the same for
message narrow for consistency.
2020-07-13 16:12:26 -07:00
SiddharthVarshney d0fd0cae3f message-controls: Use <i> tag for starred message icon.
Throughout the codebase we use <i> tag for icons.
This commit will add <i> tag inside the starred message
div and fa classes are now used with this <i> tag.

The starred message div is now consistent with other
message_controls divs.

Tweaked by tabbott to use the name star_container for better
readability.
2020-07-13 15:59:12 -07:00
YashRE42 ae7ff04fe6 navbar: Purge tab_list label from code base.
Prior to commit eb4a2b9d4e the center
area of the navbar was based on a structure that appended crumbs or
"tabs" as <li>s, forming a tab_bar and a tab_list.

However, in eb4a2b9d4e we apply a new
style and structure to the navbar which lets go of the convention of
tabs. Hence, we'd like to purge the tab_bar and tab_list labels from
our code base.

It would have been nicer if we could simply purge tab_bar from the
codebase and rename "#tab_list" so that we have an anchor and wrapper
structure in the html, but dropping the float: left on tab_bar causes
some confusing problems such as causing the horizontal border to
disappear and the search_box to shift out of its intended position and
so its simpler to get rid of tab_list from our code base first.

This commit:
- Removes the #tab_list wrapper div from tab_bar.hbs.
- Removes any #tab_list selectors from night_mode.scss so that they
  simply target based on "#tab_bar" instead of "#tab_bar #tab_list".
- Removes tab_list selectors from zulip.scss, so that #tab_list
  attributes now apply to the #tab_bar, in the process we drop the
  duplicated width property and reorder the attributes.
- Replaces all mention of #tab_list with #tab_bar in JS files.
2020-07-13 15:39:36 -07:00
YashRE42 bf91dad438 navbar: Simplify narrow_description conditional in hbs template.
Previously, we had the entire div within the conditional, instead of
just the contents, which were the only variable elements.

This change moves the conditional over just the contents of the div
and improves readability.
2020-07-13 15:39:36 -07:00
Gittenburg 0b4568d249 message_header: Fix overlap on mobile with flex.
Previously .recipient_row_date was positioned absolutely, allowing it to
overlap with the topic name on narrow screens. This can be solved by
using flexbox. To implement the empty space between the bar controls and
the date on wider screens we move the date outside of the bar controls
(which also makes more sense semantically since the date isn't a
control).

Fixes #15501.
2020-07-09 13:13:38 -07:00
sahil839 c4c1790b00 compose: Add data-stream-id field in compose_invite_users.
This commits add data-stream-id attribute to the compose_invite_users
template. This helps in avoiding the error that occured if user
clicked the link after renaming of stream.

As a result of above changes, the checks for empty and invalid stream
name in compose box are done in warn_if_mentioning_unsubscribed_user
function instead of needs_subscribe_warning function.
2020-07-06 15:30:01 -07:00
Aman Agrawal c947be5411 msg_edit_form: Show checkboxes in separate lines if present. 2020-07-06 12:38:58 -07:00
Gittenburg 20bf8f41d9 streams: Format subscriber count according to browser locale.
If a channel has a thousand subscribers this commit results in the count
being displayed with a thousands separator, e.g. with English locale you
get 1,000 instead of 1000.
2020-07-06 11:27:43 -07:00
Gittenburg 3a973b15ee settings: Fix modal out of screen on mobile.
For the email and full name modals we simply change width to max-width.

The password modal used a flex-row class for no apparent reason,
the class wasn't used anywhere else and removing it fixes the UI bug.

Fixes #15311.
2020-07-02 13:47:26 -07:00
YashRE42 1defd21dac message_controls: Don't show pencil icon until server ack.
Previously, this was unconditional wrt local echoe which caused a bug
where by the pencil edit icon was visible first, then got hidden when
the chevron and star became visible.

This commit resolves the above bug, but this area still behaves
slightly weirdly in that, if, within a PM narrow, the user's mouse
cursor is over the spot where the message edit controls will appear
after sending, and then a message is sent by the user, only the
chevron and star appear at first. On cursor exit and reenter, all
three controls reappear ie the final state is correct.

Similar to the other "unless locally echoed" cases here, this will
probably prevent unexpected bugs caused by eg trying to enter edit
state before the message was received by the server, and then
redrawing later, etc.
2020-06-29 16:28:52 -07:00
Aman Agrawal ac0db1ab81 message_edit_form: Rename thread to topic for clarity. 2020-06-29 12:26:43 -07:00
Aman Agrawal 7e16650de1 recent_topics: Show exact date-time on last msg time hover. 2020-06-28 15:03:54 -07:00
sahil839 44b73bae23 emoji-settings: Hide the text above admin-emoji-form when form is hidden.
This commit changes the code to hide the text above the admin-emoji-form
when the form itself is hidden.
2020-06-28 14:11:27 -07:00
sahil839 2e7bcc1436 emoji-settings: Fix value of aria-label attribute of search input.
This commit changes the value of aria-label attribute of search
input of emoji settings form to be "Filter emojis" instead of
"Filter linkifiers".
2020-06-28 14:11:27 -07:00
sahil839 051842e646 admin: Remove ".not(can-edit)" selector filter from insert_tip_box.
This commit removes the ".not(can-edit)" selector filter from
insert_tip_box. We do not require this selector filter because
this class is only used for emoji-settings and we already do not
prepend tip in emoji-settings page from this function and we handle
it separately.

As this class is only used for this purpose we can also remove this
class from emoji_settings_admin.hbs.
2020-06-28 14:11:27 -07:00
sahil839 6eb8442a59 invites: Send user_id of the referrer instead of email in invites dict.
We send user_id of the referrer instead of email in the invites dict.
Sending user_ids is more robust, as those are an immutable reference
to a user, rather than something that can change with time.

Updates to the webapp UI to display the inviters for more convenient
inspection will come in a future commit.
2020-06-26 16:57:50 -07:00
sahil839 544760daa7 retention: Add link to message-retention-policy docs next to the heading.
This commit adds link to the message-retention-policy docs next to the
heading for both realm-level and stream-level settings.
2020-06-26 14:43:47 -07:00
sahil839 cc991f58bd retention: Fix UI of stream message retention days to restrict admins.
This commit fixes the UI for stream message retention days to allow
only owners to set or update the setting.
We hide the setting for non-owners in the stream creation form and
disable it in the stream_privacy_modal.

Fixes a part of #15558.
2020-06-26 14:43:47 -07:00
Aman Agrawal 4cd7f2a329 recent_topics: Wrap focusable elements around a div.
This avoids hard coding the focusable elements.
2020-06-24 15:33:25 -07:00
jagansivam28 eaa085a6f8 realm logo: Add title for realm day/night logo.
Having title for realm day/night logo elements is
pretty good so that we can reduce confusion for new users.
2020-06-23 14:24:56 -07:00
Aman Agrawal 572e504d4e recent_topics: Move "Include muted" filter beside "All" filter.
This helps user understand "Include muted" filter better and
saves keypress to focus on more used filters like "participated"
and "unread".

See https://github.com/zulip/zulip/issues/15482.
2020-06-21 10:03:26 -07:00
sahil839 f10efa27b8 users: Add docs link next to the label of dropdown for changing user's role.
This commit adds link to 'roles and permissions' docs next to the label
of dropdown for changing user role.
2020-06-21 09:41:46 -07:00
MariaGkoulta b10f156250 settings: Add automatic theme detection feature.
With this implementation of the feature of the automatic theme
detection, we make the following changes in the backend, frontend and
documentation.

This replaces the previous night_mode boolean with an enum, with the
default value being to use the prefers-color-scheme feature of the
operating system to determine which theme to use.

Fixes: #14451.

Co-authored-by: @kPerikou <44238834+kPerikou@users.noreply.github.com>
2020-06-21 01:09:01 -07:00
sahil839 63389b3bd3 invite: Add option to invite user as an organization owner.
We can now invite new users as realm owners. We restrict only
owners to invite new users as owners both for single invite
and multiuse invite link. Also, only owners can revoke or resend
owner invitations.
2020-06-20 23:04:59 -07:00
Aman Agrawal 34e62f06f4 recent_topics: Renamed 'muted' filter for clarity. 2020-06-20 22:29:48 -07:00
Rohitt Vashishtha fca7897d76 minor: Fix typos in migration to image upload widget.
We were showing the organisation profile picture  in place of the
logo and night-mode logo after the migration. This change fixes it.

Fixes #15493.
2020-06-20 16:21:02 -07:00
SiddharthVarshney b122ad7da4 topic-popover: Add chevron-right icon in topic popover title. 2020-06-20 14:57:54 -07:00
sahil839 821e25ffb0 streams: Show message retention policy details in subscription_type text.
This commit adds message retention policy details in the subscription_type
text below the stream description.

We do not show any text when realm-level settings is set to forever and
stream-level is set to either forever or realm_default.
2020-06-18 17:13:04 -07:00
sahil839 d9b7228444 streams: Add frontend to set/update message_retention_days of a stream.
This commit adds frontend support for setting and updating message
retention days of a stream from stream settings.

Message retention days can be changed from stream privacy modal of the
stream and can be set from stream_creation_form while creating streams.

Only admins can create streams with message_retention_days value other
than realm_default.

This commit also contains relevant changes to docs.
2020-06-18 17:00:34 -07:00
Aman Agrawal 42436cedbe stream_popover: Allow editing topic without stream change.
* User can now edit the topic without changing stream.
* An alert is displayed if neither stream or topic changed.
2020-06-18 01:01:47 -07:00
jagansivam28 872d43713a settings org: Fix i18n in image_upload_widget.hbs.
Since our translation functions don't support passing a variable into
them and still being found by manage.py makemessages, we need to use
translation function before passing as variable into
image_upload_widget.hbs file.
2020-06-17 17:56:57 -07:00
jagansivam28 3cef5abaf0 settings org: Delete realm-logo-widget.hbs file.
Since we use common HTML template  'image_upload_widget.hbs' for
user avatar, realm icon and realm day/night logo `realm-logo-widget.hbs`
file is replaced by  'image_upload_widget.hbs' therefore
we can delete `realm-logo-widget.hbs` file.
2020-06-17 17:56:57 -07:00
jagansivam28 548107632c settings org: Use `image_upload_widget.hbs` for realm day/night logo.
Now we can use common HTML image upload widget template
`image_upload_widget.hbs` for realm day/night logo and
we should access those day/night logo elements using
e.g., "#realm-day/night-logo-upload-widget .realm-logo-elements".
since we use image_upload_widget.hbs for realm day/night logo upload
widget we need to extract CSS for realm day/night logo and
place them separately under `#realm-day-logo-upload-widget`
and `#realm-day-logo-upload-widget` css id.
2020-06-17 17:47:49 -07:00
jagansivam28 e132db3480 settings org: Use `image_upload_widget.hbs` for realm icon.
Now we can use common HTML image upload widget template
`image_upload_widget.hbs` for realm icon. we can access icon
element using "#realm-icon-upload-widget .realm-icon-elements".
also we need to extract CSS for realm icon and place them
separately under `#realm-icon-upload-widget` css id.
2020-06-17 17:47:49 -07:00
Tim Abbott a2767e8c50 CVE-2020-14194: Use noopener/noreferrer for external links.
We fixed the main issue of this form in CVE-2020-9444, but the audit
done at that time only included links found in rendered_markdown; this
change completes our audit for links with target=_blank anywhere in
the codebase.
2020-06-16 23:35:39 -07:00
Tim Abbott 4fff858aa2 templates: Fix missing quoting of attributes in HTML templates.
This fixes a bundle of issues where we were missing "" around
attributes coming from variables.  In most cases, the variables were
integers or fixed constants from the Zulip codebase (E.g. the name of
an installed integration), but in at least one case it was
user-provided data that could potentially have security impact.
2020-06-16 23:35:39 -07:00
YashRE42 71e393575b navbar: Improve click area around stream name.
Previously the click area to open the settings modal was limited to
just the stream name (just the text). This, inconveniently, created a
lot of empty, unclickable space around the stream name.

This commit resolves the problem by:
  * Extracting the title and icon into a separate template as
    `navbar_title_and_icon.hbs` and calls this partial in
    `tab_bar.hbs`.
  * Calling the partial within an <a> tag for stream based narrows
    and in a <span> tag for non-stream narrows.
  * Making some CSS changes so that everything still renders correctly
    (visually).

This commit also:
  * Leads us to "piggy back" all stream based narrow elements on the
    `stream_settings_link` conditional. (Previously the only "piggy
    backing" was by `narrow_description` on `sub_count`, which was
    necessary for the rendering of the `(no description)` string.)

The end goal here is that the entire navbar is clickable. This is a
step towards that goal, but some of the margins on the sub count and
its ::before and ::after pseudo-elements still need to be fixed.
2020-06-16 17:26:55 -07:00
YashRE42 846383f4a0 navbar: Set user count region as click target to open settings modal.
Previously the click area to open the settings modal was limited to
just the stream name (just the text).

A nice goal to strive for here is to make the entire navbar a
continuous clickable region.

This adds the same click action as `stream_name` to the `sub_count`.

There's still scope for improvement after this change because of the
margins on `sub_count::before` and `sub_count::after` as well as
because only the text in `stream_name` is clickable.
2020-06-16 17:26:55 -07:00
Clara Dantas ddbde66af5 realm: Remove Google Hangouts integration.
Google  has removed the Google Hangouts brand, thus we are removing
them as video chat provider option.
This commit removes Google Hangouts integration and make a migration
that sets all realms that are using Hangouts as their video chat
provider to the default, jitsi.

With changes by tabbott to improve the overall video call documentation.

Fixes: #15298.
2020-06-16 17:02:27 -07:00
jagansivam28 4576742b2f user avatar: Remove `user_avatar_file_input_error` id.
Now we can remove `user_avatar_file_input_error` id and added new class
`image_file_input_error`.we can access this class using
`#user-avatar-upload-widget .image_file_input` so that we can
have only one id at top-level and 'image_upload_widget.hbs`
can be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 c141daa624 user avatar: Remove `user_avatar_file_input` id.
Now we can remove `user-avatar-block` id and added new class
'image_file_input'.we can access this class using
`#user-avatar-upload-widget .image_file_input` so that we can have
only one id at top-level and 'image_upload_widget.hbs`
can be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 4fe066c437 user avatar: Remove `image-block` id.
Now we can remove `user-avatar-block` id and add common class `image_block`.
we can access this class using `#user-avatar-upload-widget .image_block`
so that we can have only one id at top-level and 'image_upload_widget.hbs`
can be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 9fde085536 user avatar: Remove `avatar-spinner-background` id.
Now we can remove the id `avatar-spinner-background` and access spinner
element from `#user-avatar-upload-widget .image_upload_spinner` so
that we can have only one id at top-level and 'image_upload_widget.hbs` can
be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 f609f675ae user avatar: Remove `avatar-spinner-background` id.
Now we can remove the id `avatar-spinner-background` and access spinner
element from `#user-avatar-upload-widget .settings-page-upload-text` so
that we can have only one id at top-level and 'image_upload_widget.hbs` can
be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 0e5c6fa578 user avatar: Remove `user_avatar_upload_button` id.
The upload text element is wrongly named as id=user_avatar_upload_button.
now  we can remove that id and access upload text element from
`#user-avatar-upload-widget .settings-page-upload-text` so that we
can have only one id at top-level  and 'image_upload_widget.hbs` can
be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 df4c8ab1a2 user avatar: Remove `user_avatar_delete` id.
We can remove id="user_avatar_delete" and access delete-text from
`#user-avatar-upload-widget .settings-page-delete-text` so that
we can have only one id at top-level  and 'image_upload_widget.hbs`
can be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 b3fca96254 user avatar: Remove user_avatar_delete_button id.
we can remove `user_avatar_delete_button` id and access delete button
from `#user-avatar-upload-widget .settings-page-delete-button` so that
we can have only one id at top level and 'image_upload_widget.hbs`
can be more dynamic so we can use for other similar widgets also.
2020-06-16 12:12:21 -07:00
jagansivam28 95de217326 user avatar: Rename and convert "#user-settings-avatar".
Renaming "user-settings-avatar" to "image_upload_button" since the
`user-settings-avatar` name is irrelevant/confusing for the upload
button, and converting the id into a class so that we could just have
only one outer id.
2020-06-16 12:12:21 -07:00
jagansivam28 14a77c8b9a settings: Refactor `image_upload_widget.hbs`.
We can check for the `is_editable_by_current_user` condition once in
the upper level instead of checking twice in middle for the same
conditions and to match the implementation of style realm icon and
realm logo since similar implementation between avatar, logo, the icon
will help us to use `image_upload_widget.hbs` for logo and icon
widgets also.

This likely fixes a bug with the delete text being shown incorrectly
for non-administrator users.
2020-06-16 12:12:21 -07:00
jagansivam28 20740de700 settings: Extract image_upload_widget.hbs from avatar upload widget.
We extract image_upload_widget.hbs from user avatar upload widget.
The plan is to the same HTML template for all 4 widgets (user avatar,
icon, day logo, night logo) across the two settings UIs and different
image upload widgets as possible in future.

This breaks i18n; we'll fix it in follow-up work.
2020-06-16 12:12:04 -07:00
jagansivam28 19490fe8b0 settings: Change user avatar image display HTML.
This changes the user avatar image display implementation to more
closely match how the realm icon and realm logo image features are
structured.  This is early preparatory work towards sharing this code
between the various widgets.
2020-06-16 12:03:50 -07:00
YashRE42 1e8b922548 navbar: Add missing internationalization to navbar.
This commit adds translation tags to a few user facing strings which
weren't translated prior:
 - "Unknown streams" text and description.
 - "All messages" heading.
 - Tooltip text for precise count of subscribed users.

The numeric count itself is not translated, because we do not do
similar anywhere else in the UI.
2020-06-15 16:48:24 -07:00
sahil839 18429cfd29 realm: Allow only owners to set message retention policy for a realm.
This commits adds restriction on admins to set message retention policy.
We now only allow only organization owners to set message retention
policy.

Dropdown for changing retention policy is disabled in UI for admins also.
2020-06-14 21:23:53 -07:00
sahil839 87e72ac8e2 realm: Allow only owners to configure auth methods for a realm.
This commit adds the restriction on configuring auth methods for
admins. We now allow only owners to configure the auth methods
for realm.
2020-06-14 21:23:51 -07:00
sahil839 a6f31c3668 settings: Disable organization deactivation button for admins.
This commit adds the code to disable deactivate organization button
for admins. We now allow only owners to deactivate the organization.

The backend implementation for allowing only owners to deactivate
is already added in 81c28c1.
2020-06-14 21:20:30 -07:00
sahil839 dbd64c4362 settings_users: Only owner can deactivate other owners.
This commit adds the restriction of deactivating owners for admins
by disabling the deactivating button in the UI. Only owners are
allowed to deactivate other owners. The backend part of this is
already implemented in 86b52ef.
2020-06-14 21:20:30 -07:00
sahil839 c7a68d60f3 realm owner: Add frontend implementation of owner role.
This commit adds the option of owner role in user role dropdown
and also takes care of the restrictions while adding/removing
owner status of the user.
This commit also handles the places where we dispaly role of
the user in UI.
2020-06-14 21:20:30 -07:00
SiddharthVarshney 177ec5b2d5 sidebars: Replace chevron with ellipsis-v icon from the sidebars.
The chevron sometime can be confused as an icon for expanding the
stream topics especially for the new users.

This commit replaces the confusing chevron icon from the stream-sidebar,
topic-list, user-presence-row, all-messages and starred-messages with
ellipsis-v icon(vertical three dots).

Fixes: #7115
2020-06-14 20:57:43 -07:00
Aman Agrawal 57aee34845 recent_topics: Rename `muted` filter to `include_muted`.
This adds clarity to what this filter really does.
Revert muted variable rename via
e769323d0c.
2020-06-14 11:05:57 -07:00
SiddharthVarshney 8636d82eba settings: Use icon to play notification sound. 2020-06-13 16:46:05 -07:00
Aman Agrawal 0327ec4c4b recent_topics: Show unread counts similar to other UI elements. 2020-06-13 16:29:19 -07:00
Aman Agrawal a1cca4544c recent_topics: Improve variable naming of tableFixHead. 2020-06-13 16:29:19 -07:00
Aman Agrawal 2d6ada4360 recent_topics: Use get_topic_key everywhere.
This deduplication helps with readability.

Pass get_topic_key in recent_topic_row instead of
computing it in DOM.

Fix broken test_update_unread_count
after this change. This was a regression
which went unnoticed.
2020-06-13 16:29:19 -07:00
Aman Agrawal d7d5bc208c recent_topics: Rename count_senders for clarity. 2020-06-13 16:29:19 -07:00
jagansivam28 1c3485647f realm logo: Refactor upload_widgets.js.
We can remove a {{theme_mode}}-settings class on the upload button
and access day/night from `.closest("realm-logo-section")`
so that only the outer ID differs between the two widgets.

Part of #14730.
2020-06-10 17:02:06 -07:00
Tim Abbott 6f159ce5c5 templates: Clean up wording around topic moves.
This switches us to cleaner, simpler labels for moving topics; while
also avoiding claiming that we're only allowing moving topics to other
streams.
2020-06-10 12:12:17 -07:00
Tim Abbott 26083e4b10 popovers: Improve label for choosing colors. 2020-06-10 09:55:51 -07:00
Aman Agrawal e5e02319b4 recent_topics: Show msg if no topics are visible. 2020-06-09 22:08:31 -07:00
Aman Agrawal ad2e7026c8 recent_topics: Add functionality to sort rows via header.
Add custom sorting for stream and topic headers.
2020-06-09 22:08:31 -07:00
Aman Agrawal 084cbd4ff7 recent_topics: Use list_render to display topic rows.
This fixes the laggy behaviour when there are 2k+ rows to processes,
since list_render uses lazy render based on what rows are visible
to the user.
2020-06-09 22:08:31 -07:00
Aman Agrawal 33ace41ffe recent_topics: Add filter button to show muted topics.
We don't show muted streams/topics by defualt. Only when user
turns on muted filter.
2020-06-09 22:08:31 -07:00
Aman Agrawal 89fe133d2d recent_topics: Add button to clear search. 2020-06-09 22:08:31 -07:00
Aman Agrawal e8cc9da4c7 recent_topics: Don't complete_rerender on filter change.
We store the relevant data to hide/show a topic in the row itself,
and use jquery to hide/show it on filter change.

This also fixes search breaking the set filters.
2020-06-09 22:08:31 -07:00
Aman Agrawal 272a3eed8a recent_topics: Show unread count after topic name.
We remove the non-obvious unread count column and move the unread
counts to be displayed after topic.
2020-06-09 22:08:31 -07:00
Aman Agrawal d8a312eddb recent_topics: Append proper prefix before stream name.
We reuse the existing logic for displaying and updating stream color
from the stream left sidebar.

Tests fixtures were extracted and updated for this commit.
2020-06-09 22:08:31 -07:00
Aman Agrawal ee7faf13cc recent_topics: Show checkbox icons for active filters. 2020-06-09 22:08:31 -07:00
Aman Agrawal cea3bb437f recent_topics: Make table headers fixed. 2020-06-09 22:08:31 -07:00
Aman Agrawal 4f1b7542ed recent_topics: Toggle topic display according to filters. 2020-06-09 22:08:31 -07:00
Aman Agrawal bc7136590a recent_topics: Add avatars of recent senders to topic. 2020-06-09 22:08:31 -07:00
Aman Agrawal bdaf4e1079 recent_topics: Add action to mark topic as read. 2020-06-09 22:08:31 -07:00
Aman Agrawal 464b541363 recent_topics: Display recent topics in a table.
* Add action to mute topics.
* We don't need to store muted data per topic as previously planned.
* Moved launch topic test to the top so that they run on non-modified
  data.
2020-06-09 22:08:31 -07:00
Aman Agrawal 9328dc8437 templates: Show Overlay of Recent Topics.
* Show an empty overlay of recent topics.
* Register click event to open recent topics.
* Launch recent topics on "t" keypress.

This is based on the draft overlay.
2020-06-09 22:08:31 -07:00
jagansivam28 627666b57c settings org: Trigger realm logo upload by clicking on logo element.
We now trigger realm day/night logo upload by clicking on realm
day/night logo element itself rather than having a big upload button
and to match our user avatar UI.  Added new spinner over the logo
element itself to show while uploading realm logo for both day and
night logos.
2020-06-08 22:54:46 -07:00