Commit Graph

49734 Commits

Author SHA1 Message Date
Sahil Batra 43898be138 settings_org: Rename custom_days option to custom_period.
This commit renames custom_days option for realm waiting
threshold setting dropdown to custom_period such that we
can reuse existing code for similar time-limit settings.
2023-01-20 12:45:53 -08:00
Tim Abbott 235768ae4c setting: Remove now unused dependant-inline-block class. 2023-01-20 12:39:28 -08:00
Ningxi Zhang 69d8101c6a settings: Move the retention days input below the dropdown.
Moved the "Retention period (days):" under the dropdown "Custom".

This is consistent with similar date window inputs elsewhere, and
conveniently just requires changing a single class.

Fixes: #23532
2023-01-20 12:38:04 -08:00
Ningxi Zhang e6cf074929 settings: Improve wording of retention period options.
Replaced the "Retain for N days after posting" option with "Custom".
Only show the spot for entering the time if that option is selected.
Labeled the custom time like we do for message editing:
"Retention period (days): [ ]".

This is now consistent with similar settings.

Fixes part of #23532.
2023-01-20 12:37:42 -08:00
Alex Vandiver e19d4e5e0a docs: Mention probably needing to allow port 22 for SSH access. 2023-01-19 17:31:13 -08:00
Sahil Batra ca845a6f76 bootstrap: Remove form-horizontal CSS from bootstrap.css.
This commit removes all CSS rules for form-horizontal class
from bootstrap.css. We have already removed instance of
this class in previous commits.
2023-01-19 17:26:58 -08:00
Sahil Batra 802deb1761 settings: Remove form-horizontal class from modal templates.
This commit removes form-horizontal class from various modal
templates. We add CSS for margin-bottom property for select
and input elements to keep the design same as before. Most
of the added CSS can be removed once we remove bootstrap
CSS completely for these elements.

We can safely remove this class since vertical-align property
is already present due to other bootstrap CSS. And
margin-bottom property for checkbox inputs are added by
bootstrap and for text inputs inside ".new-style" element it
is handled in app_components.css. For other inputs, this commit
adds CSS as mentioned above.

The display property for inputs other than checkbox and select
elements is set to inline-block by other bootstrap CSS.
For checkbox-type inputs browser sets display property to
inline-block but it is eventually computed to "block" as the
float property is set to left and so it is not required to
set display property for checkbox type inputs.
2023-01-19 17:26:58 -08:00
Sahil Batra 8b7a911b0e settings: Remove form-horizontal class from settings template.
This commit removes form-horizontal class from form elements
in user profile, org profile, org settings and org permission
pages. We also add margin-bottom property for select elements
in this page.

We can safely remove this class since vertical-align property
is already present due to other bootstrap CSS.
And margin-bottom property for checkbox inputs are added by
bootstrap and for text inputs it is handled in
app_components.css.

The display property for inputs other than checkbox and select
elements is set to inline-block by other bootstrap CSS.
For checkbox-type inputs browser sets display property to
inline-block but it is eventually computed to "block" as the
float property is set to left and so it is not required to
set display property for checkbox type inputs.

We have added CSS for select elements in settings.css which can
be removed later once we remove bootstrap for select elements
completely.
2023-01-19 17:26:56 -08:00
Sahil Batra a144166e12 settings: Remove form-horizontal class from notification settings.
This commit removes form-horizontal class from time-limit-setting
div in notfication_settings.hbs. We can safely remove this class
since display and vertical-align properties are applied for select
and input elements by other bootstrap CSS, the margin-bottom
property for custom input is applied by existing CSS in
app_components.css and this commit adds margin-bottom property for
select elements.

The CSS added in this commit will probably be removed once we
remove bootstrap CSS rules for select elements completely.
2023-01-19 17:26:11 -08:00
Sahil Batra aa7329e18b settings: Remove form-horizontal class in org settings pages.
This commit removes form-horizontal class from form elements
in custom-emoji, linkifiers, playgrounds, default-streams,
default-user-settings, auth-methods and user privacy settings
templates.

We can safely remove this class because vertical-align property
for input elements is set by other bootstrap CSS and margin
property for text inputs is set in app_components.css and for
checkbox inputs it is set by bootstrap itself.

