Commit Graph

8490 Commits

Author SHA1 Message Date
Aman Agrawal
47e70ef6b5 slack_import: Show ellipsis for overflowing select option. 2025-05-28 17:19:51 -07:00
Aman Agrawal
33c4185eae slack_import: Use custom string invalid file type error. 2025-05-28 17:19:50 -07:00
Aman Agrawal
6de3ed350b signup: Show error message on upload failure due to restrictions.
Error message due to uppy restrictions were not visible to the user.
2025-05-28 17:18:08 -07:00
Aman Agrawal
4823477a70 slack_import: Allow replacing uploaded data export files.
Uppy doesn't allow uploading another file and replacing the exisiting
one in the same session due to `maxNumberOfFiles: 1` set by us.
We don't want to remove this restriction, so only way to allow
replacing files easily is to just resert the current uppy session
after the last upload finishes.

Our backend deletes any existing upload by default. So, this works
as expected on all fronts.
2025-05-28 17:18:07 -07:00
Aman Agrawal
9502d8f9bf signup: Remove obsolete option.
Since v2, this removeFingerprintOnSuccess is obsolete.
See this migration guide here:
https://uppy.io/docs/guides/migration-guides/#removed-resume-and-removefingerprintonsuccess-options-from-uppytus
2025-05-28 17:18:07 -07:00
Alex Vandiver
c2e0a27d2c upload: Fix uploading the same file twice in the same session.
This commit fixes a bug where uploading the same file a second time
in the same browser session would appear to the user to stall with
`Uploading [filename]...` in the composebox.  This is because
`tus-js-client` makes a HEAD request to check for already-uploaded
files -- and, if found, that request is used in the `upload-success`
callback.  That left the callback with no response body to parse, to
know what URL to insert.

Store the `/user_uploads/...` URL in the file metadata after a
successful upload, and if the fingerprint matches a previous upload,
pull that URL (and filename, as it may have changed server-side) out
of the previous upload's metadata.

