Commit Graph

2832 Commits

Author SHA1 Message Date
Aman Agrawal 311f72dd56 footer: Add social links with icons.
Fixes #27886

Removed old twitter link in the same column.
2023-11-29 10:37:16 -08:00
Sayam Samal 9191f1a7eb uploads: Extend drag and drop upload area to the navbar. 2023-11-29 10:35:18 -08:00
Sayam Samal def4cf7f93 uploads: Extend drag and drop upload area to blank areas after sidebars.
To extend the drag and drop upload area to blank areas after sidebars,
we now detect the drag/drop event on the entire ".app" division.

We also change replace `width` and `height` css properties with
`min-width` and `min-height` properties respectively, to make sure
that the ".app" div spans the entire width and height of the viewport.

Fixes: #27550.
2023-11-29 10:35:18 -08:00
Sayam Samal 929d34ccd7 modals: Move "About Zulip" modal from ".app" div to body.
The "About Zulip" modal should be appended to the body, like the other
modals and not inside the ".app" div.

This is a prep commit for #27550.
2023-11-29 10:35:18 -08:00
Anders Kaseorg 07bd1f28d1 time_zone_util: Avoid relying on timeZoneName: "longOffset".
Safari doesn’t support it yet.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-29 09:57:10 -08:00
evykassirer 32c730e530 emoji: Fallback to Google Modern for unsupported new Twitter emoji.
The Twitter emoji team was laid off in 2022, so new emoji aren't supported.
https://github.com/twitter/twemoji/issues/570#issuecomment-1303422143.
The "twitter" sprite sheet we’re using does have images in those locations,
but they’re fallback images that emoji-datasource fills in from the Apple
sprite sheet, which has unclear licensing implications.

To be able to support newer emoji, we fallback to Google Modern for any emoji
not covered by Twemoji.

CZO conversation:
https://chat.zulip.org/#narrow/stream/107-kandra/topic/emoji.20changes.20in.208.2E0/near/1689918
2023-11-28 23:46:49 -08:00
evykassirer b68cb5b049 navbar: Show shorter navbar for short screens not narrow screens.
Fixes #27366.
2023-11-28 18:11:56 -08:00
evykassirer e158877365 spectator sign in buttons: Use media queries instead of hide-xl. 2023-11-28 18:11:56 -08:00
N-Shar-ma 9d3a606bfb compose: Add banner to go to conversation when replying in search view.
When a user is replying to a message while in a search view, we now warn
them that the full conversation is not visible and urge them to go to
the conversation they are composing to, so they can see the complete
conversation. On narrowing to that conversation, the banner is removed.

Fixes: #25893.
2023-11-28 16:55:05 -08:00
Tim Abbott 6cdf3d638b timerender: Reuse Intl.DateTimeFormat objects.
This improves performance of code paths that process larger numbers of
date/time objects, such as the main message feed, dramatically

build_message_groups is about 4x faster following this change, with
timestamp rendering now a negligible portion of the overall work.
2023-11-28 16:54:00 -08:00
Anders Kaseorg 06c2b89525 timerender: Use an explicit time zone for all rendering.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Anders Kaseorg 33e335dbd1 time_zone_util: Add zoned date/time utility functions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-28 16:54:00 -08:00
Sayam Samal ff9c15ea83 gear_menu_popover: Fix extra space when no invite permission.
This commit fixes the extra space and additional border that was being
added to the gear menu popover when the user did not have permission to
invite users.
2023-11-28 16:50:39 -08:00
Tim Abbott 39fb1a0f70 message_fetch: Fix get_frontfill_anchor fallback.
This fixes a very rare exception seen in production, which the
previous assertion allowed us to understand was possible in a rare
race, now documented in comments.
2023-11-28 15:08:00 -08:00
Karl Stolley 319cfc7d7f left_sidebar: Establish better-centered DM row height.
Despite the existing comment in the CSS, the previous DM row was
22.5px tall. Adjusting the padding makes for 22px tall box, which
greatly improves the centering of the unread count within its
bounding box.
2023-11-28 15:04:38 -08:00
Prakhar Pratyush 451ddf4c84 typeahead: Show @-topic typeahead whenever it might be possible to use.
Earlier, when a topic had less than 15 participants,
the @-topic typeahead was not visible. It should be visible
irrespective of the 'realm_wildcard_mention_policy' setting
when the participant count is not greater than 15.

The participant count for a topic can't always be calculated
accurately in the client as some of the messages might still
be loading.

We show @-topic in the typeahead whenever it might be possible
to use it.

We will give an error later if you aren't allowed to use it.