The display property for inputs other than checkbox and select
elements is set to inline-block by other bootstrap CSS.
For checkbox-type inputs browser sets display property to
inline-block but it is eventually computed to "block" as the
float property is set to left.
2023-01-19 17:24:49 -08:00
Sahil Batra 1a0e8af4a9 settings: Remove unnecessary form-horizontal class.
This commit removes form-horizontal class from form
elements in alert-words, realm-exports and user-privacy
pages.

We can safely remove this class since there is no select,
input, help-inline or input-append child elements for these
and thus this class is not used for applying any CSS rules.
2023-01-19 17:24:49 -08:00
Sahil Batra da9cfa206a topic_edit_form: Remove form-horizontal class.
This commit removes form-horizontal class from form element
of inline topic edit form. We can safely remove this class,
since all properties applied by bootstrap using this class
are already overridden by specific CSS for the input element
in zulip.css.
2023-01-19 17:24:49 -08:00
Sahil Batra 48dec70099 invite: Remove form-horizontal class from invite modal.
This commit removes form-horizontal class from invite_user
template. We can safely remove this class as vertical-align
property is already handled for input and select elements
by other bootstrap CSS.

For checkbox type inputs, the display property is already
set to inline-block by browser for all input elements but
it is eventually computed to "block" since float property
for this element is set to left. So, setting display
property is not necessary for checkbox input.

We add margin-bottom property CSS for now and that can
eventually be removed when we remove bootstrap CSS for
these elements completely.
2023-01-19 17:24:48 -08:00
Sahil Batra a05b0b8d23 portico: Remove form-horizontal class from some portico pages.
This commit removes form-horizontal class from password reset
pages (page in which user enters the email and the page where
user sets the new password) and user register page.

We can safely remove the form-horizontal class, since the
vertical-align property is already applied by other CSS
in bootstrap and margin is overridden by CSS in
portico_signin.css.

For checkbox type inputs, the display property is already set
to inline-block by browser for all input elements but it is
eventually computed to "block" since float property for this
element is set to left. So, setting display property is not
necessary for checkbox input.

For the help-inline elements, the display and margin properties
are overridden in portico_signin.css and vertical-align property
is handled by CSS for "help-inline" class in bootstrap.css.
2023-01-19 17:24:14 -08:00
Sahil Batra 3920a73b20 social_auth_select_email: Remove form-horizontal class.
This commit removes form-horizontal class from form elements
in social_auth_select_email.html. There is no visible input
element in the form element so the bootstrap CSS using
"form-horizontal" class does not apply to any of the elments
in the page, so removing this class does not have any affect.

The "form-horizontal" class is used in portico-signin.css for
adding hover behavior, so we add a new class "select-email-form"
and use it to add the hover behavior.
2023-01-19 17:24:14 -08:00
Sahil Batra 90dbc50c8c tos: Remove form-horizontal class from account_accept_terms template.
This commit removes form-horizontal class from account_accept_terms
template. We can safely remove this class because vertical-align
property is already handled for input element by other bootstrap CSS
and margin is overridden by CSS in portico.css. The display property
is already set to inline-block by browser for all input elements
but it is eventually computed to "block" since float property for
this element is set to left.

For the "p" element used to display errors, the display and margin
properties are overridden in portico_signin.css and vertical-align
property is handled by CSS for "help-inline" class in bootstrap.css.
2023-01-19 17:24:14 -08:00
Sahil Batra 8024766b27 support: Remove form-horizontal from form element in support request page.
We can safely remove the form-horizontal class from form element in
support request page, since the display and vertical-align are already
applied by other CSS in bootstrap and margin is overridden by CSS in
portico_signin.css.
2023-01-19 17:24:14 -08:00
Lalit 112df91fbd provision: Do not require that no other yarn precedes us in $PATH.
`check_version` in `install-yarn` had the rather careful check that
the yarn it installed into `/usr/bin/yarn` was the yarn which was
first in the user's `$PATH`.  This caused problems when the user had a
pre-existing `/usr/local/bin/yarn`; however, those problems are
limited to the `install-yarn` script itself, since the nearly all
calls to yarn from Zulip's code already hardcode the `/srv/zulip-yarn`
location, and do not depend on what is in `$PATH`.

Remove the checks in `install-yarn` that depend on the local `$PATH`,
and stop installing our `yarn` into it.  We also adjust the two
callsites which did not specify the full path to `yarn`, so use
`/srv/zulip-yarn`.

