Commit Graph

54338 Commits

Author SHA1 Message Date
Anders Kaseorg 9989365fe8 user_status: Use unknown, not object, for unvalidated type.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-30 13:30:31 -07:00
Karl Stolley 3f5764e5ba navbar: Correct for alpha background on unread dot's border.
This is a case where the use of alpha channels in HSL color values
shows its limits.

The use of an alpha channel is necessary for the background
elements for the top navbar elements, because they sit over the
top of the navbar's bottom border (actually an inset shaddow).

However, it's impossible to use the alpha-channel based color on
elements like the unread dot, where the border actually sits on
top of the element itself--meaning that the effect would be a
larger dot with an imperceptibly darker ring around it.

What this commit does is use a technique suggested by Anders
Kaseorg for using CSS's `color-mix()` functional notation to
calculate an opaque version of the alpha color for use on
elements that do not or cannot directly take the color with
the alpha channel.

See CZO discussion:
https://chat.zulip.org/#narrow/stream/6-frontend/topic/alphas.20in.20color.20definitions/near/1670102
2023-10-30 11:25:12 -07:00
Lalit Kumar Singh dcf45da09c ts: Migrate `user_status` module to TypeScript.
Also removed an defensive if check from `emoji.ts` since it is not
needed now that we have `emoji.ts` converted to TypeScript.
2023-10-30 11:10:47 -07:00
Chandan Yadav 951e31a154 user_status: Remove `status` field from `UserInfoDict` type. 2023-10-30 11:10:47 -07:00
Aman Agrawal e1960670ca hello: Make logos more visible in light theme. 2023-10-30 11:05:02 -07:00
Karl Stolley 825a7106c6 left_sidebar: Use DM identifiers around direct-messages list. 2023-10-30 10:14:28 -07:00
Karl Stolley dcd891a176 left_sidebar: Use dm-list class. 2023-10-30 10:14:28 -07:00
Karl Stolley 01ca3e119b left_sidebar: Use DM identifiers on DM containers. 2023-10-30 10:14:28 -07:00
Karl Stolley f496b40cd6 left_sidebar: Use DM identifiers on DM list items. 2023-10-30 10:14:28 -07:00
Karl Stolley 9062c75481 left_sidebar: Use DM identifiers on DM row box. 2023-10-30 10:14:28 -07:00
Karl Stolley a175c3829c left_sidebar: Clean up DM list structures and selectors.
This adds some temporary styles to preserve the DM row layout
as-is, but that will be removed as part of the grid implementation.
2023-10-30 10:14:28 -07:00
Lauryn Menard 37b70a8e24 corporate: Exclude non-realm Customer objects in downgrade small realms.
Updates query in downgrade_small_realms_behind_on_payments_as_needed
to exclude Customer objects with realm=None.
2023-10-30 10:09:17 -07:00
Lauryn Menard c996bb3c19 corporate: Move functions for realm installation data to new file.
Moves two functions in corporate/lib/stripe.py that are used to
get data for the main installation activity analytics page to a
separate file: corporate/lib/analytics.py.

Also, updates these functions for the possibility of realm being
None for a Customer object.
2023-10-30 10:08:45 -07:00
xoldyckk 8b3f8d77b0 zform validation: Migrate validation logic to zod.
Migrated zform validation logic to make use of zod schema.
2023-10-27 16:14:51 -07:00
Aman Agrawal 2d033c94d9 recent_view: Fix user unable to focus change_visibility_policy icon.
`recent_view_focusable` class should be set on element whose
children can receive focus as per

`$topic_row.find(".recent_view_focusable").eq(col).children().trigger("focus")`
2023-10-27 13:26:36 -07:00
Lalit 151d51acfa input_pill: Remove over defensive if checks for `create` function.
We should remove this overly defensive code and remove the `undefined`
type from the return type of this function to avoid handling unexpected
`undefined` values in the downstream code.
2023-10-27 13:11:37 -07:00
Lauryn Menard b19a7a8b8a analytics: Remove Durations tab and hourly columns. 2023-10-27 12:19:13 -07:00
Karl Stolley 01392a57dd left_sidebar: Resize scroll container when toggling condensed views. 2023-10-27 12:07:49 -07:00
evykassirer 0a33598f65 compose fade: Add test for want_normal_display. 2023-10-26 18:33:53 -07:00
evykassirer 6563e621fd buddy list: Simplify argument to get_data_from_keys. 2023-10-26 18:33:53 -07:00
Anders Kaseorg 14b7d097a0 compilemessages: Normalize language names to NFC.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 16:27:35 -07:00
Tim Abbott e560519dba portico: Fix new organization form focus scrolling.
Now that the "new organization" form is quite tall, we were seeing
this autofocus logic causing the browser to automatically scroll to
the middle of the form (to reach the first editable input), which felt
like a pretty bad user experience.
2023-10-26 16:27:35 -07:00
Tim Abbott a379fbe442 portico: Inline common.autofocus.
This was only called from a single code path.
2023-10-26 16:27:35 -07:00
Hemant Umre d27a50852e onboarding: Internationalize the introductory messages in streams.
We use `Realm.default_language` value, which is set by selecting
the 'Organization language', to internationalize the introductory
messages of the initial streams.

