Commit Graph

5165 Commits

Author SHA1 Message Date
nikhil singh b75bdc129b
emoji: Change event trigger for emoji_picker.js.
Previously the `maybe_change_focus_emoji` was being triggered
on `mouseenter` event instead of `mousemove` event. 

Because `mouseenter` events occur when a popover opens underneath
the mouse, without the mouse actually moving, this could result in 
the wrong emoji being picked when user tried to choose emoji
through the keyboard. 

Fixes #30559.
2024-07-02 12:09:55 -07:00
Karl Stolley 51d25bad09 message_row: Only set bottom margin on avatar for me-messages. 2024-07-02 11:45:30 -07:00
Karl Stolley 47430ac719 message_row: Allow user avatar to scale with UI. 2024-07-02 11:45:30 -07:00
Karl Stolley 0f05c67c88 message_box: Set same vertical space below reactions, length toggles. 2024-07-02 11:45:30 -07:00
Karl Stolley 8697c0c63e message_box: Base sender line-height on single-line message. 2024-07-02 11:45:30 -07:00
Karl Stolley 8556e098fb message_box: Set vertical margin to interelement space. 2024-07-02 11:45:30 -07:00
PieterCK b2515e8214 subscription css: Add new app variable for bottom border color.
This commit add a new css variable for subscription lists bottom
border color.

Fixes #30677.
2024-07-02 11:16:51 -07:00
PieterCK 7556414337 subscription css: Refactor subscriber list bottom border.
This commit refactors the css for subscriber list in channel
settings and group settings by moving the css rules that were
initially used to format the bottom border of the table to
the wrapper div (.subscriber_list_container) around the table.

