Commit Graph

52032 Commits

Author SHA1 Message Date
Sahil Batra db825ad202 settings: Remove settings_text_input class from url type inputs.
This commit removes settings_text_input class from url type inputs
and we instead add the width property to settings_url_input.

Note that we might instead have a single class for all type of inputs
instead of having different classes for url, password and text type
inputs in further commits.
2023-06-23 11:53:38 -07:00
Sahil Batra 7d0da75430 modal: Remove modal_text_input class from password and url type inputs.
We remove the modal_text_input class from password and url type inputs
in modals and add the width property CSS to modal_password_input and
modal_url_input instead.

Note that we might instead have a single class for all type of inputs
instead of having different classes for url, password and text type
inputs in further commits.
2023-06-23 11:53:38 -07:00
Sahil Batra a860e717bb bootstrap: Remove bootstrap CSS for url type inputs.
We use url type inputs in the add and edit custom field modals
and also to show the url type custom fields in "Profile" panel
and "Manage user" modal.

This commit re-adds the bootstrap CSS rules to these specific
input elements using modal_url_input and settings_url_input
class and thus removes the CSS for url type inputs from
bootstrap.css.

We might replace the new class added here with a common class
for all type of inputs in further commits.
2023-06-23 11:53:38 -07:00
Sahil Batra 9cf214a7cb bootstrap: Remove bootstrap CSS for email type inputs.
We use email type inputs only in portico pages and
the bootstrap CSS is already overridden by CSS
defined in portico_signin.css. Only outline property
was being applied by bootstrap on focusing the input
which has been added to CSS in portico_signin.css in
the previous commit as password and email type inputs
have common CSS.

Thus, we can remove the bootstrap CSS for email type
inputs safely.
2023-06-23 11:53:38 -07:00
Sahil Batra 631eba09ee css: Remove bootstrap CSS for password type inputs.
We use password type inputs for API key and password
change modal in the main app and in login, register
and password reset pages.

For the portico pages, i.e. login, register and
password reset pages, the bootstrap CSS is already
overridden by our custom CSS defined in
portico_signin.css and some of the CSS added by
bootstrap is redundant. Only outline property was
being applied by bootstrap on focusing the input
which has been added to CSS in portico_signin.css
in this commit.

For the inputs used in app, i.e. API key and password
change modal, we have already added the CSS rules of
Bootstrap using "modal_password_input" class.

Thus, we can remove the CSS for password type inputs
from bootstrap.css.
2023-06-23 11:53:38 -07:00
Sahil Batra 5ac72eedd9 modals: Re-add bootstrap CSS to password inputs in modals.
This commit adds specific CSS styles from bootstrap to password
type inputs in modals using modal_password_input class. This
change helps us in removing the bootstrap CSS for password type
inputs in further commits.

We might replace the new added class with a single class which
will be used for all type of inputs in further commits.
2023-06-23 11:53:38 -07:00
Sahil Batra 954f605514 bootstrap: Remove CSS image type inputs.
We do not use any image type inputs in our app.
2023-06-23 11:53:38 -07:00
Sahil Batra 4703292c35 bootstrap: Remove CSS for file type inputs.
This commit removes bootstrap CSS for file type inputs
and we can safely do so all file type inputs are hidden.
2023-06-23 11:53:38 -07:00
Sahil Batra 35f252f5b2 templates: Remove pull-left class and its bootstrap CSS.
The "pull-left" class was used for hidden file type input
in compose_control_buttons.hbs and in the copy code button
in codeblocks. It was only used to set the float property
in CSS, but we do not need to set it and removing it does
not make any change in the position of these elements.
So, this commit removes the pull-left class and its CSS
from bootstrap.css as well.

For the file type input, it is already hidden and after
removing the float property also, it is positioned at the
same place due to ordering of elements in HTML.

