Commit Graph

3631 Commits

Author SHA1 Message Date
nimishmedatwal 3d30fcd10a onboarding: Improve placeholder message for dm with yourself.
Fixes #29078
2024-03-01 16:09:54 -08:00
evykassirer c60cc07605 drafts: Convert module to typescript. 2024-03-01 15:49:53 -08:00
evykassirer e26b4bbd3e drafts: Reimplement handlers for buggy drafts using zod. 2024-03-01 15:49:53 -08:00
evykassirer bd4da24086 drafts: Create formatted draft all at once.
Instead of partially creating it and then adding
more attributes, this commit creates the return
value (formatted draft) in a single assignment.
This is needed for typescript work, in an upcoming
commit.
2024-03-01 15:49:53 -08:00
evykassirer e8d5241c0d drafts: Return updatedAt timestamp in snapshot_message.
It was always being set after the fact, and it will
be easier to manage types for the conversion to
Typescript if we just set this when setting the
rest of the data for the draft message.
2024-03-01 15:49:53 -08:00
evykassirer 97c46a7375 stream_data: Allow undefined stream_id in get_color.
Sometimes get_color is called with undefined
stream ids. This change makes more clear
what was already happening, and allows
for smoother conversion of other files
to typescript, including an upcoming
conversion of the drafts module, which
can call `get_color` with a draft with
undefined stream_id.

This keeps the color logic contained in
the `get_color` function, which seems
cleaner than the alternative of exporting
DEFAULT_COLOR to be used wherever sream_id
might be undefined.
2024-03-01 15:49:53 -08:00
evykassirer 8784fd9944 drafts: Remove unused localstorage version.
It's been present since 1929cc5 and clearly is intended
to be part of a never-implemented format conversion
system. We can add a version if/when we actually need
such a feature.
2024-03-01 15:49:53 -08:00
evykassirer 34b6be668e util: Add test coverage for lower_same. 2024-03-01 15:49:53 -08:00
Tim Abbott 3c708edb2c team: Add more repositories and rename tabs.
Based on an audit of all repositories in the zulip organization.
2024-03-01 14:57:46 -08:00
Lauryn Menard 666041e480 remote-support: Show deactivated servers in search results.
The remote support view now returns results for deactivated remote
servers with those results sorted to the end and formatted to
visually stand out.

Forms to change sponsorship and discount fields on the customer
for the remote server or realm are not shown, but the data stored
on the customer object is shown, including any sponsorship request
information (if the customer had a sponsorship request pending when
it was deactivated).

Forms to schedule a plan are also not shown for deactivated servers
and their associated remote realms.

Forms and information for any current plan or scheduled plan, for
either the deactivated remote server or its associated remote
realms, are shown so that support staff can update those plans if
necessary.
2024-03-01 14:11:19 -08:00
Anders Kaseorg 13115c8180 Revert "copy_and_paste: Fix formatting of code pasted from VS Code."
This reverts commit 4a1423b34a.
2024-02-29 20:44:43 -05:00
Aman Agrawal c6d0a3c098 apps: Minor tweaks to apps page.
Co-authored-by: Alya Abbott <alya@zulip.com>
2024-02-29 16:18:12 -08:00
N-Shar-ma 4a1423b34a copy_and_paste: Fix formatting of code pasted from VS Code.
Since the html copied from VS Code is not structured as code but as
styled divs for each line, any code copied from it would be pasted
unformatted with blank lines between each line of code.

This has now been fixed, by detecting VS Code style code blocks by the
CSS property `white-space: pre` and pasting the text within as is, as
code.
2024-02-29 15:12:13 -08:00
N-Shar-ma c440b4575e copy_and_paste: Extract function `within_single_element` for reuse.
This is a prep commit for the next which will introduce a new function
that also calls `within_single_element`.
2024-02-29 15:12:13 -08:00
Lauryn Menard ad9f7a4549 corporate: Update directories for activity and support frontend files. 2024-02-29 15:11:48 -08:00
afeefuddin 34a8dc649f settings: Update the icon of preferences in personal settings.
Fixes: #29132
2024-02-29 15:10:32 -08:00
Anders Kaseorg 1118b2cc19 web: Convert uses of deprecated text-field-edit function aliases.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-29 13:24:27 -08:00
Anders Kaseorg 220c4cbdc2 base_page_params: Restore google_analytics_id.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-29 11:24:33 -08:00
Karl Stolley 7930209929
reactions: Increase prominence of own reactions.
To address feedback that own emoji reactions were not sufficiently distinct, we increase
the prominence of one's own emoji reactions by:

