Commit Graph

51153 Commits

Author SHA1 Message Date
Aman Agrawal b33438eb55 css: Move `10px` navbar bottom padding above message header.
This is a more natural place for this extra padding than below the
navbar. Padding below navbar was primarily needed to hide the
message content above the sticky header while scrolling the message feed.
We are still able to do with this change without partially hiding the
loading message indicator.

Fixes #25159
2023-04-28 12:48:10 -07:00
Lalit 0d51e2d1f9 left_sidebar: Add same styles to schedule messages row as all other rows.
This fixes the bug where the schedule message whole row was not clickable
and had some padding issues. By adding same styles as all other rows in
left sidebar we eliminate those bugs.
2023-04-28 12:44:59 -07:00
Karl Stolley df508659db css: Lighten button border for visibility.
This replaces the previous dark border.

A pure white border looked a little too garish, so this dials back the
alpha channel just a bit.

Fixes: #25303.
2023-04-28 12:44:30 -07:00
Karl Stolley 942eb7b375 css: Pad send button for click comfort. 2023-04-28 12:44:30 -07:00
Karl Stolley d9654f4f0a css: Introduce padded vdots for send later.
This uses eyeballed vertical padding on the nested .zulip-icon class
to ensure that the entire send-later button area is clickable (and
not merely hoverable).
2023-04-28 12:44:30 -07:00
Alex Vandiver 4f2417cfc4 soft_reactivation: Add a partial index to speed up event lookups.
The full auditlog table is moderately large, and the previously-chosen
index (on `modified_user_id`) is not terribly specific.
2023-04-28 12:43:34 -07:00
Alex Vandiver a56da4be76 soft_deactivation: Only fetch necessary columns.
Existing tests verify that this does not add more queries.
2023-04-28 12:43:34 -07:00
Alex Vandiver ae7485a96e soft_deactivation: Do not bother to fetch stream data as well.
This prefetch is unnecessary and makes this query load more data than
needed.

Existing tests verify that this does not add more queries.
2023-04-28 12:43:34 -07:00
Aman Agrawal 2deec692f6 dark_theme: Fix dark recipient background in light theme for spectators.
Since, we didn't update `user_settings.color_scheme` for spectators
and our recipient bar color calculations were based on it, this
resulted in a wrong recipient bar color if the OS default color
scheme of the user was different from `spectator-theme-preference`
set by the user using the gear menu.

To reproduce the bug:
* Set preferred color scheme to `dark` in your OS settings / Chrome
  dev tools.
* Login as spectator in Incognito.
* Switch to light theme.

You will see dark background colors in recipient bars.
2023-04-28 12:39:46 -07:00
Lauryn Menard f574bd4952 narrow: Fix "pm-with" narrow in scheduled messages. 2023-04-28 12:38:29 -07:00
Tim Abbott a03dca93ca message_edit: Clarify losing_access_user_ids calculation.
This was previously called delete_event_notify_user_ids, which seemed
to narrow its purpose in a way that was confusing given that it's also
used for other calculations.

Further, calculate it as soon as we know it, not when we're first
going to use it.
2023-04-27 18:35:32 -07:00
Tim Abbott 71e57d2022 message_edit: Clarify name for gaining_usermessage_user_ids.
This list contains user IDs, not subscription objects.
2023-04-27 18:35:32 -07:00
Tim Abbott 3ff361a1f0 message_edit: Use sets for old/new stream IDs.
This fixes a quadratic performance issue iterating through these
lists. Give these variables slightly better names while we're at it.
2023-04-27 18:35:32 -07:00
Tim Abbott 496b403fcf tooltips: Add new central tooltip template store.
We should migrate all the static content tooltip templates to this
file to avoid duplicate DOM elements.
2023-04-27 18:12:32 -07:00
Hardik Dharmani ea6ae50326 tooltips: Add tippy tooltip for view_user_card.
Added modern tippy tootip for view_user_card tooltip by adding a
<template> with id=view-user-card-tooltip-template for the element.

