Commit Graph

49717 Commits

Author SHA1 Message Date
Aman Agrawal f4e9bf269c css: Fix positioning of text elements in message row without sender.
When I changed the padding for message content in the PR which
converted the message row to a grid, I forgot to adjust
the position of edited and time elements.
2023-01-23 16:41:03 -08:00
brijsiyag f314d819aa settings: Remove unused class.
Removed class is not used for any CSS.
Also heading is not for the message retention setting.
2023-01-23 15:09:21 -08:00
brijsiyag 02450b7aa6 settings: Fix info icon in header row outside header.
This info icon was smaller than similar ones sitting in heading rows,
because the icon element was outside the `<h3>` element for the row.

Fixes #23801
2023-01-23 15:08:42 -08:00
Akarsh Jain caeeddd975 typeahead: Fix suggestion box positioning on window resize.
The suggestion box was not being repositioned correctly when the window
was resized. This commit adds a resizeHandler() function to handle
window resizing properly and reposition the suggestion box to its
current position.

Fixes: #23681.
2023-01-23 15:05:14 -08:00
David Rosa 256e9651b6 help center: Add section links in "Using Zulip for a class".
Converts the bullets at the top of the page into section links.
2023-01-23 14:23:16 -08:00
Alex Vandiver 50e9df448d puppet: Do not start the "puppet" service.
Zulip runs puppet manually, using the command-line tool; it does not
make use of the `puppet` service which, by default, attempts to
contact a host named `puppet` every two minutes to get a manifest to
apply.  These attempts can generate log spam and user confusion.

Disable and stop the `puppet` service via puppet.
2023-01-23 13:02:09 -08:00
Alex Vandiver 25c9fcdb4e changelog: Tweak wording to clarify impact to Safari. 2023-01-23 15:07:02 -05:00
evykassirer 56c9b4f8c1 puppeteer: Check compose form contents in a new distinct function.
This is a prep commit for a future where we check the stream name
from a different field that isn't in the form, so that we only
have to change code in this single place.
2023-01-23 11:31:47 -08:00
Anders Kaseorg d3164016f5 ruff: Fix UP032 Use f-string instead of `format` call.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg e5d671bf2b ruff: Fix SIM210 Use `bool(…)` instead of `True if … else False`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg 7a7513f6e0 ruff: Fix SIM201 Use `… != …` instead of `not … == …`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg 25346bde98 ruff: Fix SIM118 Use `k in d` instead of `k in d.keys()`.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg 6303ebfc2f ruff: Fix SIM115 Use context handler for opening files.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg c6b6004432 ruff: Fix SIM111 Use `return all(…)` instead of `for` loop.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg b8b29dc3ad ruff: Fix SIM110 Use `return any(…)` instead of `for` loop.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg ff1971f5ad ruff: Fix SIM105 Use `contextlib.suppress` instead of try-except-pass.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
Anders Kaseorg b0e569f07c ruff: Fix SIM102 nested `if` statements.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-01-23 11:18:36 -08:00
David Rosa 50cf9bc4b8 contributor docs: Document bold formatting for help center inline icons.
Updates "Icons" section of the "Writing help center articles" page
to be consistent with current help center documentation patterns.
2023-01-23 11:15:51 -08:00
David Rosa f1f381dc2c help center: Consistently use bold formatting for icon names.
Fixes formatting of icon names to follow current help center
documentation patterns.
2023-01-23 11:15:51 -08:00
Alex Vandiver d38b3ad09c changelog: Fix the link from `.html#` to `.md#`. 2023-01-23 18:58:26 +00:00
Alex Vandiver 4226026dbc version: Update version and changelog after 6.1 release. 2023-01-23 18:52:47 +00:00
m-e-l-u-h-a-n fbb475b16a streams: Fix hash redirect for deleted/invalid stream ids.
The logic for hash redirects for stream settings did not check
for deleted or non-existent streams. Thus a hash of the form
`/#streams/{invalid_stream_id}/*` gave gave a blueslip error.

This change fixes that logic to treat such hashes equivalent to
streams whose settings cannot be accessed by that user and
redirects such invalid hashes to `/#streams/subscribed/`.
2023-01-20 15:07:00 -08:00
N-Shar-ma fb81e5504c typeahead: Remove misleading comment regarding favouring popular emojis. 2023-01-20 14:41:21 -08:00
N-Shar-ma aa72b51bca emojis: Prioritise custom / realm emojis when sorting.
Fixes: #18135.
2023-01-20 14:41:21 -08:00
N-Shar-ma 249f482b06 emojis: Filter out unicode emojis with same codes from typeahead menu.
Since emojis can have multiple aliases, an emoji was often suggested
under multiple names (like `smiling devil` / `smiling imp`), crowding
typeahead suggestions redundantly, and taking up the place of other
potentially relevant emoji suggestions.

Now such duplicates are removed post the sorting of suggested emojis,
and only the most relevantly named (highest sorted) copy is retained.
2023-01-20 14:41:21 -08:00
N-Shar-ma c64726ea9a compose: Retain compose state across narrows if recipient was edited.
Uptil now, the compose box's state was retained across narrows only if
the compose box had any content in it. Else it was reset to match the
current narrow.

To not lose any changes made to the recipient fields only, the compose
box will now retain its state also if the recipient (stream, topic or
PMs) has been manually edited.

This is achieved by having a variable in `compose_state` track if the
recipient fields were changed, and checking it before resetting the
compose box on narrowing. This variable is reset when the compose box's
context is changed by clicking on a message, or when a message is sent.

Fixes: #23064.
2023-01-20 12:56:37 -08:00
Sahil Batra 3cb69b138e settings: Disable save button when value is out of range.
This commit adds code to disable save button when the value
in custom input box is too large for an integer. Note that
since the value for message edit, message delete and email
notification batching settings are in minutes in the custom
input but are sent to API in seconds, we make sure that the
seconds value should be inside the range.
2023-01-20 12:45:53 -08:00
Sahil Batra 82aacb4996 settings: Fix custom input handling of message retention setting.
This commit adds code to convert $custom_input.val() to Number
in get_message_retention_setting_value such that values like
"48aa" are treated as NaN and we correctly show save-discard
widget with save button disabled. If we not convert it to Number,
Number.parseInt will just convert "48aa" to 48.

This commit is similar to 711536f53a.
2023-01-20 12:45:53 -08:00
Sahil Batra 235bd3fb1b settings: Disable "Save changes" button for invalid values.
This commit disables the "Save changes" button when there is
an invalid value in custom input of message retention setting.

This commit includes changes for both realm and stream message
retention setting.
2023-01-20 12:45:53 -08:00
Sahil Batra ba1188db05 settings: Rename admin-realm-time-limit-input class.
This commit renames admin-realm-time-limit-input class to
time-limit-custom-input such that there is no confusion
when it is used for stream settings also.
2023-01-20 12:45:53 -08:00
Sahil Batra 565d133985 settings: Refactor code for waiting period setting.
This commit refactors code for realm waiting period setting
to be similar to other time-based inputs. We also add the
code to disable the save button when custom inputs have
invalid values.
2023-01-20 12:45:53 -08:00
Sahil Batra bc5f0e881e settings: Rename IDs of waiting-period-threshold setting elements. 2023-01-20 12:45:53 -08:00
Sahil Batra 4dd1676e96 settings_config: Add waiting_period_threshold_dropdown_values.
This list will be used in further commits in settings_org.js
code for waiting period threshold setting.
2023-01-20 12:45:53 -08:00
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