Commit Graph

98 Commits

Author SHA1 Message Date
N-Shar-ma 6a4c12b41e drafts: Space draft message content from restore draft button by 5px.
When the 1st line of a draft message took up the maximum horizontal space
possible, the last character was way too close to the pencil icon. More
noticeably, when a message began with a code block, it's right edge would
touch the icon.

To space the message contents and the restore draft button, now a margin
of 5px has been added to the draft message content. This makes the message
content narrower by 5px.
2023-03-08 11:33:53 -08:00
SameepAher 7f9fccedff css: Fix search bar width in right sidebar.
Remove old broken css which incorrectly set the width of the user list
filter bar in the right sidebar, for devices whose width is lesser than
md.
2023-03-07 16:50:30 -08:00
Aman Agrawal b0a468907b people: Add function get participants from user_ids_string.
This implements the TODO in recent_senders.
2023-03-07 15:43:03 -08:00
Aman Agrawal e6f3ffb946 recent_senders: Fix twice sent user ids in PM to self case.
This caused double user avatar to appear in recent conversations
for when showing user PM to self.
2023-03-07 15:43:03 -08:00
N-Shar-ma ce68911ab2 hashchange: Ensure no duplicate entries in browser history.
Until now, whenever the hash was updated using the `set_hash` function,
the new url was always pushed into the browser history, even if the current
hash was same as the new hash. This lead to multiple duplicate entries in
the browser history, when using the `z` hotkey to zoom to a message
repeatedly, which is very inconvenient when navigating through history.

This is now fixed by simply returning prematurely from `set_hash` if the
new hash is same as the current one. This fix will also prevent any future
features like `z` from causing duplicate browser history entries.

Fixes: #24468.
2023-03-07 15:39:36 -08:00
evykassirer 6581276a87 search css refactor: Nest media queries. 2023-03-07 15:38:11 -08:00
evykassirer 0a7fbc7085 search css refactor: Move search-related selectors out of media queries. 2023-03-07 15:38:11 -08:00
evykassirer 1df3b4f86f search: Rename .search_button to more correct .search_close_button. 2023-03-07 15:38:11 -08:00
evykassirer 3d3d00ab8e search css refactor: Split pill searchbox code into its own section. 2023-03-07 15:38:11 -08:00
evykassirer a030fe40ac search css refactor: Split up general media query. 2023-03-07 15:38:11 -08:00
evykassirer f1e6f4b5dd search css refactor: Move relevant css from zulip.css. 2023-03-07 15:38:11 -08:00
evykassirer caba06e93d global css: Convert SASS variables to CSS custom properties. 2023-03-07 15:38:11 -08:00
Hardik Dharmani e61a092f1e
stream_settings: Fix save/discard widget on narrow screens.
In narrow screens, the save/discard widget was incorrectly shown
even with no changes, due to the CSS intended to switch it from `inline-block` 
to `block display.

Fixed by adding `display: none` to `.hide` class for @media(width < 575px)
to hide buttons on screen width less than 575px.

Fixes #24589.
2023-03-07 15:37:24 -08:00
Alex Vandiver 739d527b16 sentry: Enable reporting on portico and other unauth pages. 2023-03-07 15:01:27 -08:00
Alex Vandiver b04843e2f9 sentry: Consistently use "(root)" for empty realm in user info. 2023-03-07 15:01:27 -08:00
Alex Vandiver cd288af4d5 sentry: Better URL filtering.
Always add `webpack_public_path` to all of the URL filters, and make
it a regex.  Also adjust to respect undef realm_uri, such as when a
spectator.
2023-03-07 15:01:27 -08:00
Hardik Dharmani 74ff9a4beb
popovers: Add disabled button CSS for light theme.
Previously, we only had disabled button CSS for the dark theme in dialog widgets.

Fixes #24567.
2023-03-07 11:01:01 -08:00
Alex Vandiver 8f8a9f6f04 sentry: Add frontend event monitoring.
Zulip already has integrations for server-side Sentry integration;
however, it has historically used the Zulip-specific `blueslip`
library for monitoring browser-side errors.  However, the latter sends
errors to email, as well optionally to an internal `#errors` stream.
While this is sufficient for low volumes of users, and useful in that
it does not rely on outside services, at higher volumes it is very
difficult to do any analysis or filtering of the errors.  Client-side
errors are exceptionally noisy, with many false positives due to
browser extensions or similar, so determining real real errors from a
stream of un-grouped emails or messages in a stream is quite
difficult.