Fixes part of #24311.
2023-04-27 18:12:32 -07:00
Tim Abbott 6aea3f2be5 tooltips: Use tippy tooltip for stream list toggle. 2023-04-27 18:12:32 -07:00
Hardik Dharmani dcfd374f2f left_sidebar: Correct hotkey for `All direct messages` tooltip. 2023-04-27 18:12:32 -07:00
Hardik Dharmani 941c15b802 tooltips: Add tippy tooltip for search_query.
Added tippy tooltips for search_open, search_close icon and
search_query input field with hotkey hint `/' by adding a class
`.tippy-zulip-delayed-tooltip` which adds tooltip with
LONG_HOVER_DELAY and default placement top with fallback placement
equal to bottom.

Added tippy tooltip with text `Close` on `.search_close_button`.

Fixes part of #24311
2023-04-27 18:12:32 -07:00
Hardik Dharmani 9c866f9be1 tooltips: Add tippy tooltip for message expander/condenser.
Added tippy tootip for '.message_expander' and
'.messsage_condenser' by adding '.tippy-zulip-delayed-tooltip' class,
and creating 2 <template> with id equal to crresponding
data-tooltip-template-id of the elements.

Fixes part of #24311
2023-04-27 18:12:32 -07:00
Hardik Dharmani 15a15240da tooltips: Add tippy tooltips in manage stream settings.
Added tippy tooltips for create_stream_plus_button and
preview-stream-button in manage stream settings by adding
class `.tippy-zulip-delayed-tooltip` which add tooltips
with LONG_HOVER_DELAY. Added data-tippy-placement="bottom"
to match with 'Archive stream' tooltip.

Created a new tooltip for sub_unsub_button in tippyjs with
class .toggle-subscription-tooltip that has
EXTRA_LONG_HOVER_DELAY, placement equals to bottom
and appended to body.

Fixes part of #24311.
2023-04-27 18:12:32 -07:00
Hardik Dharmani 394fcbfd51 tooltips: Add tippy tooltip for userlist-toggle icon with hotkey hint `W`. 2023-04-27 18:12:32 -07:00
Hardik Dharmani 892bd38062 tooltips: Use tippy for `gear-menu` icon with hotkey hint `G`.
Fixes part of #24311
2023-04-27 18:12:32 -07:00
Hardik Dharmani 7785fb2948 tooltips: Add new tippy configuration `.tippy-zulip-delayed-tooltip`.
Added new tippy tooltips configuration with target class
`.tippy-zulip-delayed-tooltip` which add tooltips with
`delay: LONG_HOVER_DELAY`, appended to body, and have a
default placement top with fallback placement equal to bottom.

Fixes part of #24311
2023-04-27 18:12:32 -07:00
Palash Baderia c10d33d23c tippy: Remove the focus trigger from the compose-control-buttons.
By default, tippyjs uses a trigger value of 'mouseenter focus',
which means that the tooltips can appear either when the element
is hovered over or when it receives focus (e.g., by being clicked).
Because of this, if you click on the button to open the popover,
the tooltip also appears. To prevent this behavior, we need to
remove the 'focus' trigger from the buttons so that the tooltips
don't appear when the buttons are clicked.

Fixes: #25277
2023-04-27 17:36:48 -07:00
evykassirer 19d5fedfd2 compose: Move functions around to reduce circular imports. 2023-04-27 17:04:19 -07:00
evykassirer 0e13134be2 stream header colorblock: Remove unnecessary `find`. 2023-04-27 17:04:19 -07:00
evykassirer f9bf688c9e compose: Add DM icon to the recipient dropdown.
This commit adds the new users icon and uses it in the
recipient dropdown, both in the selection options and
the selected option displayed on the button.
2023-04-27 17:04:19 -07:00
evykassirer 408bdc2273 compose recipient: Move DM to bottom of dropdown when feature is disabled. 2023-04-27 17:04:19 -07:00
evykassirer 18312be6db compose: Add ability to switch to PM in stream dropdown.
Fixes #3409
2023-04-27 17:04:19 -07:00
evykassirer e4fc197871 click handlers: Don't move focus for clicks in compose box while composing.
If a click happens somewhere within compose, we don't want to cancel compose
and we also don't necessarily want to refocus the cursor in the compose
text area.

This change was made because clicks in the compose recipient dropdown
were hitting the first `if` statement and moving focus to the text area
when it should have gone to the topic or PM recipient input fields.
This `if` block was originally written for clicking external links and
codeblocks, which are outside of the #compose div and won't be affected
by this change.
2023-04-27 17:04:19 -07:00
evykassirer 0634457731 compose: Deduplicate code for fetching recipient switcher options. 2023-04-27 17:04:19 -07:00
evykassirer 6c797904f2 compose: Let recipient switcher change width with content. 2023-04-27 17:04:19 -07:00
evykassirer 695946746e compose: Rename stream selection widget to "select_recipient".
Previously this dropdown was only for selecting streams, but
soon it will also be for switching to a private message. This
name helps it be clearer that the dropdown is more general
purpose.
2023-04-27 17:04:19 -07:00
Prakhar Pratyush c8a9c0ee04 realm_redirect: Redirect always to the login page with the next parameter.
Previously, entering an organization via 'accounts/go' with the
web-public stream enabled took the user to the web-public view
even if the user was not logged in.

Now, a user is always redirected to the 'login_page' with
the next parameter, if present.

The 'login_page' view is updated to redirect an authenticated
user based on the 'next' parameter instead of always redirecting
to 'realm.uri'.

Fixes #23344.
2023-04-27 16:50:10 -07:00
Anders Kaseorg 13545ff885 stripe: Fix invoice_plans_as_needed default value.
Python evaluates default values once when the function is defined, not
when it is called.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-04-27 16:43:33 -07:00
Tim Abbott 7ae7b753da help: Improve /help/add-a-custom-linkifier page.
- Structure page around linkifier use cases.
- Add documentation (with examples) for advanced lnkifier types.
- Put examples in to tabs blocks.
2023-04-27 15:39:54 -07:00
Karl Stolley b6c656ed73 docs: Clarify python3 installation requirements.
This should help miscueing users into thinking that the provisioning
steps, etc. are a part of the python3 installation--which is now more
explicitly aimed at Centos, Fedora, and RHEL users.
2023-04-27 13:55:59 -07:00
Karl Stolley e9315e67b8 docs: Move uninstall warning up top. 2023-04-27 13:55:59 -07:00
N-Shar-ma 4dc1b2f812 typeahead: Always show exact matches first for streams and users.
We refactor the triage function to optionally take in a comparator
function, and use this to sort the results, except any exact match,
which is placed highest. Now we don't need to sort the results of triage
for streams, languages and slash commands since we just pass in the
comparator function. The overall effect is same as before, except that
exact matches are always shown first.

For users, we can't use the new triage feature to achieve this goal
without sorting `rest` and breaking a key optimization, so we just add
a bit of manual code for the job.

Fixes: #25123.
2023-04-27 12:45:26 -07:00
Sahil Batra 7eacd525b4 compose: Show banner if user is not allowed to post in the stream.
We now show a banner on opening the compose box and changing the
stream in dropdown, if a user is not allowed to post in a stream.

The "Send" button is also disabled if user is not allowed to post
in the stream.

This commit also moved the CSS for disabled modal button in dark
theme below after the other CSS for modals as we are using the
same CSS for the "Send" button as well in disabled state.
2023-04-27 12:31:40 -07:00
Sahil Batra e02111e458 compose: Show all accessible streams in stream dropdown menu.
We now show all the streams, even if user is not allowed to post
in them, in the stream dropdown in compose box. In further commits,
we would add a banner mentioning that user is not allowed to post
for such streams.
2023-04-27 12:31:40 -07:00
Sahil Batra afc5066e36 registration: Fix "Resend" link not working for realm creation.
The "Resend" link for realm creation was not working correctly
because it is implemented by basically submiting the registration
form again which results in resending the email but all the
required parameters were not passed to the form after recent
changes in the realm creation flow.

This commit fixes it by passing all the required parameters -
email, realm name, realm type and realm subdomain, when submitting
form again by clicking on the "resend" link.

Fixes #25249.
2023-04-27 12:28:37 -07:00
Sahil Batra f8f4fa4c5e tests: Extract realm name and string_id values in variables.
This is a prep commit so that we can use these variables to
verify the urls in next commit.
2023-04-27 12:28:37 -07:00
Sahil Batra 850e0046eb models: Add ORG_TYPE_IDS constant field to Realm.
This commit adds ORG_TYPE_IDS constant field to Realm class
such that it can be used when we want to validate the org_type
passed in request. This was previously defined in realm.py, but
we move it inside Realm class such that we can use it at other
places as well.
2023-04-27 12:28:37 -07:00
Alex Vandiver 2f4775ba68 wal-g: Write out a logfile.
Otherwise, this output goes into `/var/spool/mail/postgres`, which is
not terribly helpful.  We do not write to `/var/log/zulip` because the
backup runs as the `postgres` user, and `/var/log/zulip` is owned by
zulip and chmod 750.
2023-04-27 12:19:43 -07:00
Karl Stolley 67f3cb67c5
left-sidebar: Provide link to scheduled messages.
This provides a basic link to view scheduled messages. At present, the
link is always visible, and it does not yet include a scheduled-message
count.

Fixes part of #25101.
2023-04-27 12:13:59 -07:00
Tim Abbott 07cb08b8c5 message_row: Share most CSS for /me message senders.
This fixes a bug where clicking on a /me message sender would display
a focus outline incorrectly, and likely also overflow-related bugs.
2023-04-27 11:42:21 -07:00
Tim Abbott 9847e7024a message_row: Add sender_name_padding for /me messages.
This fixes the region between the avatar and the sender name in /me
messages not being part of the blue hover/highlight region for the
sender's user card.
2023-04-27 11:42:21 -07:00
Tim Abbott ab0c5f3092 message_row: Shrink sender_info_hover region.
The sender_info_hover region incorrectly filled the full row to the
right of the sender's name, resulting in the blue highlight being
visible in parts of the message that should be just the message body.

Fix this by moving the selectors for it further down in the DOM.

Fixes #25276.
2023-04-27 11:42:21 -07:00
Lalit 866c91d5a5
info_overlay: Fix initial keyboard focus in keyboard shortcuts help.
The core bug here was that we opened the overlay after setting up the toggler
widget; this meant that the call to focus the correct element in the toggler 
widget setup code path was ignored due to it not being possible to focus an
element that is hidden.

Fix this bug by reordering the execution of things, now we first open
the overlay to make sure that the content is available to be focused when
setting up the toggler.
2023-04-27 10:34:18 -07:00