Commit Graph

62347 Commits

Author SHA1 Message Date
Steve Howell
6a4102f9fa lint: Add cjs suffixes to JS checks. 2025-01-07 09:43:33 -08:00
Steve Howell
8583e64037 util node tests: Prevent Intl.ListFormat leaks.
These never happen in practice since util is near the
end of the alphabet, but if you had run the tests in
reverse order, you would have seen this leak.

This leak was introduced in the efb2a5a38d commit.
2025-01-07 09:43:33 -08:00
Steve Howell
b87d64cd8a node test runner: Prevent Handlebars quirks.
We re-require templates.ts before testing each
new test module during the node tests.

This makes it so that if we make mocks in two
different tests, where such mocks influence
how the Handlebars helpers work, then both
tests will have registered their own copies
of the Handlebars helpers.
2025-01-07 09:43:33 -08:00
Steve Howell
09716c624f settings_user_topics test: Use explicit override for sorting.
In general we want to mimimize the amount of setup at the top
of a test module and just let individual tests explicitly
mock what they need to mock.

The `override` helper has the advantage that it avoids dead
code.  For example, if the way we invoked the list widget
here no longer required sorting, the unit tests would complain
about the crufty override, whereas the previous code doesn't
really have that kind of future-proofing.
2025-01-07 09:32:52 -08:00
Steve Howell
9a7efc88f2 settings_profile_fields test: Add mocking helper.
We now only explicitly mock the list_widget in a single test,
and we don't need to stub out the sorting functions.
2025-01-07 09:32:52 -08:00
Steve Howell
43207d37af alert_words_ui test: Excercise the template. 2025-01-07 09:32:52 -08:00
Steve Howell
47b4b4a506 alert_words_ui test: Avoid bizarre idioms.
We now just do the following in the mocking:

    - capture which items are passed into the list
      widget

    - simulate the call to modifier_html to exercise
      the template rendering
2025-01-07 09:32:52 -08:00
Alya Abbott
fd802e74ce help and api docs: Modernize and expand introduction to integrations. 2025-01-07 09:30:56 -08:00
evykassirer
9a4c5bc1a0 recent: Use em for recent view filter widget width. 2025-01-07 09:29:17 -08:00
evykassirer
2c351d8a23 inbox/recent: Use em for dropdown menu. 2025-01-07 09:29:17 -08:00
evykassirer
a8d0d462fb inbox: Use em for filter and search boxes. 2025-01-07 09:29:17 -08:00
evykassirer
0df487c4f3 inbox: Remove unused button-inbox-filter selector.
Removed in f191efce1b
2025-01-07 09:29:17 -08:00
evykassirer
f0e06f08ec inbox: Remove extra width on inbox table.
This was causing the table to be 2px wider than the filter box,
at all font sizes.
2025-01-07 09:29:17 -08:00
evykassirer
3ce65a3e52 inbox: Use base font size for inbox view. 2025-01-07 09:29:17 -08:00
Shubham Padia
0b4fe15c8a mention: Mentions via subgroup should be highlighted.
This commit does not add highlighting to any pre-existing group mentions
for which a user was part of the mentioned group via a subgroup. This
only fixes it for mentions moving forward.
Fixes https://chat.zulip.org/#narrow/channel/9-issues/topic/group.20mention.20not.20highlighted/near/2008541
2025-01-06 16:53:21 -08:00
opmkumar
3b3ab05f67 cron: Add cron job logic to delete fully deactivated realms.
Fixes #32763.
2025-01-06 16:10:14 -08:00
Alex Vandiver
ac7bdc73bb upload: Use the returned JSON from the server for filename and URL. 2025-01-06 15:25:32 -08:00
Alex Vandiver
b61b9876fa dependencies: Update @uppy/core and @uppy/tus. 2025-01-06 15:25:32 -08:00
Alex Vandiver
3f00d3d493 upload: Use Uppy's "onBeforeFileAdded" to allow duplicate file uploads.
Using `uppy.removeFile` is incompatible with where the upload-success
callback is moved to in @uppy/tus 4.1.4.
2025-01-06 15:25:32 -08:00
Alex Vandiver
2d758951b4 upload: Immediately re-enable send after upload completes.
Do not make the user wait for the animation + 100ms to click "send."
2025-01-06 15:25:32 -08:00
Saubhagya Patel
2991ed03e0 user_profile: Hide error when receiving a successful response.
When editing a user or bot profile via the Manage User or Manage
Bot overlay, an error was not hidden after receiving a successful
response from the server. This commit ensures the error is hidden
upon a successful response.
2025-01-06 15:04:49 -08:00
evykassirer
c4542df0d7 compose: Set a min-height before showing preview area.
Changes in #32695 wrongly assumed the preview box can only
expand from the composebox, but for some situations like links
it can also have a preview block that is less high than the raw text.

