Commit Graph

2669 Commits

Author SHA1 Message Date
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
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
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
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 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
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
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
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
Ganesh Pawar 59e810790f user_groups: Convert inline form to modal.
Fixes part of #21298.
2022-05-04 17:46:30 -07:00
Tim Abbott 537e9b1e74 settings: Improve wording for deactivate bot modal. 2022-05-04 17:34:22 -07:00
yogesh sirsat 7b4f7b4a85 settings_bots: Confirmation modal for "Deactivate" bot.
In settings, clicking on deactivate bot button will lead to open
confirmation modal, and displaying all status update notifications
inside this confirmation modal.

This commit is a follow-up of zulip#21490.
2022-05-04 17:30:40 -07:00
Raghav Luthra bbda7a5bb0 stream_settings: Replace non-standard tooltip for "Announce stream" hint.
The tooltip for the "Announce Stream" hint was not consistent with the
rest of the settings so it has now been replaced with the standard tippy
tooltip. The "?" icon has also been replaced by the "i" icon to match
the other settings.

Fixes: #21312.
2022-05-04 17:12:07 -07:00
Sahil Batra aab82d1f16 settings: Hide email address if not available in user-edit form. 2022-05-04 12:52:43 -07:00
Tim Abbott 25999b7056 lint: Ban Help Center relative links without leading /.
Such links would likely end up broken if we change our URL scheme to
no longer be based around URL fragments.
2022-05-04 11:18:27 -07:00
Lauryn Menard 44c9b788f9 settings: Add realm setting for Zulip communities directory.
Adds `want_advertise_in_communities_directory` to the realm model
to track organizations that give permission to be listed on such
a site / directory on zulip.com.

Adds a checkbox to the organization profile admin for
organizations to give permission to be advertised in the
Zulip communities directory.

Adds a help center article about the Zulip communities directory
and uses a shared intro documentation file to create sections in
the articles on creating an organization profile and moderating
open organizations.

Co-authored-by: Alya Abbott <alya@zulip.com>
2022-05-04 11:13:28 -07:00
Aman Agrawal ce62c11720 message_view_header: Add divider after stream name for spectator.
Since originally divider is a part of sub_count which is not
displayed for spectators, we need to add a new one for them.
2022-05-02 10:05:33 -07:00
Tim Abbott 88110e7188 spectators: Adjust the heading for the login-to-access UI.
The previous "Join the {realm_name} community" was awkward for
organizations that put "community" in their realm name, e.g. "Join the
Zulip development community community".
2022-04-30 13:10:05 -07:00
Tim Abbott 4538792517 message controls: Use login_to_access modal for reactions/stars.
Hiding these UI widgets causing layout issues -- specifically, the
position of the \vdots menu looks off with these elements missing.

Enabling this buttons (and opening the login_to_access modal on click)
provides a light advertisement for these features, seems to be the
standard practice for forum-like software, and will also be easier to
maintain.

This effectively reverts f26a76a9d8, in
addition to adding new logic.
2022-04-29 16:35:49 -07:00
Tim Abbott 75c64476b7 compose: Remove special button for spectators.
After playing with several options, it feels cleanest to just have the
closed-compose area look exactly how it would if you were logged in;
popping up the login_to_access modal when clicking those buttons feels
reasonable. The extra button felt buggy, and this customization helps
make the Zulip layout more consistent for spectators.

This effectively reverts 5ffc95f6bb.
2022-04-29 16:35:49 -07:00
Aman Agrawal 64ea9125f3 narrow_banner: Simplify empty narrow messages for spectators. 2022-04-29 16:35:49 -07:00
Aman Agrawal 43d789993f login_to_access: Change message displayed for empty narrows.
We change the generic message copy while we're at it.

Also, show login_to_access modal when a spectator tries to access
a stream that either does not exist is is not web-public.
2022-04-29 16:35:49 -07:00
Tanya Singh ac938ef2a1
user profile modal: Display user ID above role.
This makes it more convenient to interact with users via the API.

