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.
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.
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`.
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.
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.
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.
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.
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.
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.
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.
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.
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`
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.
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.
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.
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.
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
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.
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.
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>
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>
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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
The generic argument of InputPillContainer should not be
InputPillItem<…>, as InputPillContainer already uses InputPillItem
where applicable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
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.
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>
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.
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.