On specific screen height, this wrapper div will overlap the
actual bottom border of the table and make it look like it's
cut-off. This commit makes it look like the table have consistent
bottom border accross all screen sizes.
2024-07-02 11:16:51 -07:00
Karl Stolley 3cb4bb830a left_sidebar: Refactor nav rows for low-resolution screens. 2024-07-02 10:24:20 -07:00
Aman Agrawal ce9c9ddf12 typeahead: Fix search typeahead open on `near` narrows.
This css accidentally got removed in #29882. This bug fix was
originally part of #30514.
2024-07-01 22:33:36 -07:00
roanster007 90c44d63b7 css: Update css of landing page images to show fading effect.
This commit adds the css class - "message-screenshot" and
"message-starred" to the "landing_page" to exhibit fading
effect.
2024-07-01 16:04:13 -07:00
Sahil Batra dbd0fae6af group_settings: Update save discard buttons when live-updating.
This commit adds code to hide save discard buttons and
discard the changes if another user changed a setting
in the same subsection.
2024-07-01 15:30:21 -07:00
Sahil Batra 08f35e08a4 stream_settings: Update save discard buttons when live-updating.
This commit adds code to hide save discard buttons and
discard the changes if another user changed a setting
in the same subsection.
2024-07-01 15:30:21 -07:00
Sahil Batra 5da1e57fc2 settings: Update save discard buttons when live-updating.
This commit adds code to hide save discard buttons and
discard the changes if another user changed a setting
in the same subsection.
2024-07-01 15:30:21 -07:00
Sahil Batra cb69a819d4 settings: Add functions to discard complete subsection.
This commit adds new functions which will be used to discard
changes for all the settings in a subsection when clicking
on discard button. This change will help in avoiding code
duplication when they will be used to discard changes in
a subsection if some other user changed a setting in the
same subsection.
2024-07-01 15:30:21 -07:00
Sahil Batra da95d01c37 settings: Use discard function to live-update realm default settings. 2024-07-01 15:30:21 -07:00
Aman Agrawal eca1a66fe8 drafts: Show saved time in UTC format in a tooltip. 2024-07-01 15:13:21 -07:00
Aman Agrawal c9c3a0fbc3 message_view: Fix hash not updated when filter is adjusted.
If the filter was changed due to topic move, the hash was not updated
due to `browser_history.state.changing_hash` being true. To bypass
it, we set trigger as `retarget message location`.
2024-07-01 12:36:24 -07:00
Aman Agrawal b3e65896b8 message_view: Adjust filter to match `near` message before narrow.
If the topic was renamed but the `near` link contains the name
of the old topic and we have the `near` message in the current
list, we can still narrow without re-rendering.
2024-07-01 12:36:24 -07:00
Aman Agrawal a3ced731bf message_view: Move adjusted_terms_if_moved to filter.ts. 2024-07-01 12:36:24 -07:00
afeefuddin cb1c293030 compose_popovers: Convert module to TypeScript. 2024-07-01 11:09:12 -07:00
afeefuddin e9bf3825d4 rows: Fix inaccurate types of parameters of a couple functions. 2024-07-01 11:09:12 -07:00
Aman Agrawal bb5c732dae stream_topic_history: Ask server for last msg id for historical topics.
Historical topics = Topics which we received from server and have
no messages cached for them to make any sense for the removed messages.
2024-06-30 22:37:46 -07:00
Aman Agrawal e82fe09cfc message_events: Bulk remove messages in stream_topic_history.
We can implement the TODO since the concern raised in the TODO
is no longer relevant as stated in the TODO.
2024-06-30 22:37:46 -07:00
Aman Agrawal 2cbb10bd22 message_events: Update old comment.
This got renamed incorrectly from recent topics to recent conversations
and also we not longer use set_message_topic to set message topic.
2024-06-30 22:37:46 -07:00
Shubham Padia 5ac6d671fc stream_create: Rename `Subscriber` list to `Subscriber preview`.
See https://github.com/zulip/zulip/pull/30610#issuecomment-2195284653
2024-06-28 15:35:56 -07:00
Shubham Padia 87b3642b62 stream_create: Soft remove users on clicking the remove button.
Fixes #29825.
Clicking on remove button will not delete the row anymore. We will
add a strikethrough to the user pill and email text. `Remove` button
will change to `Add` on click to undo this action.
Re-adding a user explicitly should will not undo the soft remove on
their row. e.g If `Iago` was added as part of a group and crossed out.
Now, adding another group with Iago as part of it should not undo the
soft remove.
We maintain a seperate set of soft removed users, but we will not
remove those users from the main user list on clicking `Remove`.
That list can only be modified by actions with the input pills.
We will subtract the soft removed user ids from main user id list
when sending the request to add subscribers to the new channel.
I've not added extra puppetteer tests, since adding users was
not part of the existing tests.
2024-06-28 15:35:56 -07:00
Shubham Padia 3e7be80656 stream_create: Remove add button and add to list on typeahead enter.
Clicking remove in the subscriber list table should strikethrough
according to the new behaviour but we will do that in the next
commit.
One additional detail to the specs described in #29825 is that we
will not have a pill for the current user. Discussion can be found
here: https://chat.zulip.org/#narrow/stream/6-frontend/topic/Disabled.2Fun-editable.20input.20pill/near/1838691
2024-06-28 15:35:56 -07:00
N-Shar-ma c10ff0bea8 compose: Use same focus ring color for compose buttons in each theme.
A new css variable is created with the same blue color in light theme as
`color-outline-focus`, and gray color in dark theme, and is used for the
focus-visible state of the compose control buttons, the compose close
button, and the send later vdots button.
2024-06-28 15:14:01 -07:00
N-Shar-ma 3262afeb9b Revert "css: Redefine `--color-outline-focus` for dark theme."
This reverts commit 5c1069872d.
2024-06-28 15:14:01 -07:00
N-Shar-ma 5a740d4fbb compose: Fix the red outline in invalid state in dark theme.
In dark theme, the selector for the outline was the wrong element, so a
double, misplaced outline would show up.
2024-06-28 15:13:21 -07:00
Karl Stolley 104c76c18b left_sidebar: Remove .input-append from stream filter. 2024-06-28 15:12:00 -07:00
Karl Stolley d3d4ddcfc2 left_sidebar: Rewrite topic filter in grid. 2024-06-28 15:12:00 -07:00
Karl Stolley a9c9115175 left_sidebar: Resize topic check with UI. 2024-06-28 15:12:00 -07:00
Karl Stolley 652db1b8b1 left_sidebar: Resize navigational subheaders with UI. 2024-06-28 15:12:00 -07:00
Sayam Samal 2165fe7e3c compose: Update mobile message buttons popover logic.
Instead of displaying contextual options in the message buttons popover
based on the message type, we instead abstract the logic behind the
scenes and instead just show the "Start new conversation" with the
relevant hotkey hint.