Fixes #21713.
2022-04-29 08:38:21 -07:00
Tim Abbott 627144b0c7 settings: Simplify setting organization default language.
The changes in the last few commits changed the semantics of the
organization default language to no longer be the primary source of
information for a user's language when creating a new account.

Here, we change the settings UI and /help/ documentation to reflect
this.
2022-04-28 15:03:26 -07:00
Dinesh 68572e6bc8 compose: Display current narrow in go to conversation tooltip. 2022-04-28 12:57:42 -07:00
Dinesh 43107e1424 compose_box: Add button to go the narrow message is being composed to.
This'll be shown only when in a different narrow from what
you're composing to.

Takes care of updating display of the button on moving from
one narrow to another and also on changing inputs. This is
what contributes to majority of js code in this commit.

We are not displaying this for private messages since we do not
have a consistent design for both stream and private compose areas.
See https://chat.zulip.org/#narrow/stream/101-design/topic/narrow.20to.20topic.2Fpms.20when.20composing/near/1318548

Thanks to Vlad Korobov for the icon and for proposing various
designs.
2022-04-28 12:57:42 -07:00
Aman Agrawal 86a6318d30 public access: Fix in-app links to public access option.
We also update these links to the new dedicated article on the topic,
and also remove the zulip.com/zulipchat.com hardcoding.

Fixes #21941.
2022-04-28 12:09:08 -07:00
Aman Agrawal 00fffd1681 help: Rename `web-public-streams` page to `public-access-option`. 2022-04-28 12:09:08 -07:00
Aman Agrawal 44efc8eb37 web_public_view: Redirect to current narrow after login.
Add current hash as `next` URL to all login buttons
a spectator can access while in app.
2022-04-28 10:47:49 -07:00
Lauryn Menard 1292338537 frontend: Add `org_type` to realm settings updates and events.
Adds a drop-down menu for updating the organization type in the
`organization_profile_admin` page. Implements front end for
this setting to work / update like other organization profile,
notification and permissions settings.

One special note about this dropdown is that the listed options
should change once an organization has successfully set a type
other than 'unspecified' in the database. To accomplish this
the initial settings overlay build checks the realm_org_type
value in the page_params to select the correct options list,
and when the dropdown value is reset, either for update events
or for discarding changes, the page_params value is again used
to check for whether the 'unspecified' value should be present
as an option in the dropdown menu.

Adds basic node test for the `server_events_dispatch`.
Also adds a new help center documentation article for this
organization setting that is linked to in the UI.

Fixes #21692.
2022-04-26 16:29:12 -07:00
Adam Sah 299995bd3a compose: Fix close icon in top right area.
There are two tangled issues addressed here:
* We were weirdly using a scaled up copy of fa-angle-up, rather than
  fa-chevron-up, for a chevron up, for the expand/collapse widget.
* We were previously using &times; for the close icon, which had
  visual and scaling issues next to the fa-angle icon.

Fixes #20403.
2022-04-25 18:26:37 -07:00
sayamsamal dc573cbf50 settings: Fix simplebar overflow in settings sidebar.
The commit fixes the issue in which the settings sidebar would
overflow into the settings header when scrolled; it also adds
border-box model to minimize calculations and magic numbers.
2022-04-25 18:03:02 -07:00
sayamsamal 9488022d86 message_feed_ui: Remove "Unmute topic" from message action menu.
See the previous commit for background.
2022-04-25 17:35:02 -07:00
sayamsamal 86607ba318 message_feed_ui: Remove "Mute topic" from message action menu.
This change is motivated by a few considerations:

* The message actions menu has grown quite a bit and is at risk of
  feeling cluttered, especially with the upcoming Read Receipts feature.
* Conceptually, this menu is for interactions with the message, not
  its topic. There are other convenient ways to do this, in the topic
  recipient bar and left sidebar; hopefully removing this isn't much of
  an inconvenience. (If we add something back, we'd probably want a
  full "Topic actions" popover, not just this single item)
