Commit Graph

6585 Commits

Author SHA1 Message Date
Harsh a8f76f1b80 message_feed: Remove separate Subscribe/Unsubscribe buttons.
This removes Subscribe/Unsubscribe buttons in trailing bookends,
including the can_toggle_subscription plumbing supporting them.

Fixes #32125.
2024-11-14 16:25:21 -08:00
Sayam Samal 743d0dbaa2 bootstrap_portico: Rename btn-group -> bootstrap-btn-group.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 543a6c51dc bootstrap: Rename btn-* -> button-* classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 045efadab9 bootstrap-btn: Rename btn -> bootstrap-btn.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 5fc226c8ef bootstrap: Rename btn-default -> bootstrap-btn-default.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 39dd55e854 subscriptions: Rename btn -> button in CSS classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal b5dd1bf009 inbox: Rename btn -> button for CSS classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 45eefb1e53 stream_ui_updates: Rename btn -> button in CSS classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 0158768a91 settings: Rename btn -> button in #add-custom-profile-field-btn.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 650076b027 recent_view: Rename btn -> button in CSS classes.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 51e042e842 app_variables: Rename btn -> button in custom properties.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 467b36dc4a copy: Rename copy-btn -> copy-button.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal cf672ad939 modal: Rename modal__btn -> modal__button.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal ef929efa1f message_edit: Rename disable-btn class.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal c0caeab198 compose: Rename disable-btn class.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal a3b9e3c183 user_pill: Rename pill-container-btn -> pill-container-button.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 15cc27af6e settings: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 663fb36e35 alert_words_ui: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal e9e009bc9a user_profile: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal afa537e35c ui_report: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 1cc66fbad4 settings_profile_fields: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 4105fc4e77 settings_org: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 6e9ad8607e settings_linkifiers: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal bc1306f26b settings_exports: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal c79d0c4cfd settings_emoji: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal f529c992f5 settings_components: Rename btn -> button in JS variables.
This commit is a part of the efforts to rename btn-related classes
and variables to align with Zulip's no-abbreviations policy and
streamline the search results.
2024-11-14 12:03:36 -08:00
Sayam Samal 6664672dc8 settings_playgrounds: Rename btn -> button in JS variables. 2024-11-14 12:03:36 -08:00
evykassirer 76d3bf2532 stream_list: Use delegate instead of default for tippy. 2024-11-14 10:09:41 -08:00
Sahil Batra dccf39a245 settings: Fix checking max values for message move limit settings.
The setting value for message move limit seconds was not being
converted to seconds before checking if the value was allowed or
not and that resulted in requests being made for values greater
than the allowed values.
2024-11-14 10:08:00 -08:00
Anders Kaseorg 06a9600aa7 bundles: Remove unnecessary bootstrap_typeahead import.
Commit db24df488c (#29286) made this a
normal function rather than a jQuery plugin, so it doesn’t need to be
imported for side effects.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 17:08:37 -08:00
Anders Kaseorg e82b7641c6 giphy: Convert module to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 11:56:57 -08:00
opmkumar c4ad9d8e09 tooltip: Remove "last active" time from deactivated user tooltip.
Removes "last active" time from deactivated user tooltip and instead adds
"This user has been deactivated." Also, in the deactivated bot tooltip,
"This bot has been deactivated." has been added.

Fixes #32136.
2024-11-13 10:39:09 -08:00
Anders Kaseorg e3118d8fc9 Revert "settings_account: Move async call into ui_init."
This reverts commit 8eb0ca3a7c (#32068).

We fixed the TypeScript configuration in #32327.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 10:15:29 -08:00
Anders Kaseorg 01540b45b0 web: Set "type": "module" and convert various CJS files to ESM.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 905fc3b50e marked: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg daa9552548 zulip-icons: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 73f7818510 debug-require: Rename to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 687f1b1651 tests: Rename the Node tests to *.cjs.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 26c72bf7ec test-js-with-puppeteer: Run with node --experimental-strip-types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg 45de69465a webpack: Run with node --experimental-strip-types.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg e73f1a74f3 webpack: Remove resolve.extensions from config.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Anders Kaseorg ec3177c834 web: Add explicit extensions to imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-13 09:18:56 -08:00
Shubham Padia a297ce7371 mention: Remove extra whitespace from mentions.
This was introduced in 5b70775ab6.
2024-11-13 09:13:38 -08:00
evykassirer 048387da05 stream_edit: Fix bug where personal settings weren't being saved. 2024-11-12 23:33:03 -08:00
Anders Kaseorg ffc99d2025 webpack: Remove unused hexoid alias.
koa-body was switched to @koa/bodyparser during development of #29198,
so this was never used.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-12 15:03:29 -08:00
Karl Stolley 3c9c6f0a3b settings: Improve layout of user-list style previews. 2024-11-12 14:40:45 -08:00
Karl Stolley eb89719221 settings: Simplify user-list preview styles. 2024-11-12 14:40:45 -08:00
Anders Kaseorg 3cf7513498 babel: Remove transform-optional-chaining workaround.
This was a workaround for a bug in babel-plugin-rewire-ts, which we’ve
now removed.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-12 12:31:55 -08:00
Sahil Batra 54595f80cc settings: Fix filtering users based on role.
This bug was introduced in 174a458928 as `this` parameter
passed to role_selected_handler was DropdownWidget instance
and not the Jquery element for the selected role option.
2024-11-12 09:49:36 -08:00
Lalit Singh 8eab7591a3 ts: Convert `portico/google_analytics.js` to TypeScript.
Created a custom type declaration file `ga-gtag.d.ts` for
`ga-gtag` npm module.

`@types/gtag.js` is installed as a devDependency so that the type
for `gtag` function can be provided.
2024-11-12 09:48:52 -08:00
Vishesh Singh 5b70775ab6 mention_pill: Show bot icon in bot mention pill.
Render a bot icon to the right of bot name, in case
it is a bot.
2024-11-12 09:34:07 -08:00
evykassirer 482f6c5449 stream_list: Add tooltip in left sidebar when clicking opens feed. 2024-11-11 16:41:30 -08:00
evykassirer 8a0063f641 stream_sidebar_row: Remove title for topic name. 2024-11-11 16:41:30 -08:00
evykassirer d8a4ca38ab stream_sidebar_row: Remove title for channel name. 2024-11-11 16:41:30 -08:00
evykassirer f29f1299aa stream_list: Use more specific classname for click handler.
This avoids this code being fragile with any future refactoring.
2024-11-11 16:41:30 -08:00
Aman Agrawal e734694229 message_header: Fix message content visible above sticky header.
This was due to `box-shadow` used to hide the content was incorrectly
overridden in `.sticky_header` from the `.message_header` just above.

The bug is highly reproducible since it happens due to minor pixel
differences when rendering.
2024-11-11 14:19:20 -08:00
Aman Agrawal 6fe3ceb0ee recent_view: Fix backfill data not updated after reload.
This fixes backfill data not being inserted in recent view if
recent view was open when it received the backfill data.

Fixed by inserted rows in the sorted order instead of inserting
them randomly which caused rows to not be inserted if there were
no rows around the row being inserted.
2024-11-11 12:07:23 -08:00
Aman Agrawal b85dcd0175 webpack: Remove unused landing_page dependency on event status page.
Event status page no longer uses any styles from this page.

Fixes #23629
2024-11-10 22:42:42 -08:00
Anders Kaseorg ff70ab441d dependencies: Remove three JS argument parsing libraries.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 16:00:29 -08:00
Anders Kaseorg da749d1c94 mdiff: Add missing exit for --help.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-10 16:00:29 -08:00
Anders Kaseorg efd7c06e30 lint: Recognize more JavaScript file extensions.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-09 23:09:46 -08:00
Anders Kaseorg b020d5e2e8 tests: Remove deprecated Sentry.addTracingExtensions() call.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-09 22:18:10 -08:00
evykassirer 424e5d6ad0 buddy_list: Add background color placeholder to loading avatar. 2024-11-08 15:44:14 -08:00
evykassirer cb6c60ef7a stream_create: Fix puppeteer test flake from modal reopening.
In 245357c868 we added a redirect
after stream creation, to go to the stream feed. This means
the stream settings modal was closed partway through the tests.
This caused a flake where when the modal was reopened it was
not always open by the time we fetched the stream name.

The main fix in this commit is changing the classname for
the stream in the modal to be more specific (`stream-name`
can also be found in the left sidebar in many places) and
waiting for it to be visible again before getting text from
it.

More discussion here:
https://chat.zulip.org/#narrow/channel/43-automated-testing/topic/stream.20create.20puppeteer.20failure/near/1976724

Co-authored-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 14:12:24 -08:00
Anders Kaseorg 2f2a207ae0 tests: Remove babel-plugin-rewire-ts.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg aab541bd4e namespace: Recognize immutable ES modules without checking __Rewire__.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg 8c60b66a95 tests: Use setters instead of __Rewire__.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg 52e59a9605 web: Add setters for rewired variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg a208870b59 tests: Fix override of immutable ES module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg df6bcf6d3d tests: Avoid override_rewire of overloaded function.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg ee52618e1b namespace: Require rewired variables to be exported.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg db2723036f tests: Export rewired variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg a37aab19ed tests: Avoid override_rewire of imports.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Anders Kaseorg c57f12a792 tests: Remove override_rewire of nonexistent variables.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-08 12:38:14 -08:00
Karl Stolley 4038832889 unread_count: Set class for legacy quiet counters. 2024-11-07 14:56:38 -08:00
Karl Stolley 0e3be942b9 unread_count: Introduce classes for different counts.
This includes more prominent quiet counts, with increased
font-weight and, in dark mode, a brighter text color.
2024-11-07 14:56:38 -08:00
bedo a632948482 left_sidebar: Fix keyboard accessibility.
Fixes #31823

When home view changes, CSS just puts the selected home view
at the top of the left_sidebar navigation list (expanded)
or to the left (collapsed), but the rendered <li> elements
stay in the same order in DOM, so regarldess of current home view,
keyboard navigation always follows the order in which the <li>
elements appear in DOM.

Changes:
- Reorder <li> navigation elements in DOM based on current home view.

- Remove tabindex=0 from <a> elements, because they are now ordered
correctly in DOM.

- Add (tabindex="0" role="button") to the <i> collapsable VIEWS, to be
keyboard accessibile.
2024-11-07 11:55:48 -08:00
Tim Abbott fce6f4ef66 topic_list: Harden topic clicks against propagation.
I saw some profiling traces where it appears multiple copies of this
click handler got processed when clicking on a topic in the left
sidebar.

I suspect that was a profiling artifact, but the intent is for
on_topic_click to fully process clicks on topics in the sidebar, and
we should write the code to say that.
2024-11-07 10:46:30 -08:00
evykassirer a1e31a44bd buddy_list: Tweak spacing of rows, line-height, and circle placement.
This commit adds more space between rows, increases the line height
so that the status message doesn't touch the status emoji, and makes
the status circle a little bigger.
2024-11-07 10:33:04 -08:00
evykassirer bd10923f13 settings_realm_user_settings_default: Convert module to typescript. 2024-11-06 17:55:55 -08:00
Anders Kaseorg cd701c8468 webpack: Disable CompressionPlugin for Puppeteer tests.
Zopfli is very slow and the development server does not use its output
anyway.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-06 16:47:30 -08:00
evykassirer 898af8a9af user_circles: Fix bug causing incorrect colors in typeahead.
c39ae45d95 was incorrect, and should
only have been applied to the circles in the buddy list avatars.
In other places in the app, the transparency was over other colors
of background.
2024-11-06 16:36:40 -08:00
evykassirer 45d9c04e8e buddy_list: Fix vertical spacing issue. 2024-11-06 16:36:40 -08:00
evykassirer 174a458928 settings_users: Convert module to typescript. 2024-11-05 17:50:17 -08:00
evykassirer 6aa08b9c50 settings_users: Remove unnecessary bot user undefined check.
Users are fetched from `people_by_user_id_dict`.

`bot_info` is only called from:

* `bots_create_table`, with ids from `get_bot_ids` which are
  from this `people_by_user_id_dict`.
* `update_bot_data`, which is called in two places that check
  `is_valid_bot_user` on the bot id first.

So we should always get a `bot_user` back, and we're already relying
on the bot users being defined in several methods of the
`bot_list_widget`.
2024-11-05 17:50:17 -08:00
evykassirer 0e3374dc1b settings_users: Don't use `text()` with undefined value.
`text(undefined)` is a noop, and also isn't validly typed.
2024-11-05 17:50:17 -08:00
evykassirer 7fbdefcfc0 settings_users: Initialize full section objects.
Typescript likes objects to be fully initialized up front,
instead of adding functions to them later.
2024-11-05 17:50:17 -08:00
evykassirer 7ca644b905 settings_users: Make separate variables for each section.
This will help with the conversion to typescript.
2024-11-05 17:50:17 -08:00
evykassirer 85f8665851 util: Move compare_a_b from user_sort and generalize it. 2024-11-05 17:50:17 -08:00
evykassirer 01b1a51a86 stream_edit: Convert module to typescript. 2024-11-05 17:41:31 -08:00
evykassirer 16e3894bfa stream_edit: Remove use of e.trigger for copy link button.
This will help with the typescript conversion for this file.
2024-11-05 17:41:31 -08:00
evykassirer de8caa1b43 stream_edit: Use `this` instead of `e.target`.
These were all manually checked to still work.
`e.currentTarget` is equivalent to `this`, and
all instance of `e.target` were either the same
as `this` or used with a `closest` function that
still got the same value.
2024-11-05 17:41:31 -08:00
evykassirer 287c7e8f05 stream_edit: Pass string instead of function as html_body.
It seems like this was working fine, thanks to some internal
workings of Handlebars, but when we convert this file to
typescript, it will want a string for `html_body`.
2024-11-05 17:41:31 -08:00
evykassirer 686372e8a2 stream_edit: Parse notification labels instead of checking substrings. 2024-11-05 17:41:31 -08:00
evykassirer e739e9ae29 stream_edit: Don't set undefined text for email address.
`sub.email_address` can be `undefined`, `$foo.text(undefined)` has
no effect (it doesn't clear the text), and `text()` doesn't formally
accept `undefined`, so here we only call `text()` if the new value
isn't undefined.
2024-11-05 17:41:31 -08:00
evykassirer 924ebee421 stream_edit: Remove unecessary checks for invalid stream id.
None of these have showed up in Sentry in the last 90 days, and
it will be easier to type this file if we can assume we always
get a valid stream id and a valid sub for that stream id.
2024-11-05 17:41:31 -08:00
evykassirer 527d4672f8 settings_components: Fix types in save_discard_stream_settings_widget_status_handler.
This had been getting undefined `sub` already, in the modal to create
a new channel, but managed to not cause errors because
`properties_elements` was empty and `button_state` didn't equal
`"unsaved"`, leaving areas that treated `sub` as defined not accessible.
This commit fixes the type and handles the `undefined` case more directly.
2024-11-05 17:41:31 -08:00
evykassirer e50a51a8e1 settings: Convert general_notifications_table_labels.stream to tuples.
This will help with the typescript conversion.
2024-11-05 17:41:31 -08:00
Anders Kaseorg 799e59bb8f dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-05 17:01:09 -08:00
Anders Kaseorg 6037230ea8 eslint: Fix @typescript-eslint/consistent-indexed-object-style.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-11-05 17:01:09 -08:00