Before this commit if a user pressed enter to submit the add emoji form
the uploaded emoji was getting cleared.
This was happening because when we pressed enter the browser tried to
submit the form, because we had two buttons inside that form one for
clearing uploaded emoji and one for uploading emoji they were being
treated as "submit" button and hence their callback ran which in result
was responsible for the bug.
Fixed this by explicitly setting the `type` attribute for those buttons
to `type=button` so that they will not be treated as "submit" button.
Also added the `form_id` option for `dialog_widget` which is needed if
we do want to correctly submit the form by pressing enter.
Fixes: #24972
In commit 92ad988144, we removed the local echo code that tried
to re-render locally echoed messages that were rendered right before
a server/browser restart. These changes removed the only event
triggered by `"home_view_loaded.zulip"`.
This removes the remaining `"home_view_loaded.zulip"` event trigger
in web/src/server_events.js since it no longer triggers any events.
Renames the class name in `web/src/unread.js` from `UnreadPMCounter`
to `UnreadDirectMessageCounter` and renames the associated instance
of `unread_pm_counter` to `unread_direct_message_counter`.
This was missed in #26005. The user popover button does not appear
for bot users. We complete the TODO here and simplify the
calculation for show_manage_menu so that we always show it if not in
spectator view and not showing the popover for self.
This commit changes a few things:
* Using `scrollHeight` instead of `offsetHeight`, which explicitly
also measures content not visible on the screen due to overflow.
* Measures the height of `.message_content` which is the div with
the full message height.
* Only resizes messages that are visible on the screen, i.e. only
those in `message_lists.current`.
This traverses the DOM to the <pre> element containing the
copyable material of interest.
The button is attached to the .codehilite element to ensure
that the button does not move with horizontally-scrolling
code content that exceeds the width of the content column,
as happens frequently at mobile scales or for very long
lines of content.
Fixes#26093.
The `tabbed_instructions` widget used for both language toggles in our
API documentation and app toggles in our Help Center documentation
misleadingly calls the identifier for the tab `language` in local
variables and its interface.
- Renames local variables `language` -> `tab_key`.
- Renames HTML data attributes `data-language` -> `data-tab-key`.
Fixes#24669.
This commit removes settings_text_input class from url type inputs
and we instead add the width property to settings_url_input.
Note that we might instead have a single class for all type of inputs
instead of having different classes for url, password and text type
inputs in further commits.
We remove the modal_text_input class from password and url type inputs
in modals and add the width property CSS to modal_password_input and
modal_url_input instead.
Note that we might instead have a single class for all type of inputs
instead of having different classes for url, password and text type
inputs in further commits.
We use url type inputs in the add and edit custom field modals
and also to show the url type custom fields in "Profile" panel
and "Manage user" modal.
This commit re-adds the bootstrap CSS rules to these specific
input elements using modal_url_input and settings_url_input
class and thus removes the CSS for url type inputs from
bootstrap.css.
We might replace the new class added here with a common class
for all type of inputs in further commits.
We use email type inputs only in portico pages and
the bootstrap CSS is already overridden by CSS
defined in portico_signin.css. Only outline property
was being applied by bootstrap on focusing the input
which has been added to CSS in portico_signin.css in
the previous commit as password and email type inputs
have common CSS.
Thus, we can remove the bootstrap CSS for email type
inputs safely.
We use password type inputs for API key and password
change modal in the main app and in login, register
and password reset pages.
For the portico pages, i.e. login, register and
password reset pages, the bootstrap CSS is already
overridden by our custom CSS defined in
portico_signin.css and some of the CSS added by
bootstrap is redundant. Only outline property was
being applied by bootstrap on focusing the input
which has been added to CSS in portico_signin.css
in this commit.
For the inputs used in app, i.e. API key and password
change modal, we have already added the CSS rules of
Bootstrap using "modal_password_input" class.
Thus, we can remove the CSS for password type inputs
from bootstrap.css.
This commit adds specific CSS styles from bootstrap to password
type inputs in modals using modal_password_input class. This
change helps us in removing the bootstrap CSS for password type
inputs in further commits.
We might replace the new added class with a single class which
will be used for all type of inputs in further commits.
The "pull-left" class was used for hidden file type input
in compose_control_buttons.hbs and in the copy code button
in codeblocks. It was only used to set the float property
in CSS, but we do not need to set it and removing it does
not make any change in the position of these elements.
So, this commit removes the pull-left class and its CSS
from bootstrap.css as well.
For the file type input, it is already hidden and after
removing the float property also, it is positioned at the
same place due to ordering of elements in HTML.
For the copy code button in codeblocks, it is postioned
using "position" and "right" attributes and removing
"float" property has no effect.
We use pull-right class for copy button with the multi-use
invite link only and this commit adds CSS for that specific
element. This commit then removes the bootstrap CSS for
pull-right class and also removes pull-right class from the
copy button since it is no longer required.
This commit adds the required bootstrap CSS rules for fieldset
elements to the specific selector in portico_signin.css and
removes the CSS from bootstrap.css.
We use input-block-level class only for search input
and this commit adds the required bootstrap rules for
it to the specific elements in search.css. So, we can
safely remove the CSS defined for this class in
bootstrap.css.
In commit #25837, we added in a check for the user's mark as read
policy in the frontend for `by_topic` and `by_recipient` narrowing.
In that change, the assumption was that for both functions, it was
sufficient to check only for whether the user policy was to never
mark as read.
But because the `by_recipient` function may narrow to an interleaved
stream view, it is possible that message will be marked as read
when the user did not expect it to be (e.g. they marked all the
messages in a topic narrow as unread and then used the `S` key
shortcut to navigate back to the stream view) when they have
conversation views only as their mark as read policy.
Here we move the check for the user's mark as read policy to be in
the two cases for `by_recipient` so that the mark as read behavior
here matches the user's setting.
This commit introduces a seperate `page_params` file for billing module
since we only use certain page_params in billing module only that it does
not make sense to include them in the main `page_params.ts`.
Also introduced `zpage_billing_params` for proper testing new `page_params`
in billing module.
The `initialize` function registers a click handler, and
previously it was being registered another time each time
one of these calls to `initialize()` happened. The only
other thing that happens in `initialize` is a call to
`render_title_area`, so this commit replaces the extra
calls to initialize with that.
This commit remove the Saving/Saved notices when editing the stream
name and/or description. Instead, it replaces the "Save changes" button
with a spinner while the changes are being saved.
Fixes#24535.
This commit fixes an issue where the button height increases while
it has the spinner on modals with long text on the submit button. The
issue occurred due to the button height being calculated after hiding
the span element, which resulted in an incorrect height. To overcome
this, the commit suggests computing the span element's height before
hiding it to ensure that the button height is accurately set.
Previously, we used to have top and bottom paddings of 4px to
the select elements but it was removed in a208da9c4d to make
sure that text for the selected option is aligned properly.
All other select elements have height set to 30px, but the
select elements in stream settings page had height set to
"fit-content" and so they looked ugly after removing the
padding.
This commit sets the height of select elements in stream
settings to 30px.
Refactored `recipient` family of variables to better names like
`recipient_ids` which also aligns with the type of these variables.
Also, refactored `typing_status.test.js` to use array of user ids
instead of string names like `alice` and `bob` to stay consistent with
the actual type of these parameters.
fields set.
This commit refactors the `state` object to either be null or has all
the fields set at the same time because they are note really decoupled.
This helps us to clean our code a little bit as well as makes it easier
to migrate this module to TypeScript.
This commit cuts the dependency on `compose.js` module for
`compose_actions.js` module by introducing a hook system for
registering different hooks from external modules.
This commit adds a "Followed topics" row to the 'Notification Triggers'
table in the 'Personal settings > Notifications' panel and the
'Organization settings > Default user settings' panel.
This adds support to control email, push, wildcard mention,
visual desktop, and audible desktop notifications for messages
sent to followed topics by toggling corresponding global
notification settings.
The "Followed topics" row is available in the development
environment only.
Removed the HTML title tooltip from Reactivate bot button as it was
not adding any new infromation to the button.
Converted all other tooltips in bot profile card to Tippy tooltips.
Fixes#25977.
Previously, the HTML structure of unread banners continued to utilize the
old stylings. We are currently in the process of simplifing both the
compose banner and unread banner stylings into one. These change will
update the HTML structure to be the same as the compose banner and use
the new stylings.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner
to main-view-banner.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_action_button
to main-view-banner-action-button.
Previously, we have duplicate stylings in compose banner and unread banner.
This is rather messy and creates a lot of styling rules. We should define
an abstraction for them. This change will rename compose_banner_close_button
to main-view-banner-close-button.
Added a copy-to-clipboard button to the code blocks in the API and
Help Center docs. Previously, copying code from the docs required
manual copying, which was cumbersome.
Used the same copy-to-clipboard svg icon as the one used in
web/src but manually created the button within the js function instead
of using a template. Updated the pre CSS element to have relative
positioning and gave the copy-codeblock element absolute positioning
to ensure the button stayed in the top-right corner.
Fixes#25726.
These changes appear to correct the keyboard-navigation repro
from #25907, and it makes it possible for users without the
permission to create streams to exit the streams modal by
hitting Esc.
This reorganizes logic within the Tippy `onShow` method to
ensure that nothing is set or called for those users without
stream-creation privileges.
These changes probably require broader testing to determine
whether the fix addresses only that specific reproducer, or
the broader problems #25907 addresses with malfunctioning
j, k, Esc, and Return keys (when Ctrl + Return to send is
enabled).
Fixes a part of #25907.
This commit darkens the text-message color in the light theme
to the HSL equivalent of a dark gray (#262626).
This is the first time in the Zulip codebase where one CSS
custom property is set to another: the dark theme preserves
its use of `--color-text-default` in this way, but can be
adjusted independently of the reset of the theme in the future
by setting a different color value on
`--color-text-message-default`. Related reading on this
technique:
https://css-tricks.com/a-complete-guide-to-custom-properties/#aa-properties-as-properties
Fixes a part of #22022.
We need to call `rerender_ui` once on the initial page load, hence we
need to initialize `starred_message` module and call `rerender_ui`
together.
Fixes#25935.
This in-progress feature was started in 2018 and hasn't
been worked on much since. It's already in a broken state,
which makes it hard to iterate on the existing search bar
since it's hard to know how those changes will affect search
pills.
We do still want to add search pills eventually, and when
we work on that, we can refer to this diff to readd the
changes back.
This commit revamps the invite type section of the "Invite user" modal
to provide a more intuitive user experience. The section now includes a
radio button option with two choices: "Send an email" and "Generate an
invite link." The email input box is hidden when the "Generate an invite
link" option is selected.
Fixes#24692.
The theory here is that we should prefer to give component callbacks a
simple interface relative to what happened in the component, rather
than a simple implementation relative to what the parent context will
do with that information. Components should be designed to support
being embedded in many possible contexts, including unit tests and
Storybook pages. We’re nowhere near that future but we might as well
take steps in that direction.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Undo a debugging commit
db5f39c506 (#21476) that was made to
help diagnose the issue eventually fixed in commit
6242602276 (#22728). Also remove an
unnecessary mutable variable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Previously, if the drafts modal was open in two different tabs and
if the user deletes one or more drafts in one tab, then the count of
drafts wouldn't get updated on the other tab.
The right long-term fix likely involves moving drafts from local storage to
the cloud. But we can greatly reduce the impact of the bug by updating the count
whenever the overlay is opened or closed.
It was throwing error while schudiling a message having wildcard mention,
because the function `open_send_later_menu` was using param instance to track down
interval, but the parametere instance was not passed from when it was
called from warning banner action. This commit removes the instance
param as it is of no use, and uses a variable to track interval.
* Remove `box-sizing` and `min-width` properties which have no
effect on `inline` positioned element. Modified class selector to
add `span` which reflects this while reading the CSS.
* Remove `2px` vertical padding and `line-height` which combined
are fighting for space??
If the stream settings is open but the stream which was
subscribed/unsubscribed wasn't open (say user unsubscribed
from a different tab), `$settings_button` would
be `undefined` here.
Since we want the same space in recent topics to display the
compose box without overlapping with any other topics, it makes
sense to use a common variable.
Othwersie, compose banner will overlap with any breadcrumbs
we have below the last message when user is fully scrolled up
and compose is at max-height.
This ensures that the click event on the mobile `+` button for
showing the compose tooltip is registered on a different element
from the tooltip for showing the `C` shortcut menu.
In commit a93598c22e, we removed, in `narrow.by_topic` and
`narrow_by_recipient`, calls to `unread_ops.notify_server_message_read`
because that would have marked messages as read for users who had
set their preference in the web-app to never mark messages as read.
We add those calls back now, but with a check for that user setting.
This allows the recipient box to take 100% of the available
horizontal space, up to 175px. The effect is that the
compose-box buttons are available to users at mobile scales
(viewports of 400px wide or less).
Commit 903dbda79b (#25370) introduced a
cross-site scripting vulnerability in the tooltips for the stream and
topic in the recipient bar. An attacker who can send messages could
maliciously craft a topic for the message, such that a victim who
hovers the tooltip for that topic in their message feed triggers
execution of JavaScript code controlled by the attacker.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit fixes the vertical alignment of "x" button in the
alert to be more closer to the center. We can still improve it
by probably using something like flexbox layout instead of
hard coding paddings or margins.
We were not showing the error, if any, when resolving and
unresolving the topic using topic popover in left sidebar
or using the banner in compose box. This commit adds code
to show the error in the message feed where we show other
errors like connection error, etc.
This moves selection of the correct input box / textarea to
a `on_hidden_callback` of dropdown widget, which also allows us
to just simplify `on_compose_select_recipient_update` to only
call `switch_message_type` when necessary so that it doesn't
interfere with setting focus.
Fixes#25779
We move the simplebar scroll on the right sidebar to a little left
when there is an overlay scrollbar present so that user can drag
either of them.
It is unusal to use a hack to close overlays when there is a method
to do it.
This fixes a bug where user is unable to scroll message feed
after opening an overlay and then using browser back button.
This could have easily cause other bugs too.
This fixes a bug where reducing the height of the window, reduces
the size of textarea and doesn't instroduce scrollbars, making
the textarea not scrollable.
This commit adds a long hover delay [750,20] to recipient bar icons.
Doing this prevents the situation when the tippy tooltips are left
floating when the icons suddenly disappear as you enter the topics
according to the organization settings and the references are removed.
Adding an additional delay ensures that the icons disappear and then
the tooltips appear.
When overlay / modal is displayed, scrollbar is hidden due to
the disabled scrolling on `html`. Reduce width of fixed elements
that will be visible in background and `html` so that they don't
occupy that extra space.
Also, I was over-thinking how we can get the scrollbar width. The
moment we allowed scrolling on `html`, it was easy to get the
scrollbar width.
This fix prevents the active-message outline from being obscured
under certain conditions, such as when setting a browser to zoom
out at 90% or less.
Suggested-by: Anders Kaseorg <anders@zulip.com>
Setting empty hash `#` scrolls user to the top of message feed if
done via `window.location.hash` or using browser back / forward button.
To avoid this, we set don't set `hash` after org URL for default view
when user uses `escape` key or clicks on org logo.
In other situations, we explicitly set the hash of the view.
When creating new streams or groups, open up user card when
a user's name is clicked on. This behavior now matches
other settings tables elsewhere.
Fixes#25725.
The JavaScript engine used by zulip-mobile on Android is still some
four years out of date, apparently.
This reverts commit a3d6c47b7d (#25734)
and part of commit 54f90e41c0 (#25554).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit keeps the height of the dropdown consistent, even when
it's adjacent a multiline collection of pills in a group DM.
It also keeps the righthand buttons and narrows top-aligned, too.
Additional markup and CSS ensures that the < marker always stays
vertically centered with respect to the dropdown.
While this commit achieves what the subject advertises (fixing the
input box's height to match the recipient drop-down), but it does
so by relying heavily on flexbox's behavior to manage the height
of the elements and vertical centering, where necessary, rather
than positioning hacks or vertical padding.
This commit also removes some additional styles that do not make
sense (e.g., `min-width: 0`) or that need not be set.
This commit will enable us to use the API we developed for Tippy
popovers, allowing us to integrate them into any external modules
that require a Tippy popover.
This avoids a bug where during a browser initiated hashchange
(via back/forward/manually typed URL) browser sets the scroll
position of the current hash based on its memory of the scroll
position of the new hash.
This commit addresses the issue of relying on `compose_state` for
retrieving the `stream_id` to display warning banners. Previously,
warnings were shown for syntax in the message edit box based on
whether that syntax would trigger a warning for the draft content (if
any) currently in the compose box.
We fix this by using a new `get_stream_id_for_textarea` function to
obtain the correct `stream_id` value for the check being done.
Fixes: #25410.
Previously, hovering over the disabled subscribe button
would not display any tooltip due to an undefined object
being passed to the function that created the tooltip.
Animating `box-shadow` and `top` is slow since the browser
drops frames when animating them. We can fix it by using `will-change`
property but it is just better to not animate them and instead
use transform.
zulip-mobile currently requires Android ≥ 7 and iOS ≥ 14, both of
which support replaceAll. The code change was in commit
54f90e41c0 (#25554).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Previously, if the user closes the settings modal by pressing
the "Esc" key and if any date-pickers were open then they would
remain on the screen. This commit fixes that and now date-pickers
are closed when the settings modal is closed.
Also added a puppeteer test to verify the said behavior.
Fixes part of #25097.
The nav bar's bottom border was being hidden by the search
bar. This makes the search bar slightly less high to fix this
issue.
Soon this code will be replaced with the changes in #24345.
This just ensures that the mention-pill color selectors are children
of `rendered_markdown`, which class appears both in the message-
preview area as well as individual message rows.
Fixes#25720.
This commit adds bootstrap CSS rules for number type inputs
in billing and upgrade page to billing.css as we will be
removing them from bootstrap.css in further commits.
This commit adds bootstrap CSS rules for number type inputs
in activity page to activity.css as we will be removing them
from bootstrap.css in further commits.
We use "submit" type inputs in dev login page. Only "cursor"
CSS was applied to those elements from bootstrap and this
commit adds it to those elements in portico_signin.css and
removes the CSS in bootstrap.css and bootstrap-btn.css.
We use "input-xxlarge" class for search box in activity
support page only. This commit adds the width property
in activity.css for the search box and rest of the CSS
applied using this class was redundant and can be removed
safely.
We had the `3px 0 1px` padding before migration to use grid,
then I switched it to use `4px 0 1px` since we were planning to
use blue box border which seemed to have helped that case.
Since we switched to using outline for blue box, it makes sense
to just use equal padding.
Backend incorrectly renders @everyone and @stream as `user-mention`
while they are clearly `group_mention`. To fix this, we use
`data-user-id` property of @everyone and @stream which are
set to `*` for them.
Removed the sorting functions which were sorting under the assumption that
our comparison items were a list instead I used the generic sort functions
functionality of our `list_widget` module.
When there are only muted unread mentions in a stream, show `@` icon
and unread count in faded style, also align the `@` on more topics
with no unead counter on it.
If there are only muted unread messages without mentions don't show
the unread counter on the stream.
Fixes#25382.
The "Mark as unread" event handler was not passing through the
mentioned_me_directly value, which is now important to left sidebar
rendering.
See the extended comment for how this solution is incorrect/incomplete
and has to fall back to guessing a potentially incorrect value in rare
situations.
Co-authored-by: Tim Abbott <tabbott@zulip.com>
We need to append the `version` parameter when constructing the urls for
medium-sized images so that the browser updates the image in real time when
the user uploads a new avatar.
Fixes#25558.
This commit updates the Help Center links in all relevant empty message
list views to open in a new tab by default. This prevents users from being
navigated away from the app.
Fixes#25337.
The use of named areas with `grid-area` make it unnecessary to
declare `grid-row` or `grid-column` values. (Note also that
grid areas must not be presented in quotation marks.)
Additionally, because `.unread_marker` is no longer placed on the
grid by itself (i.e., it always accompanies `.date_unread_marker`
or `.message_unread_marker`), it does not need any manual grid
placement, `grid-area` or otherwise.
This change enables the unread marker to participate as a grid item,
rather than the product of various absolute/relative positioning
hacks. The intention is to therefore prevent the blue active-message
box from disappearing on browsers that have zoomed out (~80% zoom).
With grid in place, this also makes for a more robust presentation
of each message row, and named grid areas should make it possible to
modify and extend the grid into the future.
Finally, this change removes styles that are no longer necessary in
the context of CSS Grid.
Added styling to show no outline around the copy to clipboard button on click.
Previously, when clicking this button, a rectangular outline appeared around
the button, which didn't look good, since a 'Copied!' message was already displayed.
Fixes#25533.
This commit fixes a typo in the selector used to
validate registration, support, realm creation,
password reset and terms of service forms. This
typo also resulted in a bug where "This field is
required" error message was shown at incorrect
position and this change fixes it.
This commit also fixes the client side error
handling of these forms which did not work
perfectly due to the selector being wrong.
If the spectator registration call fails, properly log the error and
call `reject` with an error object, not the xhr that `channel.post`
calls its error callback with.
This does nothing to address the UI question of what to do should this
request fail.
These changes ensure that only headings targeted by URL fragments are
highlighted in full. Div elements will have their immediate first
child element highlighted instead (e.g., the first element of an API
parameter box).
This commit moves `maybe_get_stream_name` function from `stream_data` to `sub_store`
as it didn't had any dependency on `stream_data` and it also helps us to cut off
dependency on `stream_data` for some of the modules including `user_topics`.
Fixes#25413.
The old code was disabling the save button wrong by using
`.addClass("disabled")` instead of `prop()`.
Added tooltip for the disabled save button as per issue #25413 and changed
"Times up!" color to red.
The textbox readonly logic was changed to no longer becoming readonly. Reason
being there are edge cases involving the compose buttons such that simply
marking the textbox as readonly is not sufficient.
E.g. using the compose buttons after readonly still modifies the content.
One solution might be to just hide the compose buttons visually. However, there
are edge cases for that too. If preview mode was previously active, then
perhaps that state needs to be reverted. If any modal is open, such as the emoji
picker, then that needs to be closed. Solving these edge cases doesn't
improve the user experience. Keeping the textbox editable allows an easier way
for user to copy the text and don't have weird cases.
Zulip's select widgets have a 30px height; this comes from Bootstrap
but is also generally nice for visual consistency.
In modals, we use a 15px font-size, instead of the 14px used in the
rest of the app, and in that context, the 4px vertical padding plus
30px fixed height resulted in the text not being vertically aligned.
Fix this by removing that vertical padding; all of our select elements
with these classes appear to position the text in the center of the
dropdown through other CSS mechanisms.
We now allow users to change email address visibility setting
on the "Terms of service" page during first login. This page is
not shown for users creating account using normal registration
process, but is useful for imported users and users created
through API, LDAP, SCIM and management commands.
This removes the previous "or forward" text from the message
actions popover, and keeps the documentation in sync with the
new text. Internationalization tests are updated, too.
Fixes#25603.
Prior this commit, changing the message type from a stream (where posting
was not allowed) to a direct message using the compose box dropdown, did not
changed the state of the send button from disabled to enabled even though
direct messages were allowed in the organization.
This was happening because `check_stream_posting_policy_for_compose_box` was
only for streams.
Now, function is updated to check for both streams and direct
messages, as it checks if direct messages are allowed or not, and depending on
that, it updates the send button's state, tooltip and displays a relevant banner.
When hovering over another user's message, the emoji reaction
icon is already present. This commit removes the "Add emoji
reaction" menu item from the popover menu in this case, to
avoid redundancy.
Fixes#25602.
This likely needs further refactoring to switch to using stream IDs
rather than names in this code path, but this change fixes an
exception that would be throw when opening the compose box while
viewing a narrow to an invalid stream name/ID.
In #22524, we have updated the compose banner to the new, updated design
while the unread banners have remained the same. When comparing them side
by side, they look rather old and outdated. We should apply the updated
design to the unread banners as well.
Fixes: #25551.
Previously, the close buttons on the unread banners used "x" as the icon.
This unfortunately doesn't scale well as we increase the font-size. To fix
this, we should update the button to use zulip icons instead of a character
as the button.
This commit assigns a `.scroll-target` class to preserve any URL
fragment whose corresponding ID is on the self-same page as the
activating link.
This accommodates a side-effect of the fetch-based page-loading
logic, which seems to lose the `:target` reference once a load
or reload is complete.
One caveat: While the approach here works fine when loading a new
docs page whose URL includes a fragment, there appears to be something
about `simplebar` that clears out the `:target` reference. If you
click a heading link on a help page, for example, you might
momentarily see the highlighted style appear before it disappears.
Keyboard navigation has been added to the scheduled messages modal
in this commit. The solution is based on the `modals_handle_events`
function from the `messages_overlay_ui.js` module, as well as some
helpful functions from the same module.
Fixes: #25181.
This is a preparatory commit to implement keyboard navigation in the
message scheduling modal. The main goal is to make the
`modals_handle_events` function reusable. To achieve this, we have
extracted all the context-related variables and replaced all
mentions of "draft" with the more neutral term "item". The
`modals_handle_events` function now also has a context parameter,
which contains all the necessary methods and properties to work in
different modal contexts.
This commit disables the field used for adding other subscribers
in stream creation box for users who are not allowed to add
other users to streams because of realm level setting
"Who can add users to streams".
Fixes#24900.
This commit disables the field used for adding other subscribers
to existing streams for users who are not allowed to add other users
to streams because of realm level setting "Who can add users to streams".
Earlier the field used for adding subscribers to existing
streams was not properly disabled.
This commit properly disables the field and also adds a new function
for enabling and disabling add subscribers container.
Since tippy relies on the `blur` event of `target` to hide
the toolips, it is important that the tooltip is triggered
by the element that receives that focus in keyboard navigation which
is `a` tag for left sidebar elements.
These can come fast and furious, and are not worth reporting all of.
Like presence reporting, we leave a small percentage of them for
network and endpoint latency information.
Instead of dropping all of these spans, downsample them heavily (1% of
expected sampling rate). These are some of the most frequent requests
to the server, and the high volumes do not add much information. We
leave a small percent of requests, since it is a useful measure of
overall client network latency.
This changes to not report any `call POST /json/users/me/presence`
spans, which we previously reported despite not including the inner
auto-instrumented HTTP spans.
This PR ensure that all elements targeted by URL fragments will
remain visible below the portico's menu bar at all viewport
sizes and also when a user zooms in, provided the target is on a
page with the menu bar, which will have the `portico-landing`
class.
Whether a quirk or a bug, Chrome appears to ignore the padding on
ancestral containing elements when calculating the offset for
`scroll-margin-top`, which is why padding has been moved to
`.inner-content` for `.why-page` and `.case-studies-page`, which
are the two unique class names for portico pages where the targeted-
element scrolling behavior is used.
This commit ensures that the Attribution, Jobs, and Team pages all
share a uniform structure to match those of other pages. This will
simplify styling and should ensure greater confidence when modifying
portico landing-page styles.
The one CSS modification here, for the jobs page, maintains the space
at the top of the "How we work" section.
Use update_submit_disabled_state_on_change parameter of dialog_widget
instead of setting up input handlers in show_edit_bot_info_modal.
Added new hidden input field to store value of current selected option
in edit_bot_form.hbs whose value is updated by item_click_callback
function of in settings_bots.js.
Also, called $(".edit_bot_avatar_file_input").trigger("input") on
clearing avatar so input event handler gets called and compare the
values to disable the submit button again.
Fixes#24568
Updated `get_current_values` function to not include undefined keys
in current_values object and if the input field is of type file and
a file is selected then set the value equal to file object.
This commit addresses `#stream-creation .modal-footer` becoming
transparent after an error in creating a stream due to overlapping
with `.stream-creation-body`. Instead of adding data-simplebar on
.stream-creation-body, added it to a new div
`stream-creation-simplebar-container` which contains 3 divs:
stream_create_info,stream_creating_indicator and stream-creation-body.
Additionally, fixed the border-radius of the modal footer on the
bottom left side for device width > $md_min.
Fixes#25526
Previously, when a user enters a empty dm-including view, they'll notice
the "Why not start the conversation" action line and click on the link.
When this happens, the compose box would open but the receipent box is
never populated.
Since the dm-including view is a search view, we should drop that phrase
from dm-including views altogether. It also isn't super natural to
have a button that starts the conversation with the user anyways.
Fixes: #25524.
Simplebar introduces a bunch of intermediate divs, and we want to be
clearing the content element, not the entire container including the
simplebars divs.
`update_or_append_banner` abstracts the logic for not creating another compose
banner if one is already present in the DOM, it just replaces the content of the
old banner with the new one.
When the user has a wildcard @-mention we show a warning if the stream has more than
15 members. When the user clicks "Yes, schedule" and confirms the intend to schedule
the message we open the send later modal to let user choose scheduling time.
Fixes#25426.
Extracted opening send later menu code in its own function `open_send_later_menu`
so that we can reuse to directly open the modal from different parts of code.
Added a new param `scheduling_message` which is passed down to the `show_wildcard_warnings`
this argument will help us to do logic relevant to when we are doing validation on scheduling
a message.