Add a client-side Javascript sentry integration.  To provide useful
backtraces, this requires extending the pre-deploy hooks to upload the
source-maps to Sentry.  Additional keys are added to the non-public
API of `page_params` to control the DSN, realm identifier, and sample
rates.
2023-03-07 10:51:45 -08:00
Alex Vandiver 19691b170b blueslip: Report the built client version, as well as server version. 2023-03-07 10:51:45 -08:00
Alex Vandiver a8181152b7 webpack: Build a ZULIP_VERSION global constant into the built product. 2023-03-07 10:51:45 -08:00
Joelute b2b86b5e6f message_feed: Hide compose banner when unsubbing from stream.
Currently, when a user marks messages as unread in a stream/topic
and unsubscribes from the stream, both subscribe button and compose
banner will remain visible. This change will hide the compose banner
when the user unsubscribes from the stream and hopes to create a
better flow and reduce confusion.
2023-03-06 18:08:41 -08:00
Tim Abbott c58e893cb6 linkifiers: Add missing coverage ignore.
This was incorrectly missing in the last linkifiers commit.
2023-03-06 10:57:50 -08:00
Haridarshan Choudhary d335cb34af
message_events: Avoid full rerender when marking unread.
Previously, when you did a "mark as unread from here" operation, we triggered 
a full rerender of both the recent topics view and the message feed. This was 
needlessly expensive, on and a large server with a somewhat busy CPU from 
other applications, can cause a visible lag, even when the message feed that 
you're looking at only has like 3 messages in it.

Improve this by passing the set of modified messages to the rerender.

There's likely further improvements to be made here -- we shouldn't need to
do more than toggle the unread markers -- but this should be good enough to
eliminate the visible lag.

Fixes #24263.
2023-03-06 10:39:47 -08:00
sbansal1999 d1253043a5 ts: Convert linkifiers.js to TypeScript. 2023-03-06 10:30:00 -08:00
Lauryn Menard b5f5ab948a puppeteer: Fix small logging copy and paste error in `admin.test.ts`. 2023-03-06 09:42:11 -08:00
Pranav Joglekar 2c316ce1ac
gear_menu: Update 'Support Zulip' link.
Previously the 'Support Zulip' option linked to Github Sponsors.
We now link to our own https://zulip.com/help/support-zulip-project,
which describes more options for how to support the project.

Fixes #24230.
2023-03-06 08:01:56 -08:00
Lauryn Menard f1e60014fa css: Move `pre code` reset rules to `rendered_markdown` class block.
Moves and simplifies the `pre code` rules in `rendered_markdown.css`
so that they are all part of the `rendered_markdown` class block.
2023-03-03 14:10:06 -08:00
Lauryn Menard 69e224cd87 templates: Add `rendered_markdown` class to confirm emoji warning.
Adds a `div` wrapper with the `rendered_markdown` class to the
content in `confirm_emoji_settings_warning.hbs`, so that the
inline code element has the intended CSS rules applied.

Because the `p` element also has the `rendered_markdown` class,
the margins for this element in the modal are slightly changed
(3px on top/bottom). Previously, the margins for this element were
being set from a bootstrap rule (10px on bottom).
2023-03-03 14:08:08 -08:00
Lalit 1b7f3eeb76 ts: Convert typing_data.js to TypeScript. 2023-03-03 12:04:42 -08:00
Lalit 88c23933bb util: Change parameter type of `sorted_ids` to `number[]`.
This function was mistyped; it was used in practice both accepting
string[] and number[], with the implementation taking advantage of the
fact that number.parseInt(<int>, 10) = <int>.

The only string[] callers were some overly defensive typing_data tests
that don't match the actual typing_data interface, so we remove the
string[] support and adjust the function's type, as well as those
tests.
2023-03-03 12:04:42 -08:00
Joelute 5762799d18 popovers: Remove background when hovering Github username.
When someone hovers over the Github username in the popover
with dark theme, a background will appear. These changes
ensures that the `background-color` isn't overwritten by
other CSS.
2023-03-03 11:46:30 -08:00
Joelute e44a87b271 documentation: Reduce `max-width` on content.
In the documentation, text-lines felt a bit too long
in text-heavy pages. This change aims to reduce
`max-width` on the content to 700px.