* Combined with the next commit, this removes the last copy of the
  topic name in this popover, which is helpful to its shape/layout,
  since topic names have much more variable length than the labels
  present here.

Fixes #21432
2022-04-25 17:29:36 -07:00
Aman Agrawal d0a697fba7 recent_topics: Disable filter buttons for spectator.
Instead of setting `disable` attribute to the elements, we make
them look like disabled and remove interactions with them. This
helps us keep the hotkey handling logic for navigation easier
to manage.

Fixes #21279
2022-04-22 15:33:26 -07:00
yogesh sirsat c2148dc4d9 settings_bots: Clarify title of "Edit bot" button.
A bot is technically a special case of a user, in terms of how they're
stored in the database at least, but for end users, we avoid referring
to them that way.
2022-04-21 08:21:14 -07:00
Sahil Batra 77fd03e426 invite: Add custom option for invite expiration time in frontend. 2022-04-20 13:31:37 -07:00
Raghav Luthra 22a5d008c1 user_settings: Add a setting to display names of users who reacted.
Added a setting to the bottom of Settings > Display settings > Theme section
to display the reacting users on a message when numnber of reactions are
small.

This is a preparatory commit for #20980.
2022-04-19 17:30:16 -07:00
Archisman Das 491b1513eb settings: Fix length of custom profile field URL input.
The backend validates that URL inputs are RFC valid URLs (with no
specific length limit), but the frontend appears to have a maximum
length of 50 specified, likely because of a copy-paste error.

Increase the HTML maxlength for this input to 2048, which is a length
supported for URLs by all major browsers.

Fixes #21633
2022-04-04 12:10:05 -07:00
Sahil Batra c3efd6b6a4 i18n: Translate the whole text in stream deactivation modal.
This commit fixes the template of stream deactivation modal
to tag all the text for translation. This commit also removes
the unnecessary span element.
2022-04-04 11:57:19 -07:00
NerdyLucifer c79849dab6 settings: Replace "Delete bot" with "Deactivate bot".
The feature deactivates the bot user; Zulip has no "delete bot"
feature. So fix the label to match what it does.

We also change the icon to match the one we use for deactivating users
in the "Manage users" UI.
2022-04-01 15:03:23 -07:00
Palash 4d44698805 stream_settings: Remove pencil icon from 'General' tab in stream settings.
For user who is not an administrator.
Also implemented a banner that notifies the user if they can edit
the following settings (name/description and stream permission).
Also increased padding-top of stream header by 10px. This change is done
to increase vertical spacing between the banner
and the stream header.

Fixes #20001.
2022-04-01 14:52:06 -07:00
Heidi Ahlberg 9e6836d0af i18n: Fix missing translation tags in stream creation view. 2022-03-31 10:33:34 -07:00
Sahil Batra ca38b33346 settings: Fix push notifications tooltip being incorrectly shown.
We were showing the push notifications tooltip in user default
settings section even if the push notifications were configured
on the server.

The bug was because the setting value was undefined in the template
used for user default settings section, so this commit fixes the bug
by correctly passing the setting value to relevant template file.

Fixes #21602.
2022-03-30 11:31:29 -07:00
Alya Abbott f04fb51ecc help: Rewrite pages on inviting users and related permissions.
Fixes #21520.

Co-authored-by: Lauryn Menard <lauryn@zulip.com>
2022-03-28 17:00:10 -07:00
yogesh sirsat 078d966c64 modals: Refactor help_link_widget for confirmation modal.
Added class "help_link_widget" and applied existing css,
to `a` tag of help_link_widget.

Follow-up of #21508.
2022-03-25 10:43:37 -07:00
Aman Agrawal d006b6cc3d message_list_view: For spectators, show login button for failed images.
We render a login button for images that failed to load for
spectators. The image failed to load most likely due to being
rate limited by the server.

Fixes #19840
2022-03-24 10:50:00 -07:00