- Setting a pixel-and-a-half border around own reactions.
- Reducing the alpha on the inner drop shadow of other reactions.
- Increasing the contrast on own reactions borders (and decreasing 
  them, in dark mode, on other reactions).
- Space around the emoji is maintained as in the current design in the own reactions. 

Other reactions benefit from an additional half pixel of padding, top and bottom, 
which is necessary to keep the pills (and the hover reaction button) the same 
height as each other--regardless of whether there's an own reaction among them 
or not. Padding is reduced in line with the increased border on own reactions.
2024-02-28 13:04:11 -08:00
evykassirer 5d604a4429 buddy_list: Assert we always find something with find_li.
More context for this change here:
https://github.com/zulip/zulip/pull/29022#discussion_r1499949934
2024-02-28 08:51:33 -08:00
Tim Abbott a60ee9f7bc narrow: Clarify decisions for certain local variables.
This helps avoid having to think about the possibility of logic from
certain code paths leaking into others.
2024-02-27 19:43:31 -08:00
Aman Agrawal 8a6455551c narrow: Merge narrow activate and deactivate calls.
Fixes part of #23812.
2024-02-27 19:43:31 -08:00
Anders Kaseorg 664fdf1a92 channel: Use base_page_params.
Fixes errors on /devtools/integrations/ and /emails/.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-02-27 21:18:00 -05:00
Lauryn Menard a931d72af3 activity: Limit width of columns in activity charts.
Sets the max-width for table data cells in the activity and
installation charts.

If the content exceeds the limit, then the overflow is set to
hidden and the text-overflow is set to ellipsis, so there is
a visual indication that the text is not completely visible.
2024-02-27 11:24:54 -08:00
afeefuddin 28e4fe1820 onboarding_steps: Convert module to TypeScript. 2024-02-26 08:16:44 -08:00
Sayam Samal 069680a7d1 message_list_tooltips: Add "View bot card" tooltips for bots.
This change aids in differentiating between a normal user and a bot
account, furthur eliminating any confusion between them (a step forward,
considering how good LLM bots have become in impersonating a real user).

Fixes #25958.

Co-authored-by: 1010nishant <nishantjangid6377@gmail.com>
2024-02-25 16:33:34 -08:00
Sahil Batra 30aa0a19fe puppeteer: Disable flaky administrative UI test.
This might be similar to the failure reported in #28864.
2024-02-25 12:54:02 -08:00
Prakhar Pratyush fe1a20ebb3 settings: Add realm-level setting 'zulip_update_announcements_stream'.
This commit adds a realm-level setting named
'zulip_update_announcements_stream' that configures the
stream to which zulip updates should be posted.

Fixes part of #28604.
2024-02-25 09:33:00 -08:00
Tim Abbott e6109ba192 ui_init: Fix misconverted conditional.
f630272b4c incorrectly considered the
case that message_lists.current was itself undefined.
2024-02-24 14:47:17 -08:00
Alya Abbott f0cf4dad04 stream/group settings: Improve error strings.
- Use proper punctuation.
- Make errors friendlier.
2024-02-24 09:16:07 -08:00
Alya Abbott 72132502b9 tooltips: Rename LaTeX button to "Math (LaTeX)". 2024-02-24 08:33:45 -08:00
Aman Agrawal a44a4342b9 message_scroll: Don't process msg scroll events in non-message views. 2024-02-24 08:31:18 -08:00
Aman Agrawal 861acb9abd hotkey: Avoid checking message_lists.current for `narrow_private`.
Since `narrow_private` doesn't need a message for the hotkey to
work, there is no need to call do_narrow_actions which needs a
selected message id.
2024-02-24 08:31:18 -08:00
Aman Agrawal de0db7ad1a filter: Make excludes_muted_topics a method of the `Filter` class. 2024-02-24 08:31:18 -08:00
Aman Agrawal c20340a5a6 narrow_state: Use `message_lists.current` to return current filter.
It doesn't make sense for us to track a separate current filter when
it should just the be filter of current message list if there is one.