Fixes #27852.
2023-11-28 09:24:18 -08:00
Prakhar Pratyush 590d43f475 mentions: Rename 'stream_wildcard_mention_allowed_in_large_stream'.
This prep commit renames:
* 'stream_wildcard_mention_allowed_in_large_stream' to
'wildcard_mention_policy_authorizes_user' because the function
checks if the sender is allowed to use wildcard mentions based
on the 'wildcard_mention_policy' setting, and we plan to use that
for topic wildcard mentions too.

* 'stream_wildcard_mention_large_stream_threshold' to
'wildcard_mention_threshold' because this value is going to be
used as a threshold value for the max number of subscribers and
participant count allowed for stream and topic wildcard mention
respectively.
2023-11-28 09:24:18 -08:00
Sahil Batra 78440033dc invite: Fix label for new user's role dropdown.
This commit updates label for new user's role dropdown to use
"Users" instead of "User(s)" because that caused some problems
in translating the text.

We should ideally be using the ICU plural syntax for such cases,
but since it is used as label, we cannot use the plural syntax
there. So we instead just change it to always have "Users"
plural like we do at some other places in that modal.
2023-11-27 22:18:04 -08:00
Aman Agrawal cc6ab527b4 upgrade: Match width of license count input with billing page input. 2023-11-27 14:17:18 -08:00
Aman Agrawal 0ef78c793e upgrade: Only show generic help error text for card errors. 2023-11-27 14:17:18 -08:00
Aman Agrawal 15d92225fd billing: Show success message after upgrade from free trial. 2023-11-27 14:17:18 -08:00
Alya Abbott 06fd0c9c4b billing: Edit text of free trial end confirmation banner. 2023-11-27 14:17:18 -08:00
Aman Agrawal b35a792623 billing: Allow free trial orgs to switch billing frequency.
Fixes #27855
2023-11-27 14:17:18 -08:00
Aman Agrawal 482b5d8871 upgrade: Minor text changes to free trial page.
Fixes #27684
2023-11-27 14:17:18 -08:00
Aman Agrawal fe1a40279c billing: Downgrade realm at the end of free trial.
Fixes #27875

Instead of immediately ending the free trial, we end the free trial
at the end of the cycle.
2023-11-27 14:17:18 -08:00
roanster007 6397df8b5b lightbox: Fix the panzoom access for non image.
Previously, when we load for the first time, the panzoom
control is binded by default to the image class.

This causes various problems like when a non image class
is opened first in lightbox, and some panzoom function
is performed on it, even though no panzoom object
is binded to them it would perform the function with
the object binded to image class, causing it to throw
errors when no image has been opened yet in the lightbox.

This is fixed by checking if the image class has an img tag
in it before performing any functions of the the panzoom
object.
2023-11-27 10:15:27 -08:00
Pratik Chanda d6a2bbc2ef keyboard_shortcut: Add feedback for N/P shortcut after no more message.
Earlier navigating to the next unread topic or DM with N / P and reaching
last unread topic or dm, nothing happened when shortcut was pressed again.

This commit changes the behaviour when shortcut reaches the last topic or
dm and pressed again. Now it notifies the user that there are no more
unread messages.

Fixes zulip#27862.
2023-11-27 09:45:58 -08:00
Vector73 72d46c71fb message_feed_ui: Fix focus when clicking on message feed buttons.
Fixes: #27820
2023-11-27 09:44:13 -08:00
Aman Agrawal 6c4af3478f left_sidebar: Always show `VIEWS` in expanded state for spectators.
This fixes no views selector visible to the spectator when the
user is not narrowed to one.
2023-11-27 09:41:52 -08:00
Aman Agrawal 603aa3db01 user_base_settings: Change web_home_view default to inbox view.
It would probably provide a better introduction to Zulip
than Recent conversations.
2023-11-27 09:41:52 -08:00
Aman Agrawal fce35fc53b recent_view: Show checkbox icon for unread filter.
I accidentally removed the filter_unread parameter passed to the
template.
2023-11-27 07:57:42 -08:00
Prakhar Pratyush 9c5cfe83ba desktop_notification: Fix bad rendering of math formulas.
Earlier, for the desktop notifications having latex math
like "$$1 \oplus 0 = 1$$, the notification had the math
included multiple times.

This commit fixes the incorrect behavior by replacing
the KaTeX with the raw LaTeX source.

Fixes #25289.
2023-11-26 23:30:24 -08:00
Aman Agrawal f526b7ba58 helpers: Remove non-relevant calls.
`zulip-limited-section` is not longer present and
we don't want `free-trial-alert-message` to hide on any form
submission on the page.
2023-11-26 20:24:25 -08:00
Riken Shah 5659cc1b97 refactor: Replace hotspot open overlay method to function.
Generally, hotspots popover are depended on
the `?` icon to click to activate.