This also removes the `is_in_private_narrow` parameter which now serves
no purpose in the popover template, as we display the
"New direct message" option in all cases.
2024-06-28 12:40:20 -07:00
Sayam Samal a62337d08f compose: Redesign mobile message buttons popover.
As part of the popover menu redesign, this redesigns the mobile message
buttons popover using the new "popover-menu" tippy theme and improves
accessibility by using appropriate ARIA attributes.

Fixes part of #28699.
2024-06-28 12:40:20 -07:00
Aman Agrawal 49adbcc375 popover-menu: Use `popover-menu` style for emoji and giphy popovers. 2024-06-28 11:24:12 -07:00
Aman Agrawal 469582a974 giphy: Style search input same as dropdown widget.
Fixes #26929
2024-06-28 11:24:12 -07:00
Aman Agrawal 772969e68c emoji_picker: Format search bar same as dropdown widget. 2024-06-28 11:24:12 -07:00
Aman Agrawal be6650f035 emoji_picker: Convert search selector from class to id.
There is only emoji picker active at a time with only one search box,
so it makes sense for it to be an id.
2024-06-28 11:24:12 -07:00
Prakhar Pratyush caedcb8b8b onboarding: Narrow new users in DMs with Welcome Bot.
Earlier, new users were narrowed to the interleaved
DMs view on the first visit.

This commit updates the behavior to narrow new users
in DMs with Welcome Bot.

Reason for the change:
It makes more sense overall as an interleaved DMs view
is a power user view and it would also prevent the
message fading banner #29076 from showing up if the
user DMs Welcome Bot right away.
2024-06-28 11:04:31 -07:00
Karl Stolley c8aeff9a79 left_sidebar: Convert Sass-style vars to CSS vars. 2024-06-28 10:42:35 -07:00
Kislay Verma f58728d3e6 compose: Renarrow to unresolved topic.
When posting a message in an empty resolved
topic, the `Unresolve topic` button in the
compose banner unresolves the topic
and then renarrows to the unresolved topic
if currently viewing the old (resolved) topic.
2024-06-27 17:10:15 -07:00
Sayam Samal f49a11c810 theme: Rename day->light and night->dark in the frontend code.
This commit standardizes the naming of the day and night themes to light
and dark, respectively. This makes the codebase more consistent with
the naming used in the settings and the user interface.
2024-06-27 16:24:49 -07:00
Sayam Samal bc6deb7a0a theme: Rename "enable", "disable", and "default_preference_checker".
As a follow-up to the previous commit renaming the `dark_theme.ts`
module to `theme.ts`, this commit renames the following functions:
- `enable` -> `set_dark_theme`
- `disable` -> `set_light_theme`
- `default_preference_checker` -> `set_automatic_theme`
2024-06-27 16:24:49 -07:00
Sayam Samal 2417155828 theme: Rename dark_theme.ts -> theme.ts.
The dark_theme module now contains logic for light, dark, and automatic
theme switching. Thus, we rename it a more generic name, `theme.ts`.
2024-06-27 16:24:49 -07:00
Sayam Samal 05c61037c8 dark_theme: Refactor and consolidate theme setting logic.
This commit centralizes the logic for setting a user's theme preference,
both for regular users and spectators, into the `dark_theme.ts` module.
This simplifies theme handling throughout the codebase and ensures that
the theme is set consistently across all modules.

Instead of relying on various call sites to update the recipient bar's
background color and switch between the light/dark realm logo after a
theme change, this commit modifies the `set_theme_and_update` function
to include these calls after every theme change. Before this commit,
some modules used to update the realm logo after a theme change, while
others did not. This led to inconsistencies in the UI depending on
which method was used to change the theme.
2024-06-27 16:24:49 -07:00
Sayam Samal b616f013f0 gear_menu: Add theme switcher to the gear menu popover.
Standardize theme selection across the web app by replacing separate
light/dark theme menu options being used in the spectator view with the
new 3-way theme switcher.