This will reduce possible confusion in the codebase where filter
returned by narrow_state is different from message_lists.current.
2024-02-24 08:31:18 -08:00
Aman Agrawal f630272b4c message_lists: Set `current` to be `undefined` for non message view. 2024-02-24 08:31:18 -08:00
Aman Agrawal 4ccf64b02b narrow: Use update_current_message_list instead of set_current.
It's important to remove the focused class and remote the
old message list from DOM which only happens in
update_current_message_list.
2024-02-24 08:31:18 -08:00
Alya Abbott 3aece96d19 banners: Remove the term "narrow" from comose notification banner. 2024-02-23 17:09:29 -08:00
Alya Abbott 34cbc5717b help: Reorganize keyboard shortcuts documentation.
Also remove the unnecessary term "narrow".
2024-02-23 17:09:29 -08:00
Sayam Samal a7e7176aae uploads: Improve abstraction of `upload.js` by removing object exports.
The `upload_objects_by_message_edit_row` map object was being exported
to handle the uploads during the editing of a message. To improve the
abstraction, we move the logic being used to access
`upload_objects_by_message_edit_row` and itself into `upload.js`.

Similarly, the `compose_upload_object` constant which was being exported
to handle the cancelling of compose uploads. This commit removes this
export and instead defines a new method `compose_upload_cancel` to
handle the same.
2024-02-23 16:46:40 -08:00
Sayam Samal 65be62e4cb uploads: Fix duplicate drag-and-drop uploads during message editing.
Every time a user edits a message, we call the `setup_upload` method
which creates a new Uppy instance and adds some event listeners to
enable the upload process. These event listeners were not being removed
during the cleanup process of message editing, which led to multiple
event listeners being attached to the edit message form. Due to this,
multiple duplicate files would get attached via these multiple event
listeners if a user opened the edit message form for the same message
multiple times.

This commit adds the `deactivate_upload` method to perform all the
necessary cleanups while closing the edit message form. Via this
method, we remove the event listeners attached and close the Uppy
instance which cancels all uploads, resets progress and removes all
files.
2024-02-23 16:46:40 -08:00
evykassirer 44b07094df stream_list: Convert module to typescript. 2024-02-23 16:18:48 -08:00
evykassirer fda1afaaa7 stream_list: Pass required parameter to build_stream_list.
Using `false` because `undefined` is falsey.
2024-02-23 16:18:48 -08:00
evykassirer 5178a6f2fe list_cursor: Update return type of find_li to allow undefined.
This reflects how the function is used in
`stream_list.initialize_stream_cursor`, and is already
handled appropriately in `ListCursor.get_row`.
2024-02-23 16:18:48 -08:00
evykassirer c2412b5480 unread: Refactor get_counts for two return types. 2024-02-23 13:26:34 -08:00
Alya Abbott 4013336e3c portico: Add quote to /self-hosting. 2024-02-23 10:24:42 -08:00
David Rosa 948b427de7 api-docs: Add instructions to download `zuliprc` files.
- Adds instructions for downloading a zuliprc file for a bot or for
  yourself.
- Updates the button label to "Download zuliprc", since that's the
  filename it downloads.

Fixes #28881.
2024-02-23 09:43:57 -08:00
David Rosa 9a6ccba733 account-settings: Rename "API key" button.
Renames button to "Manage your API key", and updates docs
accordingly.

Fixes part of #28881.
2024-02-23 09:43:57 -08:00
Lauryn Menard e4e65074df remote-support: Add push notification status information.
Adds the information returned by get_push_status_for_remote_request
for remote billing users to the support page. Note that getting
the current push status data will result in some duplicate database
queries (getting customer, plan, current billed users, next billing
cycle) when generating the remote support view.
2024-02-23 09:08:21 -08:00
Lauryn Menard 423af9916a remote-support: Add specific class for support section headers. 2024-02-23 09:08:21 -08:00