[CZO discussion](https://chat.zulip.org/#narrow/stream/19-documentation/topic/line.20wrapping.20code.20blocks/near/1516561)
2023-03-03 11:36:06 -08:00
Joelute e2346ab3ae documentation: Increase block width in help center.
After merging #24352, we want to increase the block
width in the help center to reduce the amount of
scrollbars that are shown. Thus, we decided to
remove `max-width` on all blocks.

[CZO discussion](https://chat.zulip.org/#narrow/stream/19-documentation/topic/line.20wrapping.20code.20blocks/near/1516561)
2023-03-03 11:36:06 -08:00
Sahil Batra 8a0b99cb39 streams: Align stream type icons in "Archive stream" modal.
This commit adds inline_decorated_stream_name component
which is used to show stream name along with its privacy
type icon. This component is added such that we can align
the icon and stream name properly as there are many
instances where the icon and name are not aligned in the
current UI.

This component is only used in "Archive stream" modal for
now and will be used for other UIs as well in future.
2023-03-03 11:10:45 -08:00
Ujjawal Modi 18059e132d user groups: Enabled sorting of subscribers.
The new `#groups` overlay does not allow sorting of subscribers.
This commit adds support for sorting of subscribers.
2023-03-03 11:03:12 -08:00
Lauryn Menard bfa8a2438b templates: Revise explanatory text in code playground org settings.
Revises descriptive text and examples at the top of the code
playgrounds tab in the organization settings overlay to be shorter,
have only one example that includes the name field.

Also, adds the `rendered_markdown` class to the HTML code elements,
via an HTML span element so that the specific CSS rules for code
elements with that class will be applied to these examples.
2023-03-02 18:14:35 -08:00
Lauryn Menard 23bac34f08 templates: Revise explanatory text/example in linkifiers org settings.
Revises descriptive text and examples at the top of the linkifiers
tab in the organization settings overlay to be shorter, have only
one example and updates help center link text for capitalization.

Adds a link to the help center in the form/input area for adding
a new linkifier, which is consitent with the code playgrounds tab,
and means the link would be there if the form was converted to a
modal.

Also, adds the `rendered_markdown` class to the HTML code elements,
via an HTML span element so that the specific CSS rules for code
elements with that class will be applied to these examples.
2023-03-02 18:14:35 -08:00
Aman Agrawal 4f8169aab5 tippy: Add comment justifying `parent` as `appendTo` default. 2023-03-02 13:51:00 -08:00
Lauryn Menard bb819b4928 css: Remove rules in `integrations.css` for code elements.
Removes the specific rules for code elements in the integrations
documentation pages.
2023-03-02 13:32:50 -08:00
Lauryn Menard 262debb72b css: Update code element styling for documentation pages.
Updates `markdown.css` to remove border styling from code
elements, and instead use background-color (as well as
font-family) to visually highlight inline code elements
as distinct from regular text.

Updates code element font-family to be the same as in
`zulip.css`.

Makes padding on the left and right the symmetrical for
inline code elements. Previously there was 4px padding on
the right, but not on the left.

Maintains anchor font-color styling for code elements that
are also links.
2023-03-02 13:32:50 -08:00
Lauryn Menard 3c63025d88 css: Remove code elements from bootstrap.css.
Updates `markdown.css` and `rendered_markdown.css` for the rules
in `bootstrap.css` that were being used to style code elements and
removes the now redundant/ignored rules from `bootstrap.css`.
2023-03-02 13:32:50 -08:00
Sahil Batra 734d1848c0 server_events_dispatch: Update bots list only if needed.
After b21f533af, we now update the organization bots
list on receiving realm_user events since non-admins
can also see bots not owned by them in the list.

But the functions to update bot list should be called
only for bot users and not for others, otherwise it
results in an error.

This can be reproduced by first opening the organization
bots list and then just updating the name of the user.
Calling `redraw_bots_list` on receiving "realm_user/add"
event for non bot users will not raise any error but
still we avoid redrawing the whole list when not required.

This commit fixes the code to call functions to update
bot list only when the event is received for a bot.
2023-03-02 13:26:20 -08:00
Anders Kaseorg 6eeeb70570 muted_topics_ui: Rename mute_topic parameter to fix shadowing bug.
This was broken by 6e6fb47e20 (#24386).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:22:05 -08:00
Anders Kaseorg 2a70c11c5f eslint: Fix unicorn/prefer-spread.
This was initially disabled for IE/Babel-related reasons that no
longer apply.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 941a9bab38 message_flags.test: Call send_read with an array.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 9d514a29d1 zjquery: Make FakeElement iterable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 6b3edb8b0d search_suggestion: Rename Attacher#concat to push_many.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Ujjawal Modi 5cf98d8653 streams: Allow sorting of stream members.
Stream members table in Create stream and stream subscribers UI
can now be sorted.
Fixes #21341
2023-03-01 17:29:01 -08:00
Trident Pancake 2c042ad100 typeahead: Suggest existing custom language in Code Playground settings.
The Code Playground feature can have multiple entries per language. So
the autocomplete for settings should return existing custom languages
too.
2023-03-01 17:02:44 -08:00
Trident Pancake 51bd3c8c8b typeahead: Show Code Playground entries in composebox typeahead.
This addresses #23935.
2023-03-01 17:02:44 -08:00