Fixes #30318.
2024-06-27 16:24:49 -07:00
Sayam Samal d49426b950 realm_logo: Render light/dark realm logo on theme change for spectators.
Before this, the realm logo was not being updated instantly when the
theme was changed through the gear menu, and instead required a page
reload to take effect.
2024-06-27 16:24:49 -07:00
Sayam Samal 2f6cc4a6b0 dark_theme: Add automatic color scheme support for spectators.
Similar to the light/dark theme support for the spectators, this adds
the automatic color scheme support by storing the user's preference
in the local storage.
2024-06-27 16:24:49 -07:00
codewithnick e41d1fb48f settings: Add links to topic notification settings.
In this commit, a help center link to follow-a-topic and mute-a-topic
has been added in SETTINGS / NOTIFICATIONS > Topic notifications
so that users can understand thier options.

Fixes #30562
2024-06-27 15:33:10 -07:00
sanchi-t 77c614e072 set_up_stream: Update sorter function.
Make sure that typeahead results are alphabetized.

Fixes #30577.
2024-06-27 15:29:47 -07:00
sanchi-t 1a8997589d set_up_stream: Update typeahead items to 12.
Fixes part of #30577.
2024-06-27 15:29:47 -07:00
Karl Stolley fed0aa6642 inbox: Resize user circles in inbox view. 2024-06-27 15:28:27 -07:00
Karl Stolley d0f5d93f4b inbox: Size unread focus ring without shifting rows. 2024-06-27 15:28:27 -07:00
Karl Stolley 18e5b3ab6b unread_counts: Scale unread counts with UI. 2024-06-27 15:28:27 -07:00
Aman Agrawal 15195fc08f sub_store: Update first_message_id of stream if we can.
Tested by moving first message in a stream to other stream and
checking for the updated value in console via
`zulip_test.get_sub("verona")`.
2024-06-27 14:59:45 -07:00
Aman Agrawal cffae1439c stream_topic_history: Let server help us with latest msg id for topics.
If we already have latest data for topics, we shouldn't pass on the
opportunity to update the latest message id for existing topics.
2024-06-27 14:59:45 -07:00
Aman Agrawal d2d479ba61 stream_topic_history: Fix wrong topic order when moving messages.
Fixes #27500

It is hard to reproduce the bug but this should fix any bugs
involving topic order when moving messages since we are updating
the data again from the server.
2024-06-27 14:59:45 -07:00
Aman Agrawal d80dba75c5 stream_topic_history: Remove the concept of historical topics.
It is hard to maintain the concept of `historical` topics locally,
thus, we remove them entirely to simplify what we can do here.

This commit can introduce bugs when are addressed in the next commit.
2024-06-27 14:59:45 -07:00
Aman Agrawal d381a358d0 message_events: Remove message from message_store on deletion.
We did not remove the deleted messages from message_store
previously. This commit adds the code to remove the deleted
messages from message_store.

Co-authored-by: Sahil Batra <sahil@zulip.com>
2024-06-27 14:59:45 -07:00
sanchi-t 281ce39a0d template_stub: Remove the requirement to mock templates.
We will now just run the actual template if not mocked, such that code
that ends up rendering a template incidentally does not need to mock
templates.