Co-authored-by: Shubham Padia <shubham@zulip.com>
2025-05-28 09:23:51 -07:00
Alex Vandiver
098228a210 upload: Handle non-200 responses more gracefully. 2025-05-28 09:23:51 -07:00
Shubham Padia
009eeb22ad upload: Pass filename to get_translated_status instead of file.
We only need the name to get the translated status, there's not much
point passing the complete file object as an argument. This will help us
in making future changes where the file name may not be coming either
from the file object or file.name.
2025-05-28 09:23:51 -07:00
Karl Stolley
1406fbf370 docs: Update comment, docs links to Format.JS. 2025-05-28 09:10:15 -07:00
Shubham Padia
26595799c7 icons: Let the system using the icons specify the stroke property.
Fixes #34716.
The stroke property is ignored when we generate webfonts in our main
app. See
https://zulip.readthedocs.io/en/latest/subsystems/icons.html#cleaning-up-the-svg-code
for more details.
2025-05-27 10:00:21 -07:00
Shubham Padia
840817d2df icons: Let the system using the icons specify the fill-rule color.
The fill-rule color is ignored when we generate webfonts in our main
app. See
https://zulip.readthedocs.io/en/latest/subsystems/icons.html#cleaning-up-the-svg-code
for more details.
2025-05-27 10:00:21 -07:00
Anders Kaseorg
7eec8fe3a2 popover_menus: Allow focusing an item when none is focused.
Commit 71fbc93c03 (#34685) incorrectly
removed this behavior.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-26 22:47:41 -07:00
Anders Kaseorg
ac29ae21da postcss: Work around postcss-extend-rule incompatibility with :is().
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-23 22:25:38 -07:00
Anders Kaseorg
d33d52f3af types: Upstream winchan types to DefinitelyTyped.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-23 18:46:34 -07:00
Shubham Padia
259ef423ad icons: Let the system using the icons specify the fill color.
The fill color is ignored when we generate webfonts in our main app.
For our help center beta project using Astro, we would have needed to
come up with a way to change fill colors for all the icons. Since, there
was no reason for us to keep the fill colors in the SVGs, we decided to
remove it instead and add a lint rule to keep that in check.
See
https://chat.zulip.org/#narrow/channel/6-frontend/topic/fill.20in.20our.20current.20svg.20icons
for more details.
2025-05-22 16:00:21 -07:00
Karl Stolley
aecba99132 settings: Rename banner function to reference desktop. 2025-05-22 11:03:54 -07:00
Karl Stolley
a420dfd6cc settings: Don't update desktop notification banner in mobile.
Fixes #34668
2025-05-22 11:03:54 -07:00
Anders Kaseorg
c356595ed5 upload: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
4814898ccf user_group_popover: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
2c19cac621 user_card_popover: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
90c5bcad9a settings_panel_menu: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
71fbc93c03 popover_menus: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Anders Kaseorg
42b05fdd5f navbar_menus: Avoid jQuery sizzle extension :visible.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-05-22 10:40:15 -07:00
Lauryn Menard
8830373c9e demo-orgs: Disable allowing users to join until owner email set.
Until a demo organization creator sets an email address, we want to
restrict other users from joining the organization. Therefore, we
disable changing the "invite_required" setting for the organization
until they set their email address. Otherwise, the owner could
share the demo organization URL with someone and they could create
an account via the homepage.

Checks the demo organization owner delivery email address state
on the server-side.

Disables updating the organization setting in the web app UI.
2025-05-21 15:52:38 -07:00
Karl Stolley
eec8045b6b user_circles: Adjust offline circle for gray highlight. 2025-05-21 15:27:22 -07:00
Karl Stolley
70f32138df typeahead: Match active colors to dropdown items. 2025-05-21 15:27:22 -07:00
Karl Stolley
e406b7a013 user_circles: Bump offline contrast in typeahead highlight. 2025-05-21 15:27:22 -07:00
Karl Stolley
fd49c20b58 user_circles: Bump up offline-circle contrast. 2025-05-21 15:27:22 -07:00
Karl Stolley
6192341830 thumbnails: Use more muted background, high-contrast hover. 2025-05-21 15:23:24 -07:00
Karl Stolley
115411ca4a markdown: Present message embeds with logical props. 2025-05-21 15:19:08 -07:00
Karl Stolley
753fb56b31 markdown: Present blockquotes with logical props. 2025-05-21 15:19:08 -07:00
Karl Stolley
eedcb2cfe4 browserslist: Add support for logical props.
Co-authored-by: Anders Kaseorg <anders@zulip.com>
2025-05-21 15:19:08 -07:00
Kislay Verma
92467f232f buddy_data: Clean up unnecessary rewires in test.
Instead of rewiring `narrow_state` functions, we create appropriate
filters to organically use the code paths during tests.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Kislay Verma
5f86ac6e36 buddy_data: Fix error in test.
The test `get_conversation_participants` didn't need
rewiring in the first place.

The filter was not properly created - the field `channel_id`
was wrongly being used instead of `stream_id`.

Once the filter was fixed, the code automatically returned
 the expected stream_id and topic, without rewiring.

This eliminated the use of override_rewire in that test.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Kislay Verma
b3fd46050e typeahead_helper: Clean un unnecessary rewires in test.
Instead of rewiring `compose_state`, we use its functions
to organically obtain the stream name etc as desired.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Kislay Verma
059d72c908 pill_typeahead: Clean up unnecessary rewires in test.
This commit effectively shifts the mocking to a
lower level by mocking `typeahead_list_item.hbs`
instead of higher-level functions like `render_person`,
`render_user_group` and `render_stream`. This helps
eliminate the rewiring of those functions.

These functions are rigorously tested in
`typeahead_helper.test.cjs`.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Kislay Verma
7f6e0aced1 drafts: Clean up unnecessary rewires in test.
This commit removes unnecessary use of override_rewire
in drafts.test.cjs, and creates data instead of mocking
functions returning that data.

It helped eliminate `stream_data.rewire_get_color` and
`sub_store.rewire_get`.

Fixes part of #32326.
2025-05-20 17:03:00 -07:00
Prakhar Pratyush
bf325ff6b2 hotkey: Fix toggle compose preview (Alt+P) hotkey.
The hotkey for 'Toggle compose preview' was not working due to
a small logical bug introduced in 26f664be69.

We were calling `compose.show_preview_area()` when the compose
is already in preview mode, instead of `compose.clear_preview_area()`.

This commit fixes the bug.
2025-05-20 16:22:01 -07:00
Aman Agrawal
a9b51f80ba people: Defer loading user data during app load.
This should greatly reduce the symptoms of a bug where a stale
realm_users cache (missing a newly created user) results in the web
client missing the new user and throwing exceptions.
2025-05-20 13:55:48 -07:00
Aman Agrawal
f94b1d444e echo: Use ID instead of email to access user data.
This is required for just testing the changes and not
required for working of the app.
2025-05-20 13:55:48 -07:00
Evy Kassirer
e2b90176ee buddy_list: Clear search bar when the narrow changes. 2025-05-20 13:16:04 -07:00
Sahil Batra
ba1780c6b2 hash_util: Redirect '#groups/new' to '#groups/your' on limited plans.
This commit adds code to redirect '#groups/new' to '#groups/your'
if realm is on limited plan like we do when user does not have
permission to create groups.
2025-05-20 10:45:13 -07:00
Sahil Batra
bc61a5ed08 groups-ui: Live update UI to create groups.
This commit adds code to live update the UI when
can_create_user_groups setting changes.

The elements that are live updated are -
- Icon button at the top left panel
- Button shown in right panel when no group
is selected.
- Text shown in right panel mentioning whether
user has permission.

We do not live update the text shown when left
panel is empty as it is somewhat complex to
handle all conditions correctly for it.
2025-05-20 10:45:13 -07:00
Sahil Batra
737f5f4cd3 admin: Remove unused variable.
We now have new groups UI, so there is no way to pass
the can_create_user_groups variable to settings template.
2025-05-20 10:45:13 -07:00
Sahil Batra
72e2605b98 stream-settings: Fix duplicate IDs.
"stream-advanced-configurations" was being used as ID for
advanced configurations section in both stream edit and
creation UI, which is not correct as ID should be unique.

This commit fixes it by removing the ID and instead using
class in selectors. Also, there was some unused CSS, as
we do not have dropdown widget buttons in advanced
configurations section, written using the duplicate ID so
removed that as well.
2025-05-20 10:40:19 -07:00
Sahil Batra
a2d4913cc0 stream_ui_updates: Fix live-update of web-public option.
In update_web_public_stream_privacy_option_state, when showing
and hiding the web-public option, "hidden" prop was set while
hiding the option and ".show()" was called to show the option.

Now once the UI was live updated by calling "show" setting
hidden attribute again to hide did not work because
"display: block" CSS applied by calling "show" kept the
option visible. This commit updated code to show the option
by setting "hidden" attribute to "false".
2025-05-20 10:40:19 -07:00
Sahil Batra
bc89d96893 stream-settings: Fix duplicate IDs.
This commit fixes the use of "stream_permission_settings"
as ID for "Channel permissions" subsection in both
stream edit and creation UI, which was not correct since
ID should be unique.

To fix this ID was removed from the element and following
changes are done -
- $("#stream_settings") element is now used as a container
for live update functions for stream edit UI.
- "stream-permissions" class is used to access the element
instead of ID.
- Advanced configurations container also had "stream-permissions"
class before, and that was removed in this commit so that
"Channel permissions" container can be identified uniquely
and thus some CSS changes were needed.
- Also, fixed "update_stream_privacy_choices" function to
not use ":visible" in selectors.
2025-05-20 10:40:19 -07:00
Sahil Batra
0e3b036d71 groups-ui: Do not open group in right panel when leaving.
Previously, when leaving the group by clicking "checkmark"
icon in group row, group details were opened in right panel
as well due to event propagation.

We keep the behavior of opening the group in right panel
after joining the group by clicking on "+" icon in the
group row.

For narrow widths, left panel is kept open while joining
or leaving the group, same like we do for stream settings.
2025-05-20 10:37:59 -07:00
Sahil Batra
8e64e67e94 groups-ui: Fix exiting from creation UI for mobile widths.
When clicking on "Cancel" button in the footer in stream
creation UI, left panel should be shown for mobile widths.
Previously, it resulted in a buggy view showing both left
and right panels.

This change makes the behavior consistent with what we
have for streams UI.

There is no change in behavior for wider screens.
2025-05-20 10:37:59 -07:00
Sahil Batra
6d40c6629f group-settings: Fix hiding empty panel text.
The selector used to check whether there is any group
row visible was incorrect and thus the empty list
text was shown incorrectly.
2025-05-20 10:37:59 -07:00