Reported on CZO:
https://chat.zulip.org/#narrow/channel/9-issues/topic/Preview.20breaks.20when.20the.20compose.20box.20is.20expanded.20by.20itself.2E/near/2029447
2025-01-06 14:59:51 -08:00
evykassirer
d4a130d88d buddy_list: Use 0.75 opacity for the user counts.
Discussed here:
https://chat.zulip.org/#narrow/channel/101-design/topic/right.20sidebar.20heading.20dot/near/2013034
2025-01-06 12:30:46 -08:00
evykassirer
ae805763bc compose: Use an icon for the mac command hotkey hint. 2025-01-06 11:29:38 -08:00
Sahil Batra
2e5ad46c74 test_markdown: Fix test for checking system group mentions.
We checked whether the NamedUserGroup object was present
in mentions_user_group_ids, where we should check if the
group ID is present in the list.
2025-01-06 11:20:38 -08:00
Sahil Batra
c0808d8625 tests: Refactor tests for stream permission group settings.
This commit refactors code to test group permission settings
while creating stream and changing the setting for existing
streams efficiently and avoiding duplicate code for each
setting.
2025-01-06 11:20:38 -08:00
Sahil Batra
cf59071d42 settings: Rename setting_group_id and setting_group variables.
Since the variable value can also be an object if setting is
set to an anonymous group, it is better to rename the variable
in user_has_permission_for_group_setting from setting_group_id
to setting_value.

Similary in is_user_in_setting_group, setting_group variable is
renamed to setting_value since value passed is not a UserGroup
object.
2025-01-06 11:20:38 -08:00
Shubham Padia
213c9e6a7a css: Use em instead of base font size css variable for small buttons.
Clearing the pending TODO to use em instead of calc and the
`--base-font-size-px` variable.
2025-01-06 09:49:16 -08:00
Shubham Padia
01793b0de3 subscriptions: Set width for fa-pencil icon to align with others.
This icon is narrower in width, we have to explicitly set it's width
to 1em so that it vertically aligns with other buttons near it.
2025-01-06 09:48:28 -08:00
Shubham Padia
333b3904b5 user_group_settings: Use user-group-x icon for deactivate button. 2025-01-06 09:48:28 -08:00
Shubham Padia
c5291cfd2a user_group_settings: Remove unused attribute for deactivate button.
The button had a misleading name `delete_button`. Instead of renaming
the button, we've removed the attribute since it wasn't being used
anywhere.
2025-01-06 09:48:28 -08:00
Shubham Padia
8994da3e35 stream_settings: Remove unused name attribute for archive button.
The button had a misleading name `delete_button`. Instead of renaming
the button, we've removed the attribute since it wasn't being used
anywhere.
2025-01-06 09:48:28 -08:00
whilstsomebody
669a341b02 message_header: Add short delay on hover.
A small delay before showing up of the action buttons
is required so that there will be no flickering when
mouse just slides over the message headers.

Fixes part of #26852.
2025-01-04 20:55:05 -08:00
whilstsomebody
cc0893f4a4 message_ui: Prevent action buttons from hiding on recipient bar focus.
Added `opacity` CSS with `:focus-within` pseudo-class to
the recipient bar. This keeps the action button visibility
consistent with the action UIs - topic editing UI and notification
menu.

Fixes part of #26852.

Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
2025-01-04 20:55:05 -08:00
whilstsomebody
114597178c message_ui: Show non-sticky recipient bar action buttons on hover.
- Toggles the CSS rule `opacity: 0` on the recipient bar
  controls when the bar is hovered.