Co-authored-by: Tim Abbott <tabbott@zulip.com>
2024-06-27 11:58:59 -07:00
Aman Agrawal edb02fcc98 giphy: Fix focus outline left vertical line not visible. 2024-06-27 09:19:23 -07:00
Aman Agrawal f27488adc9 giphy: Upgrade giphy to implement TODO.
Upgraded to use the tabindex support provided by giphy itself.
2024-06-27 09:19:23 -07:00
Sahil Batra d60075a8cf settings: Make the label for disabled checkboxes less faded.
This commit updates the CSS to makes the label for disabled
checkbox less faded such that it is faded enough to figure out
that the setting is disabled but the text is also visible clearly.
2024-06-27 09:18:39 -07:00
Aman Agrawal 39bcb6bd8b typeahead: Remove all sources of white space inside `strong` element.
We are using `white-space: pre` which doesn't condense whitespaces,
so we need to remove any unintentional whitespaces here.
2024-06-27 09:18:23 -07:00
Anders Kaseorg 3dccb72519 dependencies: Upgrade JavaScript dependencies.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 21:34:18 -07:00
Anders Kaseorg 7d4d4017b3 eslint: Fix unicorn/prefer-array-find.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
Anders Kaseorg 4428609ece eslint: Fix unicorn/prefer-includes.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-26 20:13:26 -07:00
N-Shar-ma 9bc1eb4bb9 compose: Allow 3-way compose box resizing with new fixed expanded state.
Apart from the normal (collapsed) and full screen sizes, a new expanded
state with the same size as the maximum a normal compose box can stretch
to when full (40% of the screen height) is now available. Now a user can
expand the compose box without it covering the full screen with a click.
The vertical resize icon in the bottom right corner of the compose box
is rendered useless so has been removed.

All three states can be cycled through by clicking the compose resize
button in the order: collapsed -> 40% of the screen -> full screen. When
a message naturally causes the compose box in its normal state to expand
up to 40% of the screen, clicking the resize button will take it to full
screen state.

Fixes: #29966.
2024-06-26 16:36:52 -07:00
N-Shar-ma b432b269ee refactor: Make compose size related variables & functions more specific.
We divide functionality into that for "full_size" and "expanded", which
are identical for now.

This is a prep commit for adding an intermediate expanded screen size.
2024-06-26 16:36:52 -07:00
Aman Agrawal 5f956cd369 typeahead: Change background of active elements. 2024-06-26 16:31:28 -07:00
Aman Agrawal a8eff69fc2 typeaheads: Reduce left padding for all elements.
This required taking special care of typeaheads with user circle
and making sure long typeaheads wrap correctly.
2024-06-26 16:30:26 -07:00
Aman Agrawal 52ac602acb typeahead: Make them look like dropdown widget.
This attempts to change background color and text color of typeaheads
to be same as dropdown widgets we have in the app.
2024-06-26 16:26:31 -07:00
Sahil Batra 1fac997338 settings: Refactor CSS for "control-label-disabled" class.
We previously had two CSS rules for control-label-disabled
class, one in settings.css and one in subscriptions.css
and the rule in subscriptions.css was being used by all
the elements with that class.

This commit refactors the code to have only single CSS rule
for that class with the value being set to the one used in
subscriptions.css, because that was the one being used and
that also looks better in terms of design, and the CSS is
defined in settings.css since it can be considered more
general file for writing CSS used in organization/personal
settings along with stream settings.

This commit also removes the unused code for
".control-label-disabled.enabled" selector since we no
longer use that selector.
2024-06-26 14:22:47 -07:00
Sahil Batra f7a6d841c8 stream-settings: Fade label of disabled default stream checkbox. 2024-06-26 14:22:47 -07:00
Sahil Batra 28174aecca settings: Fade label for disabled checkbox. 2024-06-26 14:22:47 -07:00
afeefuddin 22a58c739c left_sidebar_navigation_area_popover: Convert module to TypeScript. 2024-06-26 14:08:39 -07:00
adnan-td 4bde1586e4 topic_name: Fix compressing of display topic names.
Fixes part of #30478.
2024-06-26 12:23:32 -07:00
evykassirer 7ae0972c28 typeahead: Hide by default and show container on `show()`.
This avoids a bug (currently only for search) where the page
can be loaded with an empty but visible (half-loaded) search
typeahead.
2024-06-26 12:02:10 -07:00
Karl Stolley b519344dd9 message_controls: Remove unreachable read-receipt styles. 2024-06-26 12:00:21 -07:00
Karl Stolley cedc34bdea widgets: Remove hard-coded 14px font-size. 2024-06-26 12:00:21 -07:00
Karl Stolley 67b8b9e13a settings: Remove font size, unnecessary height from emoji file name. 2024-06-26 12:00:21 -07:00
Pratik Chanda 81abbab0d8 pm_list: Fix duplicate DM row in left sidebar.
When narrowing to a DM with their own user pill in recipient, a
duplicate DM row gets rendered.

