Commit Graph

13758 Commits

Author SHA1 Message Date
Anders Kaseorg 6648fc4bf1 dropdown_list_widget: Simplify ternary expression.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-06 17:23:16 -07:00
Anders Kaseorg 16b2874b87 styles: Fix selector-not-notation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-07-06 17:23:16 -07:00
yogesh sirsat 90364d7fa8 stream_settings: Stream subscribers table head borders fix.
New shared `table-striped` CSS class, adds top and bottom side border
already, so adding only left and right side borders to subscribers table
head to avoid weird looking borders.
2022-06-30 11:25:26 -07:00
yogesh sirsat d7c5434827 tables: Cleanup of table-striped CSS block.
Making `table-striped` CSS block as a top level shared CSS inside
`app_components.css`, trying to make use of this block on every
table and also removing some dublicated CSS.

Follow-up of #21144
2022-06-30 11:25:26 -07:00
Anders Kaseorg 706d96b22e templates: Simplify nested Handlebars conditionals using {{else if}}.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-30 11:24:44 -07:00
Lauryn Menard dd8fe68223 docs: Remove CSS padding rule for multi-paragraph ordered lists.
Removes CSS rule that added a left margin and padding to not
first-child paragraph elements and `codehilite` class div elements
in ordered list elements.

Rule was added in 2017 and likely was correcting the alignment of
these elements due to another CSS rule that has since been removed.
2022-06-30 11:12:11 -07:00
Anders Kaseorg cc537af1f1 bootstrap: Remove many unused Bootstrap CSS rules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-28 16:45:48 -07:00
Anders Kaseorg 5c1328c3ba bootstrap: Remove unused Bootstrap JS modules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-28 16:45:48 -07:00
Gaurav Pandey 3aa9e4c553 recent_topics: Link timestamp to latest message.
Link the timestamp in recent topics to the
"near" link of the latest message within that topic.
Fixes #21356.
2022-06-28 13:31:27 -07:00
aparna-bhatt 1298484ac8
compose: Add keyboard shortcut tooltip to Drafts link..
This is for consistency with how we indicate keyboard shortcuts in
other elements in the compose area.

Fixes: #22131.
2022-06-28 13:25:54 -07:00
madrix01 329f52ae82 compose: Make compose box tooltips consitent.
We make the tooltips of the button in the top row consistent.
This includes -
* Removing the bold formatting from the "Go to conversation" tooltip.
* Converting the "Expand compose" tooltip to Tippy.

Fixes #22132
2022-06-28 13:24:13 -07:00
Tim Abbott d6739078ad message_edit: Change initial default for old thread notifications.
After some discussion with the community, we've concluded that in most
cases, one probably wants to notify only the destination thread, not
the source location; so let's make that the default.

We preserve the model that we remember what you did during the last
move in a given browser session, which is very helpful if you're doing
an operation N times in a row.

Fixes #21838.
2022-06-28 13:23:34 -07:00
Raghav Luthra 890de402df stream_settings: Modify the message of the "Announce stream" hint tooltip.
Follow-up to commit bbda7a5bb0.

The "Announce stream" hint tooltip earlier read "Organization
administrators can change this in in the organization settings."
It wasn't obvious that "this" refers to the stream the notification
will go to, so the tootltip message has been modified to reflect this.
2022-06-28 13:19:54 -07:00
Advait J 6ceb7b5462 streams: Enable or disable subscribers tab based on access to subscribers.
This commit adds a function to disable the subscribers tab for private
streams if a user is not subscribed to the stream and is not an admin.
We also live update the state of subscribers tab on changing privacy
of stream.

Fixes #20916.

Co-authored-by: Sahil Batra <sahil@zulip.com>
2022-06-28 13:19:26 -07:00
Harshit Agarwar 41e7d52c65
stream creation: Change the color of remove button in subscribers tab.
This button was red, which is appropriate when modifying an existing stream,
since that's a potentially disruptive action, but not appropriate in the context
of previewing subscribers for a new stream being created.

Fixes: #21863.
2022-06-28 13:11:35 -07:00
Anders Kaseorg 25f6b53e90 docs: Capitalize Handlebars consistently.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-27 13:35:10 -07:00
Anders Kaseorg 028c2e4ec9 ui_init: Remove unused .subscription_header hover handlers.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-21 12:54:51 -07:00
Anders Kaseorg 95303a9929 assets: Remove license for previously deleted emoji images.
The images themselves had been deleted by commit
cc33b68d73, and were then zanitized out
of the commit history.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-10 12:27:48 -07:00
Anders Kaseorg a1bdadfb3d audio: Remove the copy of zulip.ogg outside notification_sounds.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-10 12:27:48 -07:00
Anders Kaseorg 048b52ed5c images: Delete various unused images.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-10 12:27:48 -07:00
Anders Kaseorg 1e6bc5b36b styles: Delete some unused CSS.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-10 12:27:48 -07:00
NerdyLucifer c31ab1bcb5 recent-topics: Mark as read using unread counters in Recent topics.
The PR changes the following behaviors and UI:
1. Removes the checkmark button to mark the topic as read in
"Recent Topics".
2. Make the unread messages counter be the button for marking
all messages in the topic as read. The unread messages counter
is made clickable and tooltip is set to "Mark as read".