For the copy code button in codeblocks, it is postioned
using "position" and "right" attributes and removing
"float" property has no effect.
2023-06-23 11:53:38 -07:00
Sahil Batra 8c0ff704df bootstrap: Remove bootstrap CSS for pull-right class.
We use pull-right class for copy button with the multi-use
invite link only and this commit adds CSS for that specific
element. This commit then removes the bootstrap CSS for
pull-right class and also removes pull-right class from the
copy button since it is no longer required.
2023-06-23 11:53:38 -07:00
Sahil Batra f4d082a5ff bootstrap-btn: Remove CSS for fieldset elements.
All the CSS for fieldset elements in bootstrap-btn.css
was for disabled fieldset elements and we do not use
them anywhere in the app.
2023-06-23 11:53:38 -07:00
Sahil Batra cbcbfef396 bootstrap: Remove CSS for fieldset element from bootstrap.css.
This commit adds the required bootstrap CSS rules for fieldset
elements to the specific selector in portico_signin.css and
removes the CSS from bootstrap.css.
2023-06-23 11:53:38 -07:00
Sahil Batra 0c3076b7d6 bootstrap: Remove CSS for input-block-level class.
We use input-block-level class only for search input
and this commit adds the required bootstrap rules for
it to the specific elements in search.css. So, we can
safely remove the CSS defined for this class in
bootstrap.css.
2023-06-23 11:53:38 -07:00
Lauryn Menard c5fbd3f085 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.
2023-06-23 11:51:14 -07:00
Daniil Fadeev daab1d4265
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
2023-06-23 11:45:04 -07:00
Lalit 13187ff8f6 ts: Convert `web/src/billing` module to TypeScript.
Converted all files inside `web/src/billing` to TypeScript.
2023-06-23 11:42:29 -07:00
Lalit 1f4dd0705d page_params: Make seperate `page_params` for billing module.
This commit introduces a seperate `page_params` file for billing module
since we only use certain page_params in billing module only that it does
not make sense to include them in the main `page_params.ts`.

Also introduced `zpage_billing_params` for proper testing new `page_params`
in billing module.
2023-06-23 11:42:29 -07:00
evykassirer e360a896f6 message view header: Don't initalize multiple times.
The `initialize` function registers a click handler, and
previously it was being registered another time each time
one of these calls to `initialize()` happened. The only
other thing that happens in `initialize` is a call to
`render_title_area`, so this commit replaces the extra
calls to initialize with that.
2023-06-23 11:33:44 -07:00
evykassirer 7ee827a24b search: Remove unused `search_open` classname. 2023-06-23 11:33:03 -07:00
evykassirer 84a066cb48 search: Invert double negative with De Morgan's law.
No functional changes. This change is more consistent with how this
expressions looks in other parts of the codebase.
2023-06-23 11:32:42 -07:00
Alex Vandiver 7ef05316d5 puppet: Support IPv6 nameservers.
The syntax in `/etc/resolv.conf` does not include any brackets:
```
nameserver 2001:db8::a3
```

However, the format of the nginx `resolver` directive[^1] requires that
IPv6 addresses be enclosed in brackets.

Adjust the `resolver_ip` puppet function to surround any IPv6
addresses extracted from `/etc/resolv.conf` with square brackets, and
any addresses from `application_server.resolver` to gain brackets if
necessary.

Fixes: #26013.

[^1]: http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
2023-06-23 11:32:17 -07:00
Akarsh Jain 92ea4a02a1 stream_edit: Replace saving notice with spinner editing stream name.
This commit remove the Saving/Saved notices when editing the stream
name and/or description. Instead, it replaces the "Save changes" button
with a spinner while the changes are being saved.

Fixes #24535.
2023-06-23 11:28:12 -07:00
Akarsh Jain 132c4245d0 modal: Fix button height issue on modals with long text on submit button.
This commit fixes an issue where the button height increases while
it has the spinner on modals with long text on the submit button. The
issue occurred due to the button height being calculated after hiding
the span element, which resulted in an incorrect height. To overcome
this, the commit suggests computing the span element's height before
hiding it to ensure that the button height is accurately set.
2023-06-23 11:27:52 -07:00
Lauryn Menard 73fd729c4b message-flags: Rename classes for direct message dicts.
Renames `UnreadPrivateMessageInfo` and `RawUnreadPrivateMessageDict`
to be `UnreadDirectMessageInfo` and `RawUnreadDirectMessageDict`
instead.
2023-06-23 11:24:13 -07:00
Lauryn Menard 8c0d89a225 delete-user: Update management command help doc-string.
Updates the help doc-string for the delete_user management command
to use "direct message" instead of "private message".
2023-06-23 11:24:13 -07:00
Lauryn Menard d3f7cfccbc zerver: Update comments with "private message" or "PM".
Updates comments/doc-strings that use "private message" or "PM" in
files in the `/zerver` directory to instead use "direct message".
2023-06-23 11:24:13 -07:00
Lauryn Menard b75c99b893 webhooks: Update references to "private message" and "PM".
Updates references to "private message" and "PM" to instead be
"direct message".
2023-06-23 11:24:13 -07:00
Lauryn Menard 2eeeda7694 mattermost: Update references to "private message" and "PM".
Updates references to "private message" and "PM" in the data import
and related tests for Mattermost to be "direct message" or "DM"
instead.
2023-06-23 11:24:13 -07:00
Lauryn Menard d53b854a7c backend-tests: Update "private message" or "PM" to "direct message".
Updates comments and test strings/names with "private message" or
"PM" to use "direct message" instead.
2023-06-23 11:24:13 -07:00
Aman Agrawal 5efa32be66 wildcard_mention: Don't highlight for unsubbed users. 2023-06-23 11:20:28 -07:00
Alex Vandiver 38d1b3314a convert_slack_data: Document "--token" more correctly. 2023-06-23 11:09:45 -07:00
Alex Vandiver 4c8915c8e4 slack: Provide more information when a Slack token fails to validate. 2023-06-23 11:09:45 -07:00
Alex Vandiver 1b2ba4e09d test_slack_importer: Switch to xoxb tokens, which is what we accept. 2023-06-23 11:09:45 -07:00
Sahil Batra b119ff68c3 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.
2023-06-23 11:04:19 -07:00
Lauryn Menard f461f28feb api-docs: Update endpoints in streams section for permissions info.
Updates the `api/subscribe` and `api/update-stream` endpoint docs
to note that streams' permissions impact whether a user/admin can
subscribe users and/or update a stream's permissions settings.