Fixes #25729.
2023-10-26 16:27:35 -07:00
Hemant Umre ac1f711fef registration: Set the organization language at creation time.
In this commit, we add a new dropdown 'Organization language' on
the `/new` and `/realm/register` pages. This dropdown allows setting
the language of the organization during its creation. This allows
messages from Welcome Bot and introductory messages in streams to be
internationalized.

Fixes a part of #25729.
2023-10-26 16:27:35 -07:00
Anders Kaseorg f8aac58a6a docs: Update Ruff badge and links.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 15:51:46 -07:00
Vector73 e442a9d11e user_profile: Sort arguments to "render_user_profile_modal". 2023-10-26 13:17:28 -07:00
Vector73 6dd7efae85 user_profile: Fix alignment and color of edit icon. 2023-10-26 13:17:28 -07:00
Vector73 4a4b8dff99 user_profile: Add deactivated user indicator in the profile header.
Fixes: #26861
2023-10-26 13:17:28 -07:00
Alya Abbott f8f741c4a2 analytics: Replace get_realm_day_counts with a faster query.
Use analytics_realmcount to improve query runtime. There are two
known difference with previous query:
- Messages that are deleted after hourly stats are aggregated
are not decremented in new query.
- Messages sent since the hourly aggregation last ran are not counted.
2023-10-26 12:54:56 -07:00
Sahil Batra c9fccf476a settings: Rename default_view and escape_navigates_to_default_view.
This commit renames default_view and escape_navigates_to_default_view
settings to web_home_view and web_escape_navigates_to_home_view in
database and API to match with our recent renaming of user facing
strings related to this.

We also rename the variables, functions, comments in code and class
names and IDs for elements related to this.
2023-10-26 11:00:12 -07:00
Tim Abbott 67dbaaff91 input_pill: Fix backspace with selected text.
The logic added in b57ebe717e introduced
a different bug, namely that if you had selected text in the input,
Backspace would delete the input pill itself, not your selected text.

Fix this, without re-introducing the old bug, by checking explicitly
if there's a range selected before inspecting anchorOffset.

Also improve the comments.

Fixes #19544.
2023-10-26 10:41:45 -07:00
Karl Stolley 61aa55df79 navbar: Clean up unecessary userlist-toggle cruft. 2023-10-26 10:28:02 -07:00
Karl Stolley a9421f6ba0 navbar: Use new purple icon color with left-sidebar toggle.
This also implements the same hover and focus-visible styles
as icons on the righthand side of the navbar.
2023-10-26 10:28:02 -07:00
Karl Stolley 1f0e9b4587 sidebars: Correct display at small mobile sizes.
This fixes a state where the expanded left sidebar appears under
the navbar at the smallest mobile views.

It also provides a stop-gap fix for the right sidebar's USERS
heading, making it align better (but certainly not perfectly)
with the left sidebar's.
2023-10-26 10:28:02 -07:00
Karl Stolley 105729ce66 navbar: Simplify unread logic on left-sidebar toggle indicator.
This removes former animation logic as well as counts, as the
redesign calls only for showing an unread dot in the presence
of unreads.

Fixes: #27357
2023-10-26 10:28:02 -07:00
Karl Stolley 8ee764382b navbar: Show left-sidebar-style unread dot on streams toggle. 2023-10-26 10:28:02 -07:00
Karl Stolley 4409663e69 navbar: Handle streams-toggle alignment with dimensions, flexbox. 2023-10-26 10:28:02 -07:00
Anders Kaseorg 37f0a3b41b eslint: Forbid unchecked casts in TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 09:54:30 -07:00
Anders Kaseorg 2f95c55df4 list_widget: Fix unsafe unchecked casts in generic comparators.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 09:54:30 -07:00
Anders Kaseorg a53231a1ae settings_muted_users: Fix sorting users by date muted.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 09:54:30 -07:00
evykassirer ba568adc2e recent_view_util: Rename is_rt_visible to is_view_visible.
This avoids the less readable abbreviation.
2023-10-25 17:35:00 -07:00
Sayam Samal aa8f8a2dcf help: Remove reference to the right sidebar keyboard icon.
- The keyboard icon in the right sidebar has been removed, this commit
  removes the reference to it in help/keyboard-shortcuts.
2023-10-25 16:43:49 -07:00
Sayam Samal bbf4792d81 right_sidebar: Drop keyboard shortcuts button from right sidebar.
Fixes: #27381.
2023-10-25 16:43:49 -07:00
David Rosa 179d53b898 help: Update "Schedule a message" to document collapsed view.
- Replaces special link for logged-in users with instructions so that
  users can learn how to access this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00
David Rosa 6f10ebc251 help: Update "Draft messages" to document collapsed view.
- Replaces special link for logged-in users with instructions so that
  users can learn how to access this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00
David Rosa a3ccb6b180 help: Update "View your starred messages" to document collapsed view.
- Replaces special link for logged-in users with instructions so that
  users can learn how to access this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00
David Rosa 14e40fc097 help: Update "View your mentions" to document collapsed view.
- Adds icons to instructions so that users can learn how to access
  this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00
David Rosa 0415e66969 help: Update "All message" to document collapsed view.
- Replaces special link for logged-in users with instructions so that
  users can learn how to access this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00
David Rosa 9531fb0f4e help: Update "Recent Conversations" to document collapsed view.
- Replaces special link for logged-in users with instructions so that
  users can learn how to access this view.

Fixes #27326.
2023-10-25 16:32:36 -07:00