Fixes: #23993

Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2023-01-19 17:51:52 -05:00
Tim Abbott 4811443b3d apps: The Ferdi project died and was replaced by Ferdium. 2023-01-19 11:47:07 -08:00
Tim Abbott 38060e1c0a help: Fix broken link on updated SCIM page.
This was introduced in 0bd3f1dce2.
2023-01-19 11:43:14 -08:00
David Rosa f70b321773 help center: Document bot name in org settings link to bot's user card.
Documents link to the bot's user card from the bot's name in
Organization settings > Bots, and information in the bot's user card.

Fixes part of #23970.
2023-01-19 11:13:33 -08:00
Palash Baderia 4901a0d19b settings: Link organization settings users to user cards.
This makes it easier to browse details on users and bots when
interacting with them in the settings interface.

While the original issue was about just the bots panel, this is
clearly useful for all users.

Fixes: #23970.
2023-01-19 11:13:33 -08:00
David Rosa 0bd3f1dce2 help center: Update "SCIM provisioning" page.
Updates page to match help center documentation patterns,
and to use the newly added macros.

Fixes: #22890.
2023-01-19 11:09:15 -08:00
David Rosa e747fa893d help center: Update "Import from Gitter".
Updates the help center article to match the style and formatting
of "Import from Slack" and replaces existing content with its
corresponding Markdown macro.
2023-01-19 10:58:17 -08:00
Aman Agrawal a31df1d58b css: Don't render message failed buttons.
We used to make message failed button (retry / cancel) invisible
when the message is successfully send instead of not rendering them.
This resulted in them being accessible via keyboard when they are not
visible. I couldn't find a reason for retry and cancel buttons to
use `visibility` to be hidden instead of just being not rendered via
`display: none`.
2023-01-19 10:57:14 -08:00
Praveen Kumar 5b89f34f48
message_failed: Hide focus rectangle while animating.
The focus rectangle would spin along with the arrows, which looked bad.

We do want to allow focus rectangles on this element for keyboard interaction,
so we just disable the focus rectangle during the animation.

Fixes #24110.
2023-01-19 10:40:27 -08:00
Evy Kassirer cc35e2f9b2
navbar: Remove stale .rightside-userlist CSS class.
Since fbe9a9e539, the top_navbar element
unconditionally has the rightside_userlist class. There's some CSS
associated with this class NOT being present, which can be deleted as having
no effect, and then we can remove the class as having no effect as well,
2023-01-19 10:37:38 -08:00
Aman Agrawal 863ec70955 message_body: Structure hidden message similar to a normal message.
Messages sent by muted users are hidden. To make sure they are
displayed properly, we provide them a HTML structure similar to
that of a normal message so that any CSS applied to a normal
message also applied to it.

This fixes message controls being misaligned in hidden message.
2023-01-19 09:04:37 -08:00
Akarsh Jain 82aa15cb38 subscribers: Add warning when last user unsubscribes from private stream.
This commit adds a warning to the confirmation modal displayed when
the last user of a private stream attempts to unsubscribe. The warning
explains that, as the only subscriber, unsubscribing will result in the
stream being automatically archived. This change helps ensure that users
are aware of the consequences of their actions and can make informed
decisions.

Fixes: #23954
2023-01-18 16:12:07 -08:00
Alya Abbott f26260c52a contributor docs: Refer to How we communicate in Design discussions. 2023-01-18 16:07:49 -08:00
Alya Abbott 1e3fb6a149 contributor docs: Add How we communicate page. 2023-01-18 16:07:49 -08:00
Alya Abbott 039d0032a9 help center: Document Participants column in Recent conversations. 2023-01-18 16:06:07 -08:00
Aman Agrawal a13058223d compose: Don't allow same message to be sent twice.
It is possible to send the message twice by clicking send button
very quickly twice or by pressing enter and send button simultaneously.

This can be easily reproduced for large messages sent in a stream
narrow. Hard to reproduce for small messages or in PM narrows.

I was not able to reproduce locally, but was able to reproduce on
chat.zulip.org. So, this is an untested bug fix.

Fixes #22562
2023-01-18 16:04:58 -08:00
David Rosa 5fd4d3f053 help center: Update "Import from Rocket.Chat".
Updates the help center article to match the style and formatting
of "Import from Slack" and replaces existing content with its
corresponding Markdown macro.
2023-01-18 16:01:45 -08:00
Duncan e582055d2a help center: Add mobile instructions to "Mute a topic".
Fixes #22146.
2023-01-18 16:00:12 -08:00
Duncan 52d6cf1050 help center: Consolidate "Mute a topic" instructions into one list.
The message recipient bar instructions are now contained in a tip
block, as suggested in #22178.
Refines wording for unmuting topics on desktop/web.

