989 Commits

Author SHA1 Message Date
Sahil Batra
6e119842bd streams: Add API endpoint to get stream email.
This commit adds new API endpoint to get stream email which is
used by the web-app as well to get the email when a user tries
to open the stream email modal.

The stream email is returned only to the users who have access
to it. Specifically for private streams only subscribed users
have access to its email. And for public streams, all non-guest
users and only subscribed guests have access to its email.
All users can access email of web-public streams.
2023-11-16 16:28:14 +00:00
Sahil Batra
0a3800332f streams: Remove "email_address" field from Subscription objects.
This commit removes "email_address" field from Subscription objects
and we would instead a new endpoint in next commit to get email
address for stream with proper access check.

This change also fixes the bug where we would include email address
for the unsubscribed private stream as well when user did not have
permission to send message to the stream, and having email allowed
the unsubscribed user to send message to the stream.

Note that the unsubscribed user can still send message to the stream
if the user had noted down the email before being unsubscribed
and the stream token is not changed after unsubscribing the user.
2023-11-16 11:11:26 -05:00
Karl Stolley
a4c2f27bd5 tests: Disable flaky test_edit_bot_form test. 2023-11-15 10:50:00 -08:00
Anders Kaseorg
41a6511924 typos: Fix typos caught by typos.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 4cb2eded68)
2023-11-15 10:13:24 -08:00
Anders Kaseorg
3a2a217fa0 codespell: Fix typos caught by codespell.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
(cherry picked from commit 7b4a74cc4d)
2023-11-15 10:13:24 -08:00
Tim Abbott
839c86ead5 css: Fix backporting error of back-to-login button.
In 7.x, this was invalid syntax with our postcss-preset-env configuration.

See the following for context:

https://chat.zulip.org/#narrow/stream/49-development-help/topic/webpack.20exception.20running.207.2Ex/near/1641309
https://chat.zulip.org/#narrow/stream/2-general/topic/CSS.20nesting.20syntax/near/1528649
2023-09-15 12:04:38 -07:00
Daniil Fadeev
276830b275 left_sidebar: Fix the layout for filter names that are long. 2023-09-15 10:22:55 -07:00
Karl Stolley
49d7830886 compose: Render Mac-specific Cmd, Return at compose bottom. 2023-09-15 10:22:55 -07:00
Aman Agrawal
9c272d6ca7 portico_signin: Fix back to login button alignment.
(cherry picked from commit eda91378ec)
2023-08-23 01:41:09 +00:00
David Rosa
1ae5194619 docs: Update .html links pointing to "Upgrade Zulip" or "Modify Zulip".
Follow-up to #24089.

(cherry picked from commit d205850d54)
2023-08-14 22:06:10 +00:00
Akshat
7a448010e2 message_view_header: Fix bad rendering of stream links in description.
This bad rendering was the result of unwanted css applied
in the stream description. In message view header, the stream
link (title) we have defined has css defined but the markdown
rendered stream link in stream description had the same class
resulting in unwanted css applied to it.

Fixes: #25961.

Signed-off-by: Akshat <akshat25iiit@gmail.com>
(cherry picked from commit d302ac4a18)
2023-07-19 18:02:27 -04:00
Karl Stolley
217f5731fe stream_settings: Fix scroll at max-height.
Simplebar seems unaware of the `max-height: 1000px` on
`.subscriptions-container`, and therefore does not properly provide
a scrollbar when it's needed.

This commit adds a `max-height` to the stream Simplebar container,
ensuring that otherwise hidden content that Simplebar believes to
be visible can be scrolled to.

Finally, rather than rely on magic numbers or math done in comments,
this commit establishes CSS variables for all relevant modal-element
heights, doing the math inline using CSS calc().

Fixes #26107.

(cherry picked from commit 0c55fb7e89)
2023-07-03 18:51:58 +00:00
Karl Stolley
ca0fd7f797 bot_icon: Adjust bot-icon color for light and dark modes.
(cherry picked from commit a9bc5e94e7)
2023-07-03 18:51:37 +00:00
Lauryn Menard
2e03e1b6ee narrow: Mark as read in by_recipient based on case ("dm" or "stream").
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.

(cherry picked from commit c5fbd3f085)
2023-07-03 18:49:31 +00:00
Daniil Fadeev
0ac81a1b77 compose_banner: Remove uploads banners when clearing compose box.
Upload banners were not cleared after closing compose box, which meant
that they would remain present in a paused state after compose was reopened.

https://chat.zulip.org/#narrow/stream/9-issues/topic/Incomplete.20Upload.20banner.20remains.20on.20closing.20compose/near/1582602
(cherry picked from commit daab1d4265)
2023-07-03 18:49:10 +00:00
Sahil Batra
5f397e5fa8 stream_settings: Fix height of select elements.
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.