- If the recipient bar is sticky, then the controls are always visible.
- In case of conversation views, the recipient actions remain visible.

Fixes part of #26852.

Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
2025-01-04 20:55:05 -08:00
whilstsomebody
8c9900bf5e message_ui: Add class to message-list if conversation view.
When the current view is a conversation view, add the class
`is-conversation-view` to `div.focused-message-list`.
The check is done when `message_list_view` is rendered, which is
in the `render()` function.

Fixes part of #26852.

Co-authored by: ecxtacy <dc.dhruvchouhan@gmail.com>
2025-01-04 20:55:05 -08:00
Niloth P
b7763f71e5 webhooks/opsgenie: Refactor to reduce redundancy in payload extraction. 2025-01-04 19:10:04 -08:00
Niloth P
ff96efbef4 webhooks/appveyor: Refactor to reduce redundancy in payload extraction.
Also renamed local functions to simpler names.
2025-01-04 19:10:04 -08:00
Niloth P
0cc747f460 integration-docs: Update common Hubot template for new doc format.
Part of zulip#29592.
2025-01-04 17:50:24 -08:00
Niloth P
cc64fd61f9 integration-docs: Update Hubot for new doc format.
Part of zulip#29592.
2025-01-04 17:50:24 -08:00
Niloth P
01825f7301 integration-docs: Update Giphy for new doc format.
Part of zulip#29592.
2025-01-04 17:30:05 -08:00
apoorvapendse
892afcbe98 setup_docs: Add command to terminate WSL2 environment.
This commit adds an alternative way to shutdown the
zulip WSL2 environment.
2025-01-04 17:29:27 -08:00
evykassirer
ad16739a7f recent_view: Vertically align filter checkboxes with their labels. 2025-01-04 16:38:00 -08:00
evykassirer
dc2b38fae1 recent_view: Use em for padding width of checkboxes. 2025-01-04 16:38:00 -08:00
Steve Howell
3f0658803c event tests: Improve debugging output for events. 2025-01-04 08:53:44 -08:00
Harsh
f19730b899 settings: Update activate/deactivate/manage users and bot tooltips.
Tooltip changes:

In organization settings
- "Edit user" -> "Manage user"
- "Edit bot" -> "Manage bot"
-  "Deactivate" -> "Deactivate user"
- "Reactivate" -> "Reactivate user"

In profile modal
-  "Manage user" -> "Manage bot" (for bots)

fixes part of #32887.
2025-01-04 08:51:22 -08:00
evykassirer
01cb786715 compose: Don't calculate preview height preemptively.
This was preventing images form showing up properly, since
they're only a short line of text but tallin the preview.

CZO thread:
https://chat.zulip.org/#narrow/channel/9-issues/topic/compose.20preview.20image.20bugs
2025-01-03 17:12:59 -08:00
evykassirer
eb1ae28a2f resize: Remove height adjustment for padding that no longer exists.
There used to be 5px bottom padding, now removed as part of #31177.

Looking now, both the compose textarea and preview div have 5px of
margin and no bottom margin and no padding, so we don't need to
account for that in height calculations. This isn't causing bugs
on main, but once we change how preview height is adjusted, to
better support image previews, it would cause a bug where the
preview is 10px taller.

More discussion here:
https://chat.zulip.org/#narrow/channel/9-issues/topic/compose.20preview.20image.20bugs/near/2011708
2025-01-03 17:12:59 -08:00
dinesh-gaire
1cb0118b17 css: Fix focus outline cutoff issue in poll title editing.
Fixes #32829.
2025-01-03 15:23:15 -08:00
Niloth P
09f47d5a0a webhooks/github: Suppress "comment edited" events when body is same.
GitHub generates spurious edited events on hiding/unhiding a comment,
and on clicking "edit"/"update" without any changes, when the
comment "body" contains certain specific characters.

Instead of sending a notification message, we suppress those edge cases
by comparing the "body" content of the comment and changes in the event
payload.

Fixes #31042, #26136.
2025-01-03 15:18:39 -08:00