Commit Graph

49673 Commits

Author SHA1 Message Date
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
N-Shar-ma 25eff08324 typeahead: Show the time typeahead irrespective of text before syntax.
Uptil now, on typing "<time" after some other autocompleteable token
like a mention or emoji, the timezone aware time typeahead would not
get triggered since the time syntax was checked after the earlier syntax
had been mistakenly used to (wrongly) tokenize the precursor text.

Now the code has been fixed to detect the time syntax the same way as
the rest: checking each character in the precursor text from end to
start, and tokenize it correctly.

Fixes: #23998.
2023-01-17 17:10:14 -08:00
Lauryn Menard ba443cac03 templates: Set robots noindex for attribution corporate template.
Overrides the default context `allow_search_engine_indexing` to
always be `False` for `templates/corporate/attribution.html` so
that it does not appear in Google / search engine indexes.

Updates test of documentation pages in `test_docs.py` to have an
option for corporate pages to set this value in the template and
verifies that the meta tag for robots noindex, nofollow is
always in the response.
2023-01-17 15:00:39 -08:00
Lauryn Menard 53ed7d5ce2 docs: Remove paragraph about getting help finding issues in contributing.
Removes a paragraph about posting in the new members stream to get
help finding issues to work on from the first contribution part of
the contributing guide.

Also updates the remaining section about posting to new members as
a way to introduce yourself with a link to the community norms and
offering positive feedback as well as constructive criticism.
2023-01-17 14:51:53 -08:00
Lauryn Menard c2bcfb52aa api-tests: Reduce error output for `/register` openapi validation.
For descriptive endpoints, such as `/register`, that might raise
Schema Validation errors via `validate_against_openapi_schema`,
omits the OpenAPI schema definition in the error output.

Also omits the error instance definition in the error output
when it is a jsonschema object with over 100 properties. This
means that the test instance for objects, like user settings,
will be printed in the error output, but the test instance for
the entire endpoint will not be printed to the console.

The omitted output can be thousands of lines long making it
difficult to find the initial console output that actually helps
the contributor with debugging.

Adds a section in "Documenting REST API endpoints" about
debugging and understanding these errors that is linked to
in the error console output.
2023-01-17 14:50:42 -08:00
Sahil Batra e80e3b07c4 settings: Fix flickering of icon when hovering on discard button.
The color of "x" icon in "Discard" button flickers when hovering
over the button. This commit fixes it by just adding the hover
color to the text and not icon which was anyways set to original
color using different selector which was the cause of flickering.
2023-01-17 14:45:48 -08:00
Sahil Batra c0e2c9b6d6 settings: Change hover behavior of save discard buttons.
This commit fixes the hover behavior of save-discard button
in dark theme. We change the text to be slightly brighter
on hover and keep the icon color same.

The background-color property is removed from hover CSS. This
change is safe because for save-button, we already define
different hover behavior below which takes precedence. And
for light-theme, the discard button already has the same
background-color without hovering, so this property was only
affecting discard button in dark-theme.
2023-01-17 14:45:48 -08:00
Sahil Batra e804795fa6 settings: Fix text color for discard button in dark theme.
We change the color of text and "x" icon in the discard
button in dark theme to be same as that of other text
in the settings page.
2023-01-17 14:45:48 -08:00
Sahil Batra 4e63794ddd settings: Fix background-color of save-discard widget in dark theme.
The correct background-color for buttons of save-discard widget
was not being applied and instead almost transparent color was
applied to dark-theme CSS rules. This commit adds ID to the
selector such that CSS in app_components.css is preferred over
dark-theme CSS.
2023-01-17 14:45:48 -08:00
Josh Klar 111f395eb6 i18n: Sync latest unbranched translations from Transifex.
Additionally, run unescape-html-in-json-translations over the resulting
JSON files to ensure HTML escape sequences are removed.
2023-01-17 13:20:49 -08:00
Josh Klar 70b30e7792 i18n: Unescape Unicode sequences in JSON.
This greatly improves the readability of the diffs and in-codebase
translation strings over using ASCII sequences for unicode in the JSON.

We've previously noticed [^1] some JSON translation files ending up with
escaped Unicode sequences on disk, which Transifex indicates is expected
behavior [^2], though it is sometimes fixed by `manage.py
compilemessages` [^3]. Further, as noted in #23932 [^4], some JSON
translation files include HTML-escaped entities like quotation marks.

This script will ingest valid JSON files and output them as proper UTF-8
files with appropriately unescaped (unless otherwise necessary, like
double quotes being backslash-escaped) sequences, except when the key
itself contains HTML escape sequences (as it's presumed the value of
such entries must be pre-escaped before being passed to consumers).

[^1]: https://chat.zulip.org/#narrow/stream/58-translation/topic/Transifex.20client/near/1479205

[^2]: https://chat.zulip.org/#narrow/stream/58-translation/topic/an.20email.20for.20Transifex.20support/near/1481287

[^3]: https://chat.zulip.org/#narrow/stream/58-translation/topic/an.20email.20for.20Transifex.20support/near/1481908

[^4]: Which is not end-to-end fixed yet by this commit: that will
require a new release of Zulip Server.

gitlint-ignore: B1, title-trailing-punctuation, body-min-length, body-is-missing
2023-01-17 13:19:45 -08:00
Sahil Batra 0718043283 bot_settings: Remove "#bot_table_error" element.
We do not use "#bot_table_error" element to show any errors
anymore. It was previously used to show the error if bot
creation failed but since 6db88f0d39 moved bot creation
to a modal, we now show error, if any, inside the modal
itself. This commit also removes the hide_errors function
since the error element itself is removed.
2023-01-17 09:45:40 -08:00