This commit fixes this behaviour and doesn't render a separate row
when one's own email is included in recipient.

Fixes regression from zulip#29175.
2024-06-26 10:12:57 -07:00
Pratik Chanda d3fbfeae31 topic_list: Fix duplicate topic rows in left sidebar.
When narrowing to an existing topic name with different casing, left
sidebar renders duplicate topic rows for the existing topic name and
one with the different casing. Since topic names are case insensitive,
it should narrow to the existing row only.

Fixes regression from #29175.
2024-06-26 10:12:57 -07:00
Aman Agrawal ef09051003 css: Move text-error class from bootstrap.
Remove hover and focus CSS for anchor tags since `text-error` elements
which use this CSS right now don't have anchor tag.
2024-06-26 10:03:05 -07:00
Aman Agrawal 2eefe94b94 stream_settings: Add color for success message.
This was incorrectly removed in
98637e3a88.
2024-06-26 10:03:05 -07:00
Aman Agrawal 959bf39320 bootstrap: Remove unused `text-warning` class. 2024-06-26 10:03:05 -07:00
Karl Stolley c0837a6d20 status_emoji: Allow status emoji to scale with text. 2024-06-26 10:02:13 -07:00
Karl Stolley 818094f81d user_circles: Set user circles to scale with text. 2024-06-26 10:01:24 -07:00
Karl Stolley a43ae2a561 user_circles: Address TODO and remove styles. 2024-06-26 10:01:24 -07:00
Karl Stolley 4c1cc4e62e mention_pills: Allow pills to scale with other message text. 2024-06-26 09:51:29 -07:00
N-Shar-ma dcf2c67f2d typeahead: Add non breaking space (\u00a0) to list of word separators. 2024-06-25 22:52:28 -07:00
Aman Agrawal c8379b4f9a message_fetch: Stop infinite fetch for first unread message id.
Found while migrating message_fetch to Typescript in #30509.
2024-06-25 22:51:43 -07:00
Alya Abbott b892f8a7a8 notifications: Test notification should say that it's a test. 2024-06-25 17:28:17 -07:00
Alya Abbott 145654fd55 notifications: Improve label for button to test desktop notifications. 2024-06-25 17:28:17 -07:00
Aman Agrawal 9e0a3bebfd recent_view: Fix right arrow not working on read DM rows.
Fixed by letting col_focus exceed max selectable rows in this case
and having it reset back to 0.
2024-06-25 14:12:19 -07:00
Aman Agrawal a83b882705 inbox_ui: Let browser handle tab key. 2024-06-25 14:12:19 -07:00
Aman Agrawal 2bf3191ddf recent_view: Let browser handle tab hotkey. 2024-06-25 14:12:19 -07:00
Aman Agrawal 1c3c794385 views: Set focus to topic visibility icon on click. 2024-06-25 14:12:19 -07:00
Aman Agrawal dd071c7303 topic_visibility: Remove deprecated topic visibility toggle classes.
These classes became slowly unused as switched to the new topic
visibility system over time.
2024-06-25 14:12:19 -07:00
Aman Agrawal 909a0c1843 recent_view: Don't allow user to focus on time.
Since we don't want col_focus to be on the time column as we don't
track it in recent view, we simply mark it as an element user
cannot focus to avoid any confusion.
2024-06-25 14:12:19 -07:00
Aman Agrawal b0978ba4d5 tippy: Fix sidebar toggle button tooltip not hidden on blur.
Tabbing through the navbar elements, `Hide user list` tooltip
stays visible even if focus is moved away from it.

We move tooltip to the element receiving focus and blur event
to fix it. See previous commit for more details.
2024-06-25 14:12:19 -07:00
Aman Agrawal 23927ea5b1 left_sidebar: Fix tooltips not hidden on blur.
The elements which received focus didn't have tooltips attached to
them, thus when blur was triggered on `a`, the tooltip didn't hide
as it was not listening on it for the blur event.

