Extracts code for generating the events table strings to a separate
function and uses templates so that the HTML is clearer.
Updates events table classes for CSS to start with "api-" for
clarity.
Creates a dataclass for getting the data needed for an individual
event's documentation and uses that dataclass in a separate
function for generating the strings for each event's documentation.
Uses templates for parts of event documentation with HTML and CSS,
and updates CSS classes to have clearer names.
The messagebox-wrapper div is removed, and it's only style `flex: 1` is
applied to the messagebox div. The `height: 100%` and `margin-top: 5px`
styles on the messagebox div were earlier causing it to move 5px down,
outside the messagebox-wrapper div, when the compose box was expanded.
Earlier, autosize wasn't updated for the compose box after resetting its
`max-height`, so in cases where the older `max-height` was more than the
height, and the current max-height was less than the height, the compose
box would not be scrollable.
We now always update the autosize after resetting the max-height.
If a user popover is open in stream settings, and user presses
`down/up` arrow to view settings for a different stream, the user
popover stay open.
Why we need to explicitly hide it?
We have click handlers to hide the popover and `data-reference-hidden`
to hide the popover if the reference goes offscreen via scrolling.
In this case, those events don't fire, there is no reason for tippy
to check if reference is visible and thus show / hide the popover.
Add a new dark mode css in app_variable.css for rendered
markdown tables. This rule sets a brighter color for tables
in messages / chat to make it more visible when the user is
using dark theme.
Fixes zulip#29856.
This refactor aims to make managing css for rendered
markdown table easier by abstracting the css for thead
background color into a new variable in app_variable.
This refactor aims to make managing css for rendered
markdown table easier by abstracting the css for table
border color into a new variable in app_variable.
Since left sidebar was in fixed position, mac's rubber-band scroll
effect was not working on it while it was working for others making
the bounce look weird.
Fixed by letting it bounce with the rest of the elements on the page.
The compose expand / collapse button is moved from the top right of the
compose area to the top right corner inside the compose textarea /
preview.
The textarea / preview and the button area shares the same grid parent.
25px extra padding is added to and margin is subtracted from the right
of the element so the button is visually inside it. It appears only on
hovering the compose area, and uses a new custom icon.
Fixes: #28791.
Sentry reporting discovered that if the user was viewing the channels
tab for a bot when the bot's owner was changed (or various other
live-updates), we'd throw an exception trying to access the
original_values object for the manage-user/bot tab.
This code is fragile and messy, but probably a framework change is the
most expedient path to fixing it.
This check doesn't work with the `me` user, because that
user is always at the top of the all users list, and
therefore `new_pos_in_all_users` will always be 0 and
never `render_count`. It's possible this was already
broken before the split buddy list change.
We can remove this check because `insert_new_html` is only
called when we definitely want to insert html. It's only
called from `insert_or_move`, and for moves we always
remove the user we're moving/replacing before the insert.
We don't need to reduce height of user list toggle button on
narrow widths. Reduced height is already applied to the user list
toggle button when the window height is below a threshold.
We now add a new function to set up the dropdown widget for
settings using new dropdown_widget.DropdownWidget instead of
calling dropdown_widget.DropdownWidget multiple times to
reduce code duplication.
Instead of having different functions to set values of dropdown widget
variables, we now use a single function to set their values by passing
the setting name to the function.
Removes the fixed height of the input field in compose
DM recipient box. This commit makes the behaviour of recipient
compose box equal to input pills used else where.
Fixes: #27688.
This is a follow-up to the previous commit, which updated the links in
docs and comments. This commit updates those links that are part of
some code.
This commit is a part of the effort to rename stream to channel.
Updates all the https://chat.zulip.org/#narrow/stream/ links in the
docs and comments to use the new /channel/ path. All these links are
for documentation/reference purposes only and thus, can be bulk-updated.
This commit is a part of the effort to rename stream to channel.
* `.container` class is only used in `/activity/support` and
`/activity/remote/support` pages. It is also used in emails but
it has its own CSS.
* Since the CSS applied is localized and looks good, we just
move the CSS relevant to us to `activity.css` which is used
by both of these pages.
* Searched `"container"`, ` container `, `"container ` and
` container"` to look for the uses of this class.
This commit, adds the `.popover-menu-tab-group` class to the tab pickers
that appear together with the other popover menu options and thus
need to match their spacing and margins for a uniform look.
This removes the need to maintain a cluttered list of tab pickers that
need to be styled as such in the `popovers.css` file.
As part of the popover menu redesign, this updates the topic visibility
popover to use the new "popover-menu" popover theme and improves
accessibility by using appropriate ARIA attributes.
This also moves the `:focus-visible` CSS rule to apply to any tab
picker in a popover, removing the need to explicitly add it to each
tab picker.
Fixes part of #28699.
Earlier, when a user was in /near/ topic or dm view, on sending
message in the same conversation we were incorrectly displaying
the 'jump to sent message' banner.
This commit fixes the incorrect behavior.
Fixes#30341.
Earlier, when a user was in /near/ topic or dm view, the scheduled
message indicator was missing in the conversation.
This commit fixes the incorrect behavior.
This commit removes create_public_stream_policy setting
since public channel creation permissions are now handled
by group-based setting.
We still pass "realm_create_public_stream_policy" in
"/register" response though for older clients with its
value being set depending on the value of group based
setting. If we cannot set its value to an appropriate
enum corresponding to the group setting, then we set
it to "Members only" considering that server will not
allow the users without permissions to create public
channels but the client can make sure that UI is
available to the users who have permission.
Create has:reaction search operator and search suggestions.
Create sidebar view for the user to view their messages that
have reactions using has:reaction sender:me operators.
Add custom heading for the view and tooltip in the sidebar.
Add documentation for the new operator.
Fixes: #27328.
While sending multiple messages to different recipients in
'message_basic_tests', we were facing flaky test failure.
The reason being now we jump to the conversation where message
was sent & that was resulting in calls to the
'wait_for_fully_processed_message' function as 'outside_view'
was not correctly set.
Precisely, the call to 'wait_for_fully_processed_message' uses
zulip_test.current_msg_list which won't remain correct when
the sender is narrowed to different views on sending messages
to different recipients in succession.
Organize and sort the options in tsconfig.json according to the way
they’re listed at https://www.typescriptlang.org/tsconfig/.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Note: This involves adding presence info of unknown users to the
presence data.
With some small tweaks, we can just add the info to the presence data
structures, just making sure the buddy list correctly skips those
entries and that we redraw the user in the case where the user creation
event arrives after the presence polling loop.
Fixes#17933, #27517
Instead of `recent_view_table`, we make `html` as our scroll container.
This fixes an important bug for us where filters sometimes disappear
due to them scrolling under navbar which is unexpected. Since we are
now using separate containers to display rows and
filter (while includes table headers), where filters use sticky
positioning, this bug will be fixed.
If recent view load more banner is at the center as a result of
`document.elementFromPoint(topic_center_x, topic_center_y)`,
there is no `tr` to focus, resulting in first row to be focused
as the closest element as per previous logic.
To fix it, we just focus the last row which is just above the
load more banner and is visible.
We blur the focused element when an overlay opens, and refocus
it when the overlay is closed, to prevent side effects.
What motivated this change was that opening a lightbox overlay
from preview content while editing a message caused the escape
key to close the message edit form instead of closing the overlay.
Commit 33484e7ac3 (#29200) added a cache
for remove_diacritics, but this caching was rendered ineffective by
commit 45e9c046d8 (#29650) because it
relied on mutating a direct reference to the User object. Fix the
cache by rearranging the types to preserve that direct reference.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This can happen when the user’s configured language is less than 5%
translated. Fixes an assertion failure introduced by commit
6a429603ad (#30261).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
We immediately navigate the user to the conversation they just
sent a message to if they are not already in the appropriate
conversation view.
This commit adds a first-time banner to explain the same.
Fixes#29575.
Removes two 'narrow_to_recipient' banners which were
shown after sending a message to a different conversation.
Now, the sender is narrowed to the conversation where
message was sent.
Fixes#29186.
The chevron arrow icon before the topic / dm user field now also acts as
a go to conversation button. Whenever the functionality is available,
the plain icon changes to look and behave like a button. The old go to
conversation button on the right of the field is removed.
Fixes: #28697.
When a topic is muted, it is removed from the view in some cases.
This can lead to the popover being force closed since the popover is
anchored to the reference element.
We add a delay to all the methods that contribute to hiding the topic,
on mute, to allow the relevant animations to be completed before the
topic is hidden from view and the popover is closed.
Commit 3f2ab44f94 removed the 'development' guard and cleaned the
older UI of the previous topic visibility options implementation,
but it missed the related JS logic.
This commit removes this redundant code, which was now present in
`web/src/topic_popover.js`.
This commit updates the sidebar topic actions popover to use the new
sliding tab switcher for the topics visibility policy switcher.
This also includes changes such as hiding the popover only on
successful request completion, and adds error feedback by indicating
it via the sliding animation.
This hides the visibility policy popover only when the request to
change the topic visibility policy is successful.
This allows a user to retry changing the policy in case of a request
failure, without having to open the popover again from the start.
Fixes how the confirmation modal title is generated for translation
for deleting an option or multiple options from a customer profile
field that's a list of options.
In the "not-subscribed" tab, when there are no channels to show, we
display a text message saying "No channels to show. View all channels"
along with a link that redirects the user to the "All channels" tab
(All channels(#channels/all)).
Updated the update_empty_left_panel_message function in
stream_settings_ui.js to modify and determine which banner to display
when no channels are available to show, modified that function to also
display the banner of the "not-subscribed" tab using a new classname
called 'not_subscribed_streams_tab_empty_text'.
This commit adds a new tab to the stream settings overlay called
"Not subscribed" which lists all the streams the user is not
subscribed to. This tab is disabled if the user is a guest.
Introduced a new variable called "show_not_subscribed" to replicate
a similar model to how the subscribed tab is working. Currently,
there are only two tabs: "subscribed" and "all streams" so we can
use an if-else condition.
Refactored the 'update_stream_row_in_settings_tab' function inside
stream_ui_updates.js to include the case of a 'Not-subscribed' tab,
so that the tab is immediately updated in any add/remove subscription
event.
Fixed and added the node tests for these changes.
This commit changes the variable and function name from
"subscribed_only" to "show_subscribed" and
"set_subscribed_only" to "set_show_subscribed"
so that in the next commit, when the "not subscribed" tab is added,
we can use a similar variable named "show_unsubscribed" and function
named "set_show_unsubscribed".
Fixes#28526
* Removed `container` and `row-fluid` class from error pages.
* Use a variable for footer height.
* Made header sticky instead of fixed allowing us to position
page content without adding arbitrary padding or margin at top.
Header is around 60px in height, so reduced that much top padding
or margin.
Before this commit the `user_settings_panel` object was declared as
a `const` and assigned an initial value of `{}`. Later, inside the
initialize function the object was mutated with three fields (`container`,
`settings_object`, `for_realm_settings`).
TypeScript does not allow this.Hence,we have removed the initial
value(`{}`) and changed the object to be a `let` var. This means,
when the `initialize` function is called `user_settings_panel` object is
undefined and hence `user_settings_panel.foo` will throw an exception.
To avoid this we have refactored the function by changing the way
`user_settings_panel` object is assigned value.
Commit 50f5cf9ad8 (#30227) changed
message_helper.process_new_message (called by
message_events.insert_new_messages) to return a newly created message
object rather than mutating the object it was passed. So
echo.insert_local_message needs to use this new object, fixing a
regression where we’d fail to replace a locally echoed message when
the server-rendered message came in.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Earlier, onboarding_steps field of state_data was stored as
current_user_params.
Now, we store it separately in a data structure initialized in
onboarding_steps.ts
Reason: All the other state_data fields stored in current_user_params
are attributes of UserProfile. So, it makes sense to store it
separately.
Fixes part of #30043.
This commit renames the function 'update_notice_to_display' to
'update_onboarding_steps_to_display' as it can be used for
onboarding step of any type.
Currently, we have only one type i.e. 'one_time_notice'.
We completely rerender recent view when we receive a new message,
which is not ideal since it is flashes recent view frequently
during the initial fetch.
Since later parts of initial fetch which trigger the flash, only
load old messages, they cannot change the latest message of
rendered rows in recent view. That means we can just inplace
rerender the rendered rows which got updated and don't have
to worry about order of rows being changed.