This will allow adding mobile instructions to the article.
2023-01-18 16:00:12 -08:00
David Rosa 81a4b8c477 help center: Document quote-and-reply mobile feature.
Updates Quote and reply help center article to add instructions
for how to use this feature on mobile.

Fixes: #23752.
2023-01-18 15:53:27 -08:00
N-Shar-ma 963e1412b5 typeahead: Add message view context to PM recipient suggestions.
Uptil now when composing PMs, only for @-mentions was the stream / topic
being viewed taken into consideration. The PM recipient suggestions were
unaffected by the current view.

Now this context has been added to the PM recipient suggestions as well,
ensuring consistent sorting of options across both typeahead menus, with
subscribers and recent posters to that stream / view getting priority.

When the view is not narrowed to a stream / topic, the PM suggestions
are sorted the same as before.

This PR has the same code changes discussed and made in #22630, with an
added test suite.

Fixes: #21645.
2023-01-18 15:50:04 -08:00
David Rosa e23ab721a6 help center: Document sizing for organization logo and profile picture.
Fixes part of #22121.
2023-01-18 15:43:54 -08:00
Alex Vandiver 608c787c52 email_mirror: Create attachments as the message sender.
When the email mirror gateway is sending messages "as" a user (as
triggered by having access to the missed-message email address),
attachments were still created as the Email Gateway bot.  Since the
sender (the end-user) was not the owner of those attachments (the
gateway bot), nor were they referenced yet anywhere, this resulted in
the attachments being "orphaned" and not allowed to be accessed by
anyone -- despite the attachment links being embedded in the message.
This was accompanied by the error:

```
WARN [] User 12345 tried to share upload 123/3LkSA4OcoG6OpAknS2I0SFAQ/example.jpf in message 123456, but lacks permission
INFO [zerver.lib.email_mirror] Successfully processed email from user 12345 to example-stream
```

We solve this by creating attachment objects as the users the message
will be sent from.
2023-01-18 15:42:40 -08:00
Anders Kaseorg 8f7a7877fe python: Clean up janky URL matching code with urlsplit.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-18 17:25:46 -05:00
Lauryn Menard 1e96c6e9a2 settings-profile: Move tooltip for name change disabled to field.
Moves the tooltip when name changes are disabled to be shown on
hovering over the full name input field. Removes the question icon
that previously showed the tooltip on hover.
2023-01-18 13:39:16 -08:00
Lauryn Menard 578af48632 settings-modal: Only update display if overlay loaded in DOM.
If the personal / organization settings overlay has not been
loaded to the DOM in the user's session, then there's no need
to update the overlay display for changes to the user's
permissions to update their name, email or avatar.

So we check for the relevant element ids before updating the
overlay display when the user's role or these organization
settings change, and return early if they are not present in
the DOM.
2023-01-18 13:38:09 -08:00
Anders Kaseorg 9a7f33ab98 migrations: Fix ‘continue’ logic error in 0037.
The intention was to continue the outer ‘for’ loop, not the inner one
(but Python doesn’t have labelled ‘continue’).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-18 13:34:52 -08:00
Greg Price f38b5c41da shared: Bump version to 0.0.18 2023-01-18 13:25:44 -08:00
Anders Kaseorg a5fefa5932 shared: Remove js source from distributed package.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-18 13:25:08 -08:00
Greg Price 5407d52cb4 shared: Bump version to 0.0.17 2023-01-18 13:22:47 -08:00
Greg Price 52de17e08f shared: Specify files for NPM package, so lib/ gets included
Otherwise `npm publish` and friends leave it out because it's
ignored in Git.

This also cuts out `tools/` and a few other such files.
2023-01-18 13:20:56 -08:00
Anders Kaseorg d41917ecd0 shared: Add TypeScript build step.
This transpiles the JavaScript and (future) TypeScript in
`static/shared/js` to `static/shared/lib`. It also compiles away
ES2020 syntax that’s not supported by the oldest JS engines targeted
by zulip-mobile.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-18 13:10:13 -08:00
Trident Pancake c6ea673cc9 markdown: Update max inline preview from 10 to 24.
The max inline preview limit was previously increased to 10 by #20789.
However, as issue #23624 shows, it's still causing confusion for users
when they include more than 10 links.

Bump this limit up to 24, which is a multiple of the 4 image preview
per line logic.
2023-01-18 14:58:00 -05:00