We move the toolip to `a` elements so that when focus and blur
are triggered tippy is able to capture them.
2024-06-25 14:12:19 -07:00
Lauryn Menard 79fc430b56 narrow: Expand informative text in empty starred messages view.
Fixes #29378.
2024-06-25 14:11:42 -07:00
Lauryn Menard 89a3c290db narrow: Expand informative text in empty mentioned messages view.
Limits the width of the empty message notice to 600px so that this
longer and more descriptive text is similar to the width of the
empty header text.
2024-06-25 14:11:42 -07:00
Aman Agrawal cd2812c131 message_notifications: Tag notification text for translation.
Fixes #21032
2024-06-25 14:11:06 -07:00
Aman Agrawal 07525a2f7d message_notifications: Split title into two parts.
We separate the prefix and suffix parts of title, so that they
can be translated independently later.
2024-06-25 14:11:06 -07:00
Aman Agrawal 98341d811e message_notifications: Remove unused `test-notification` case. 2024-06-25 14:11:06 -07:00
Sahil Batra d7d83618a4 settings: Refactor code to update realm group based settings.
This commit refactors code such that we do not add separate
if condition block for each realm group based settings using
the new API format to send the request accordingly. We now
use a single if-block to update the request data for realm
group permission settings using new API format.
2024-06-25 09:26:38 -07:00
Kislay Verma 84cd835a8c composebox_typeahead: Avoid generating broken stream-topic links.
The #**stream>topic** syntax generates broken links for
topics containing two backticks or ending with *, because of
architectural flaws in the backend markdown processor.
So we avoid generating the syntax for such topics and instead
generate the normal link syntax in markdown.