Updates the `api/archive-stream` and `api/delete-topic` endpoint
docs to note that they are only available to org admins.
2023-06-23 11:03:40 -07:00
lapaz 7ddf56514e settings: Remove disconnection of date-picker pop-up on scroll.
Disconnection of pop-up of date-picker for birthday on scroll of
settings is prevented.
Fixes #24924
2023-06-23 10:54:55 -07:00
Daniil Fadeev b13a85cdbf compose: Fix keyboard indicator appearance in send shortcut. 2023-06-23 10:53:51 -07:00
Daniil Fadeev 83b4fef060 compose: Fix keyboard indicator vertical alignment in send shortcut. 2023-06-23 10:53:51 -07:00
Lalit 50dc8c87e9 typing_status: Refactor `recipient` family of variables.
Refactored `recipient` family of variables to better names like
`recipient_ids` which also aligns with the type of these variables.

Also, refactored `typing_status.test.js` to use array of user ids
instead of string names like `alice` and `bob` to stay consistent with
the actual type of these parameters.
2023-06-23 10:52:53 -07:00
Lalit 66c672ed36 ts: Convert `web/shared/typing_status.js` to TypeScript. 2023-06-23 10:52:53 -07:00
Lalit 3613404581 typing_status: Refactor `state` object to either be null or has all
fields set.

This commit refactors the `state` object to either be null or has all
the fields set at the same time because they are note really decoupled.

This helps us to clean our code a little bit as well as makes it easier
to migrate this module to TypeScript.
2023-06-23 10:52:53 -07:00
Alex Vandiver d46279c41e docs: Clarify that trust of X-Fowarded-Proto is also necessary.
Previously, `X-Forwarded-Proto` did not need to be set, and failure to
set `loadbalancer.ips` would merely result in bad IP-address
rate-limiting and incorrect access logs; after 0935d388f0, however,
failure to do either of those, if Zulip is deployed with `http_only`,
will lead to infinite redirect loops after login.  These are
accompanied by a misleading error, from Tornado, of:

    Forbidden (Origin checking failed - https://zulip.example.com does not match any trusted origins.): /json/events

This is most common with Docker deployments, where deployments use
another docker container, such as nginx or Traefik, to do SSL
termination.  See zulip/docker-zulip#403.

Update the documentation to reinforce that `loadbalancer.ips` also
controls trust of `X-Forwarded-Proto`, and that failure to set it will
cause the application to not function correctly.
2023-06-23 10:47:14 -07:00
Alex Vandiver 6c3969f893 name_restrictions: Reject anything with zulip or kandra in it.
This is primarily to prevent impersonation, such as `zulipteam`.  We
only enable these protections for CORPORATE_ENABLED, since `zulip` is
a reasonable test name for self-hosters.
2023-06-23 10:45:40 -07:00
Anders Kaseorg 784622ee5d requirements: Upgrade Python requirements. 2023-06-20 16:17:55 -07:00
Anders Kaseorg c09e7d6407 codespell: Correct “requestor” to “requester”.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-06-20 16:17:55 -07:00
Lauryn Menard 8be68c8034 api-changelog: Update feature level 189 entry and bump API version.
Revises the API changelog feature level 189 entry for formatting
error and to clarify the text. Also, bumps the API_FEATURE_LEVEL
in `version.py`.

The original pull request for these changes was #25640.
2023-06-20 15:01:43 -04:00
Alex Vandiver d30ab34e3d circleci: Support the "ping" event type. 2023-06-20 14:26:31 -04:00
Lauryn Menard 27878cce87 api-docs: Update `zulip.yaml` for "direct message".
Updates the API documentation in `zerver/openapi/zulip.yaml` to use
"direct message" instead of "private message".
2023-06-19 16:56:15 -07:00
Lalit 6ade7dcfb9 compose_typeahead: Cut dependency on `compose.js`. 2023-06-19 16:54:28 -07:00
Lalit e1ef8c623c compose_pm_pill: Cut dependency on compose_recipient.js. 2023-06-19 16:54:28 -07:00