Commit Graph

5040 Commits

Author SHA1 Message Date
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