Fixes #19873
2024-06-24 18:14:33 -07:00
Anders Kaseorg b75e016a2c realm_user_settings_defaults: Restore missing members.
Commit 02e236f58a (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Anders Kaseorg 7f49a4f0bd user_settings: Restore missing members.
Commit ed1c169bfb (#30519) caused Zod to
remove them.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:23:52 -07:00
Karl Stolley 8fb8bd95f0 info_density: Scale reaction emoji with font-size. 2024-06-24 15:05:53 -07:00
Anders Kaseorg f35e1fdef6 blueslip: Show popups for unhandled promise rejections in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 148af2a301 blueslip: Show popups for thrown non-Error values in development.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 15:05:28 -07:00
Anders Kaseorg 18137709a1 typeahead_helper: Straighten CombinedPill types.
The generic argument of InputPillContainer should not be
InputPillItem<…>, as InputPillContainer already uses InputPillItem
where applicable.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-24 12:35:51 -07:00
Karl Stolley e235240685 info_density: Recalculate timestamp widths on density dispatch events. 2024-06-24 12:30:38 -07:00
Karl Stolley 3f6760f41a info_density: Correctly set em context for timestamp calculations. 2024-06-24 12:30:38 -07:00
Karl Stolley 7dc20a56f2 info_density: Move timestamp calculations to better location. 2024-06-24 12:30:38 -07:00
Shubham Padia 991fec5b23 hotkey: Don't close compose box on topic list input ESC.
Fixes https://chat.zulip.org/#narrow/stream/9-issues/topic/Pressing.20escape.20in.20topic.20filter.20closes.20compose.20box/near/1833316
Topic list escape key action should take preference over
open composebox.
2024-06-24 10:37:24 -07:00
Aman Agrawal 3aaf25e42d bootstrap: Remove unused dropdown class.
We don't have any element using dropdown class in codebase.
2024-06-24 09:06:53 -07:00
Aman Agrawal 244d4e9620 bootstrap: Move `hidden` class to `app_componenets`. 2024-06-24 09:06:53 -07:00
Aman Agrawal 8457d12e59 bootstrap: Remove `hide/show` classes. 2024-06-24 09:06:53 -07:00
Karl Stolley 83a590dc06 compose: Zero out UA padding on composebox buttons. 2024-06-24 09:03:13 -07:00
Aman Agrawal 6999d84ddc message_view: Select `near` message without rerender.
If the new narrow has the same terms except `near` message id,
then we select the message if it is already rendered in the
current message list.

Tested by sending link to two different messages in a narrow and
clicking to ensure we don't have any loading indicators active.

Tested we are scrolling to target message too if it was not in the
visible viewport but is rendered above.
2024-06-24 08:41:14 -07:00
Karl Stolley 5cd4a8c8e5 pills: Express pill-container spacing on base class. 2024-06-23 22:00:18 -07:00
Karl Stolley 780391fd43 pills: Better express pill-container outer spacing. 2024-06-23 22:00:18 -07:00
Anders Kaseorg 95a2ce6ed6 ui_init: Restore guard against direct use of page_params.state_data.
Before commit fd253539e0 (#30519), each
part of state_data was removed by pop_fields, to ensure that it was
only used by its associated module and not manipulated directly.
Restore this guarantee by removing page_params.state_data itself.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-23 07:42:28 -07:00
Anders Kaseorg 3a7f5da717 page_params: Add a separate error message for missing #page-params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 21:50:51 -07:00
sanchi-t 2d79ce2e93 invite: Replace stream checkboxes list with stream pills.
Introduce an input field with typeahead functionality, initially
populated with the default streams for the organization.

Fixes #26871.
2024-06-22 20:04:28 -07:00
sanchi-t 445ff79e10 stream_pill: Update `format_stream_name_and_subscriber_count`.
Use `$t` to ensure the function returns a translatable string.
2024-06-22 20:04:28 -07:00
sanchi-t 7580130873 stream_pill: Rename `stream_display_pill`. 2024-06-22 20:04:28 -07:00
Anders Kaseorg 0b3cf78333 blueslip: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 19:18:10 -07:00
Anders Kaseorg f7eecb0e03 sentry: Untangle from page_params.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 18:53:56 -07:00
Anders Kaseorg 3db05666ac state_data: Accept null for ProfileDatum["rendered_value"].
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 11:21:54 -07:00
Anders Kaseorg ca5fba258e giphy: Split is_giphy_enabled to a separate module.
This removes giphy from the critical path of the TypeScript migration.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-22 08:21:08 -07:00
Aman Agrawal 4d84ed305e stream_color: Fix stream icon color not changing on theme change.
Changing theme didn't change the color of the stream icons.
2024-06-22 08:20:23 -07:00
N-Shar-ma 00240b6dbe compose: Reduce space between recipient area and textbox. 2024-06-21 17:29:56 -07:00
N-Shar-ma 878d02cf5c compose: Redesign control buttons row and textbox to look like 1 unit.
The row of buttons is placed using CSS grid template areas so that
visually it is now inside the bottom edge of the textbox. The color of
the buttons row and individual buttons is changed to match the color of
the textbox. All textbox border / box shadow properties are now applied
to its parent instead which is extended under the buttons' row, so that
its border snuggly fits around the buttons row too.

Notable side effects:
- In dark mode the textbox in focused state now has a light border which
does not match the recipient input's current border which doesn't change
when focused. Likely, the recipient input should be updated to match the
textbox's border color.
- The dividers in the formatting buttons row are not vertically centered
now. This should be figured out soon.

Fixes: #28702.
2024-06-21 17:29:56 -07:00
Karl Stolley ac002b358c markdown: Improve alignment, spacing around horizontal rules. 2024-06-21 16:45:16 -07:00
Karl Stolley 7febb78b3b markdown: Use interelement spacing on horizontal rules. 2024-06-21 16:45:16 -07:00
tnmkr 6b255fcc14 custom_profile_fields: Rename is_editable variable for clarity.
The variable is renamed to is_target_element_editable. This makes it
explicit that this variable is referring to HTML structure and not a
property of the field.

This is a prep commit for #22883 which allows admins to restrict users
from modifying field values.
2024-06-21 16:32:18 -07:00
Anders Kaseorg 4ddc8f406d onboarding_steps: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 72902d70f3 presence: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 438509a8f1 presence: Fix presence_last_update_id type.
It’s undefined for spectators.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 1a73101371 bot_data: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg bf8fc8429b unread: Validate parameters with Zod.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00
Anders Kaseorg 9c2ab2842f unread: Ignore deprecated sender_id synonym.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-06-21 15:53:44 -07:00