As we have introduced non-intro hotspots, the (non
intro) hotspot popover will open immediately after a
specific event occurs, they won't wait for `?` to click to
activate.

This function helps non-intro hotspots popover to open
easily.
2023-11-24 07:49:24 -08:00
Riken Shah b74f6afeb1 hotspot: Add frontend changes for non-intro hotspots.
This commit also solves a bug where it displayed
multiple copies of the hotspots when
`ALWAYS_SEND_ALL_HOTSPOTS` is set to true.
2023-11-24 07:49:24 -08:00
Riken Shah 8d633cc368 hotspot: Add backend changes for non-intro hotspots.
This commit introduces non-intro hotspots.
They are a bit different than intro hotspots in the
following ways:

* All the non-intro hotspots are sent at once instead of
sending them one by one like intro hotspots.

* They only activate when a specific event occurs,
unlike intro hotspot where they activate after the
previous hotspot is read.
2023-11-24 07:49:24 -08:00
Prakhar Pratyush 0c159c5f47 mention: Fix mention highlighting in unsubscribed streams.
Rules followed:
1. Bold and highlighted background if the mention was processed
as a mention that includes you.
2. Bold personal mention (but not highlighted) if you were mentioned
but not subscribed at the time.
3. Otherwise not bold, no highlighting.

As we plan to keep the mention pill CSS the same if a user
was mentioned via that personal/wildcard/usergroup mention
irrespective of whether the user is subscribed or not, we use
usermessage flags to determine when to add 'user-mention-me' class.

Fixes #27654.
2023-11-24 07:10:20 -08:00
Prakhar Pratyush 49388d5d3d topic_mentions: Fix restriction rule for @-topic mentions.
Now, the topic wildcard mention follows the following
rules:
* If the topic has less than 15 participants , anyone
can use @ topic mentions.
* For more than 15, the org setting 'wildcard_mention_policy'
determines who can use @ topic mentions.

Earlier, topic wildcard mentions followed the same restriction
as stream wildcard mentions, which was incorrect.

Fixes part of #27700.
2023-11-23 12:52:25 -08:00
Prakhar Pratyush 31a731469d stream_mentions: Update compose banner text when @-stream restricted.
We simplify the banner message by replacing the
"stream wildcard mentions" text with `"@stream mentions`,
`"@-all mentions"`, or `"@-everyone mentions"` text.
2023-11-23 12:52:25 -08:00
Tim Abbott a2e6d6c7c4 compose_banner: Document recommended HTML banner code path. 2023-11-23 12:52:25 -08:00
Sahil Batra 189718dc64 settings: Add support to change user-access setting in development.
This commit updates the backend code to allow changing
can_access_all_users_group setting in development environment
and also adds a dropdown in webapp UI which is only shown in
development environment.
2023-11-23 10:40:42 -08:00
Sahil Batra c90d00faea settings: Rearrange settings in "Organization permissions" section.
This commit re-arranges the settings in "Organization permissions"
section -
- A new section "Guests" is added which now contains the guest
indicator setting checkbox.
- Moved "User identity" and "Guests" sections above "Other permissions"
section.
2023-11-23 10:40:42 -08:00
Aman Agrawal c55eaf2bec css: Set tippy-arrow color same as background in light theme. 2023-11-23 10:33:23 -08:00
Aman Agrawal 258c20564d css: Remove `.dropdown` styles.
We no longer have elements with `dropdown` class in the main app.
It is used in landing page though.
2023-11-23 10:33:23 -08:00
Aman Agrawal 95f5d8bdb8 billing: Note applied discount on upgrade and billing pages.
Fixes #27526
2023-11-23 10:32:39 -08:00
Aman Agrawal 003b29ba14 billing_page: Redirect orgs on paid plans with sponsorship pending.
Redirect sponsorship pending realms on a paid plan to billing page
with banner which reflects the current status of their request.
2023-11-23 10:32:39 -08:00
Aman Agrawal 9edee65ea0 css: Minor adjustments to sponsorship form.
* Align org sponsorship description with the input fields.
* Make submit button full width.
* Restrict title width to 600px like on other pages.
2023-11-23 10:32:39 -08:00
Aman Agrawal 5422dd3661 sponsorship: Improve sponsorship page for sponsored realms. 2023-11-23 10:32:39 -08:00
Aman Agrawal ff19dda71c dropdown_widget: Style cannot view stream similar to disabled state. 2023-11-23 09:09:58 -08:00
Aman Agrawal 2acf3cbfa4 dropdown_widget: Allow showing custom text if value is not in options.
If the current value is not in the calculated options,
`text_if_current_value_not_in_options` can be provided to
the widget to show custom text in that case.

Used by stream / user announcement settings if user doesn't
have access to information about the currently selected stream.
2023-11-23 09:09:58 -08:00