(cherry picked from commit b119ff68c3)
2023-07-03 18:47:31 +00:00
Daniil Fadeev
8ff2684d61 compose: Fix keyboard indicator appearance in send shortcut.
(cherry picked from commit b13a85cdbf)
2023-07-03 18:46:41 +00:00
Daniil Fadeev
016f53711d compose: Fix keyboard indicator vertical alignment in send shortcut.
(cherry picked from commit 83b4fef060)
2023-07-03 18:46:41 +00:00
Alex Vandiver
2e16e27265 ui_init: Fix typo in error data. 2023-06-12 16:04:18 -04:00
Karl Stolley
f5e2a2a38f popovers: Reorganize Tippy onShow logic for stream popover.
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.
2023-06-12 16:04:18 -04:00
Brijmohan Siyag
2f04875ad3 send_later: Wildcard mention throwing error on send later.
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.
2023-06-12 16:04:18 -04:00
Anders Kaseorg
5b07bf767b landing-page: Add Microsoft Store download link.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-05-31 08:16:59 -07:00
Aman Agrawal
634a771a37 hotkey-hint: Fix text not middle aligned at different zoom levels.
* 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??
2023-05-31 00:23:57 -07:00
Tim Abbott
3c60e538f9 people: Downgrade late added user errors for spectators.
As noted in the comment, this condition is expected to happen for
spectator users.
2023-05-30 20:45:18 -04:00
Aman Agrawal
a47d204ca0 stream_ui_updates: Only update UI if the stream is being edited.
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.
2023-05-30 14:50:24 -07:00
Aman Agrawal
086db7621c css: Use a variable to track bottom_whitespace height.
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.
2023-05-30 12:41:08 -07:00
Aman Agrawal
839af9ed8d compose: Update max-height when compose banner is displayed.
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.
2023-05-30 12:41:08 -07:00
Aman Agrawal
7706d64530 resize: Extract method to get bottom whitespace.
Minor optimization to reduce left sidebar and right sidebar
calculation when we just want to update bottom whitespace height.
2023-05-30 12:41:08 -07:00
Aman Agrawal
0f4bccd107 recent_conversation: Make all topics visible with compose open.
Fixes #25751
2023-05-30 12:41:08 -07:00
Aman Agrawal
43b83588c9 recent_conversation: Move padding to filter buttons.
This removes it from being included in the max-height of the table.
2023-05-30 12:38:17 -07:00
Aman Agrawal
e2ac125a6d recent_conversation: Fix incorrect min-height dimension. 2023-05-30 12:36:40 -07:00
Karl Stolley
d720ce4b4e popovers: Register mobile compose tooltip on button container.
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.
2023-05-30 12:27:20 -07:00
Lauryn Menard
892c5f48f7 narrow: Mark as read when narrowing by_topic or by_recipient.
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.
2023-05-30 12:26:36 -07:00
Lalit
56463ce921 ts: Convert internal_url.js to TypeScript. 2023-05-30 10:45:01 -07:00
Karl Stolley
30b7da34e0 css: Size stream recipient box for small screens.
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).
2023-05-30 10:39:25 -07:00
Anders Kaseorg
3ca131743b CVE-2023-33186: Fix topic tooltip cross-site scripting vulnerability.
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>
2023-05-29 16:35:49 -07:00
Sahil Batra
200d43d4cd alerts: Fix vertical alignment of "x" button.
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.
2023-05-29 14:49:32 -07:00
Sahil Batra
7f4f905ec8 message: Show error while resolving/unresolving topic.
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.
2023-05-29 14:49:32 -07:00
Zixuan James Li
7a5d3e164e linkifier: Remove unused debug message.
This is a follow-up to #23125.

Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-05-29 14:40:55 -07:00
Aman Agrawal
ecc1433d02 compose_recipient: Improve post recipient selection behaviour.
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.
2023-05-29 08:59:18 -07:00
Aman Agrawal
f3aeabaeec dropdown_widget: Add a on_hidden_callback. 2023-05-29 08:59:18 -07:00
Aman Agrawal
51a7c94b9c compose_recipient: Extract update_recipient_label. 2023-05-29 08:59:18 -07:00
Aman Agrawal
230b3f075b scroll_bar: Fix overlapping right sidebar and browser scrollbars.
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.
2023-05-29 08:50:06 -07:00
Sahil Batra
4724d45abd settings: Rename "Full name" label to "Name" in bot modals.
This commit renames "Full name" label to "Name" in bot creation
and bot edit modal.
2023-05-29 08:47:09 -07:00
Aman Agrawal
ea9992d853 overlays: Use close_overlay to close overlays!
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.
2023-05-29 08:29:47 -07:00
Aman Agrawal
db26f2b2fc resize: Use autosize on window resize.
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.
2023-05-29 08:12:34 -07:00
Aman Agrawal
9c2ffaf1b3 message_list_view: Fix incorrect comparison.
`this` is MessageListView here while `message_lists.current` is
MessageList.
2023-05-29 08:06:00 -07:00
Aman Agrawal
a1ba41ce66 message_list_view: Discard unused variable. 2023-05-29 08:06:00 -07:00
Tim Abbott
1f8b3fd09a css: Fix fluid_layout_width setting.
0457f6807c seems to have accidentally
inverted the setting; we also clean up duplicate declarations of this
1400px value.
2023-05-28 22:06:16 -07:00
Alya Abbott
c97deb6be2 help: Tweak docs on keyboard shortcuts for composing messages.
- Adjust the order in keyboard shortucts help menu and help center.
- Make minor wording improvements.
2023-05-28 19:18:34 -07:00