In "recent_topic_row.hbs", remove the checkmark button and add
classes and attributes to ".unread_counter" to give it desirable
behaviour on clicking.

In "zulip.css" set "opacity: 0.7" for ".on_hover_topic_read".

In "recent_topics.css" we set the background-color of unread counter to
hsl(105, 2%, 50%) to decrease fading of unread counter.

Fixes: #21654
2022-06-08 11:58:25 -07:00
Anders Kaseorg a6e2453323 emojisets: Use Google modern for emoji picker with text theme.
Followup to commit f743dda008 (#19672).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-06-06 15:53:32 -07:00
evykassirer 67771f80d0 drafts: Remove 'pro tip' from draft modal.
This keyboard shortcut advertisement dates from the original version
of the overlay, before we advertised the shortcut in other ways.

Discussion here:
https://github.com/zulip/zulip/pull/22127#discussion_r882270506
2022-06-02 16:42:37 -07:00
evykassirer e039bdd1e1 narrow: Replace pm_string() with _id and _email variants.
This makes the format returned by these functions more clear.
2022-06-02 16:41:06 -07:00
madrix01 b5e21ceeaf recent_topics: Prevent topic name from extending into unread column.
Previously, when there were no unread messages in a topic, the topic
name was allowed to expand into the space allocated to the unread
count. This matched the behavior of the left sidebar. However, the
left sidebar has extremely limited horizontal space, and being able to
display a few extra characters is useful; recent topics does not have
this constraint. Further, recent topics wraps long topic names on
overflow, which looks ugly when using use the unread count's space.

So we switch to having the unread count element consume space even
when there is no count, using `visiblity:hidden`.

Fixes a part of #19449
2022-06-02 12:49:02 -07:00
Aman Agrawal 422b096b9a language_selection_modal: Add more padding between languages. 2022-06-01 17:08:00 -07:00
Aman Agrawal 66b80c8ae8 admin: Use language_selection_widget to set notification language.
Fixes #21948
2022-06-01 17:08:00 -07:00
Aman Agrawal 59e676b1f5 gear_menu: Allow spectators to select their default language.
Set the default_language as cookie and reload the page so that
the spectator can immediately see the language change in effect.

We can reload the page forcefully for spectators since there is
no chance of any work being lost. It is possible that the spectator
may lose the selected message on doing so.

This requires a new dependency, to be able to set cookies from
frontend JavaScript.

Fixes #21961
2022-06-01 17:08:00 -07:00
Aman Agrawal 2c177f3c53 settings_display: Extract function to launch language selection modal.
It will be used to launch it for spectators using the same shared
code.
2022-06-01 17:08:00 -07:00
Anders Kaseorg f2d0ae3255 stream_create: Fix crash on stream creation error.
Commit a9ca5f603b (#15863) incorrectly
translated this; stream_name_error is not a jQuery object.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-31 22:54:57 -07:00
Anders Kaseorg ddcd69cb41 gear_menu: Link to /devlogin/ in development environment.
It’d be nicer to use hash_util.build_login_link which also remembers
the current hash, but that doesn’t help when the gear menu is only
rendered once at page load time.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-31 22:54:11 -07:00
Lani 5a9cba1bba emoji_picker: Allow filtering emojis by unicode characters in emoji picker.
This PR implements literal emoji match in the emoji picker (for reactions)
and in emoji typeaheads (in compose box)

Tested on mobile browser by opening the emoji picker with the
reaction button, selecting an emoji via the native keyboard, and
ensuring the selected emoji appears in the emoji picker’s search
result.

Fixes #21714.
2022-05-31 10:02:57 -07:00
Lani 986dbc44b7 composebox_typeahead: Make reaction_type available in composebox emojis.
In order to make it possible to search emojis with emoji literals,
we need to make the reaction_type of every emoji available in the
emoji objects used by the composebox.
2022-05-31 10:02:57 -07:00
Lauryn Menard bb45c04136 frontend: Update when communities directory checkbox is disabled.
Changes the admin UI for the communities directory checkbox to use
the `realm_push_notifications_enabled` page param instead of the
`server_web_public_streams_enabled` page param.

Updates help center documentation about the communities directory
to have clearer information about how the setting works for
self-hosted communitites.
2022-05-27 17:08:15 -07:00
Sahil Batra c382f8c9a6 stream_edit: Capitalize "ID" when showing invalid stream ID errors.
This commit changes the error message, shown while trying to deactivate
a non existent stream from stream settings UI, from "Invalid stream id"
to "Invalid stream ID".
2022-05-27 17:06:03 -07:00
Aman Agrawal e6e975b470 recent_topics: Don't restore filters for spectators.
This fixes the bug where spectators can have filters selected
in recent topics if a logged in user has selected filters in the
same browser.

Log in, select a filter and log out to reproduce this.
2022-05-27 14:40:11 -07:00
Sahil Batra f38ab85f02 user_groups: Pass user group object instead of id to get_recursive_subgroups.
We directly pass the user group object to get_recursive_subgroups as we
already have the object in the caller. We can add separate function which
will accept id as parameter in the future if required.
2022-05-17 14:51:55 -07:00
Sahil Batra dfd7902c77 user_groups: Rename subgroups fields to direct_subgroup_ids.
This commit renames subgroups and subgroup_ids field sent in user
group objects to direct_subgroup_ids for better readability.
2022-05-17 14:51:45 -07:00
somesh202 6ef8cdb380 org_settings: Add main feature to change bot role.
This commit attempts to refactor the `handle_bot_form` by adding new
field for `Role` in the `Manage bot` modal.

It uses the `/json/users/` url for passing the role of a bot and allow
changing it as in case of a normal user.

Fixes: #21105
2022-05-10 14:09:57 -07:00
somesh202 0b92e4c22f org_settings: Fix formatting and field ordering for bot modal.
This commit fixes the formatting of the "Manage bot" modal and re-orders
the field labels as per the bot-list table.
2022-05-10 14:09:57 -07:00
somesh202 b1cafb1280 org_settings: Add "Role" column in bot-list table.
This commit adds a new "Role" column for the bot-list table in the
org-settings, and removes the user_id column from the same.
The role of a bot is fetched using the `get_user_type` function inside
bot_info().
This also adds the `sort_role` in the sort_fields which sorts the role
column in the bot-list table.
2022-05-10 14:09:57 -07:00
yogesh sirsat 496273ddbc popovers: New function for hiding all user info popovers.
New function `hide_all_user_info_popovers` closes all user info
popovers, instead of calling multiple functions everytime to close
user info popover now we can just call this new function.

This commit is a follow-up of #21460.
2022-05-05 17:43:28 -07:00
anurastogiji 7a24da70a1 search: Fix x icon overlap in search and filter inputs.
We add `padding-right` to input field so that input do not overlap with
`x`and add `text-overflow: ellipsis` to make overflow less jarring.

Fixes #19765
2022-05-05 17:12:23 -07:00
Tim Abbott 24f527cb59 home: Don't send /register response for spectators.
In very large communities, computing page_params can be quite
expensive. Because we've moved the homepage for communities with web
public streams enabled to be the Zulip app, and it's common for
automation to frequently poll the homepage of a Zulip organization,
we'd like to keep those homepages cheap (as the login pages are).

We address this by prototyping something we may end up wanting to do
anyway -- having the web application do a `POST /register` API call in
order to fetch most page_params, and merging those with the mostly
webapp configuration page_params that we leave in the / response for
convenience.

This exact implementation is messy in a few ways:

* We rely on the assumption that ui_init.initialize_everything happens
  before all code that needs to inspect the page_params properties we
  are fetching via /register. This is likely mostly true, but nothing
  in the implementation enforces it.
* The bundle of ~25 keys that are in page_params ideally would be
  considered individually, with some moved to the /register API
  response and perhaps others eliminated or namespaced inside a
  webapp_settings object.
* It's weird to have the spectators network sequence different that
  from logged-in users, and potentially a maintainability risk.
* We might be able to arrange that the initial `/` response be
  cacheable, now that we're no longer embedding our metadata inside
  it. We've made no effort to do that as of yet.

Despite those issues, this commit solves an immediate problem and will
give us helpful experience with a model closer to the one we'll want
in order to happily support a web client that can be run locally
against a production Zulip server's data.

Co-authored-by: Anders Kaseorg <anders@zulip.com>
2022-05-05 15:20:46 -07:00
Anders Kaseorg 44fcb6009b ui_init: Move loaded indicator to initialize_everything.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2022-05-05 15:20:46 -07:00
Tim Abbott d180f7ccfc right sidebar: Clean up rendered description logic.
Previously, we were masking the realm_description raw Markdown with
rendered Markdown, which was a type error.

When we switch to calling /register explicitly in a few commits, this
results in a bug, since the raw Markdown ends up taking priority.

Fix this by just using a different name for this different concept.
2022-05-05 15:17:07 -07:00
yogesh sirsat 918c0b039b popovers: Hide "Send private message" if user not have PM permissions.
If an organization does not allow to send private messages, it will
not display the "Send private message" option in the profile popover.

Currently, there are only two options in settings, first is to allow
every type of user to send PMs and the second is to disable send PMs
for everyone, hence I am just checking that the second option is not
selected.

Fixes: #21888
2022-05-05 14:02:34 -07:00
Sahil Batra eebc776bf5 user_groups: Add is_user_in_group function.
This commit adds function to check whether a user
belongs to the user group or not.

Fixes part of #19525.
2022-05-05 13:51:57 -07:00
Sahil Batra 41880759cf user_groups: Add get_recursive_subgroups function in frontend.
This commit adds get_recursive_subgroups function to get all
subgroups of a user group.
2022-05-05 13:51:53 -07:00