Commit Graph

50220 Commits

Author SHA1 Message Date
Anders Kaseorg 11e94c4bb7 html_diff: Fix lxml import.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-05 14:46:28 -08:00
Anders Kaseorg d3efd4c095 python: Import F, Q, QuerySet from their canonical module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-05 14:46:28 -08:00
Anders Kaseorg aa577a554b populate_db: Import timedelta from its canonical module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-05 14:46:28 -08:00
Anders Kaseorg 0628c3cac8 migrations: Import BaseDatabaseSchemaEditor from its canonical module.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-05 14:46:28 -08:00
Anders Kaseorg cca8417ad4 docs: Add missing link to outreach TOC.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 23:06:58 -08:00
Anders Kaseorg 7b47b6a311 docs: Move homepage link to TOC tree.
This lets us avoid maintaining a forked copy of sphinx_rtd_theme’s
sidebartitle block.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 23:06:17 -08:00
Anders Kaseorg 821584b8fc gitlint-rules: Rename to gitlint_rules.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 18:02:38 -08:00
Anders Kaseorg 43b4f10578 run-dev: Drop .py from script name.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 18:02:37 -08:00
Anders Kaseorg 5a79ca251b check-database-compatibility: Drop .py from script name.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-03 18:02:37 -08:00
Alex Vandiver 26eb1d7371 puppet: Also set systemd limits. 2023-03-03 16:39:47 -08:00
Alex Vandiver 1c76036c61 puppet: Increase maximum file descriptors.
The current threshold of 40k descriptors was set in 2016, chosen to be
"at least 40x our current scale."  At present, that only provides a
50% safety margin.  Increase to 1 million to provide the same 40x
buffer as previously.

The highest value currently allowed by the kernels in
production (linux 5.3.0) is 1048576.  This is set as the hard limit.

The 1 million limit is likely far above what the system can handle for
other reasons (memory, cpu, etc).  While this removes a potential
safeguard on overload due to too many connections, due to the longpoll
architecture we would generally prefer to service more connections at
lower quality (due to CPU limitations) rather than randomly reject
additional connections.

Relevant prior commits:
 - 836f313e69
 - f2f97dd335
 - ec23996538
 - 8806ec698a
 - e4fce10f46
2023-03-03 16:39:47 -08:00
Alex Vandiver a20bb54cbb puppet: Move limits.conf to maintain more of the installation structure. 2023-03-03 16:39:47 -08:00
David Rosa 140e62d024 help: Add open link icon in "Add a custom linkifier". 2023-03-03 14:19:20 -08:00
Lauryn Menard f1e60014fa css: Move `pre code` reset rules to `rendered_markdown` class block.
Moves and simplifies the `pre code` rules in `rendered_markdown.css`
so that they are all part of the `rendered_markdown` class block.
2023-03-03 14:10:06 -08:00
Lauryn Menard 69e224cd87 templates: Add `rendered_markdown` class to confirm emoji warning.
Adds a `div` wrapper with the `rendered_markdown` class to the
content in `confirm_emoji_settings_warning.hbs`, so that the
inline code element has the intended CSS rules applied.

Because the `p` element also has the `rendered_markdown` class,
the margins for this element in the modal are slightly changed
(3px on top/bottom). Previously, the margins for this element were
being set from a bootstrap rule (10px on bottom).
2023-03-03 14:08:08 -08:00
Lalit 1b7f3eeb76 ts: Convert typing_data.js to TypeScript. 2023-03-03 12:04:42 -08:00
Lalit 88c23933bb util: Change parameter type of `sorted_ids` to `number[]`.
This function was mistyped; it was used in practice both accepting
string[] and number[], with the implementation taking advantage of the
fact that number.parseInt(<int>, 10) = <int>.

The only string[] callers were some overly defensive typing_data tests
that don't match the actual typing_data interface, so we remove the
string[] support and adjust the function's type, as well as those
tests.
2023-03-03 12:04:42 -08:00
Joelute 5762799d18 popovers: Remove background when hovering Github username.
When someone hovers over the Github username in the popover
with dark theme, a background will appear. These changes
ensures that the `background-color` isn't overwritten by
other CSS.
2023-03-03 11:46:30 -08:00
Joelute e44a87b271 documentation: Reduce `max-width` on content.
In the documentation, text-lines felt a bit too long
in text-heavy pages. This change aims to reduce
`max-width` on the content to 700px.

[CZO discussion](https://chat.zulip.org/#narrow/stream/19-documentation/topic/line.20wrapping.20code.20blocks/near/1516561)
2023-03-03 11:36:06 -08:00
Joelute e2346ab3ae documentation: Increase block width in help center.
After merging #24352, we want to increase the block
width in the help center to reduce the amount of
scrollbars that are shown. Thus, we decided to
remove `max-width` on all blocks.

[CZO discussion](https://chat.zulip.org/#narrow/stream/19-documentation/topic/line.20wrapping.20code.20blocks/near/1516561)
2023-03-03 11:36:06 -08:00
Sahil Batra 8a0b99cb39 streams: Align stream type icons in "Archive stream" modal.
This commit adds inline_decorated_stream_name component
which is used to show stream name along with its privacy
type icon. This component is added such that we can align
the icon and stream name properly as there are many
instances where the icon and name are not aligned in the
current UI.

This component is only used in "Archive stream" modal for
now and will be used for other UIs as well in future.
2023-03-03 11:10:45 -08:00
Ujjawal Modi 18059e132d user groups: Enabled sorting of subscribers.
The new `#groups` overlay does not allow sorting of subscribers.
This commit adds support for sorting of subscribers.
2023-03-03 11:03:12 -08:00
Lauryn Menard bfa8a2438b templates: Revise explanatory text in code playground org settings.
Revises descriptive text and examples at the top of the code
playgrounds tab in the organization settings overlay to be shorter,
have only one example that includes the name field.

Also, adds the `rendered_markdown` class to the HTML code elements,
via an HTML span element so that the specific CSS rules for code
elements with that class will be applied to these examples.
2023-03-02 18:14:35 -08:00
Lauryn Menard 23bac34f08 templates: Revise explanatory text/example in linkifiers org settings.
Revises descriptive text and examples at the top of the linkifiers
tab in the organization settings overlay to be shorter, have only
one example and updates help center link text for capitalization.

Adds a link to the help center in the form/input area for adding
a new linkifier, which is consitent with the code playgrounds tab,
and means the link would be there if the form was converted to a
modal.

Also, adds the `rendered_markdown` class to the HTML code elements,
via an HTML span element so that the specific CSS rules for code
elements with that class will be applied to these examples.
2023-03-02 18:14:35 -08:00
Alex Vandiver 3bf3f47b49 delete_old_unclaimed_attachments: Add flag to clean up storage.
Actions like deleting realms may leave unreferenced uploads in the
attachment storage backend.

Fix these by walking the complete contents of the attachment storage
backend, and removing files which are no longer present in the
database.  This may take quite some time, as it is necessarily O(n) in
the number of files uploaded to the system.
2023-03-02 16:36:19 -08:00
Alex Vandiver c9d1755a12 delete_realm: Optimize attachment cleanup by batching. 2023-03-02 16:36:19 -08:00
Alex Vandiver cdda4bc089 delete_realm: Clean up attachments when deleting or scrubbing realms. 2023-03-02 16:36:19 -08:00
Alex Vandiver b31a6dc56c upload: Reorder functions into logical groupings. 2023-03-02 16:36:19 -08:00
Alex Vandiver 880a3f95a7 tests: Split out s3 and local tests.
This mirrors the split of the code in 7c0d414aff.
2023-03-02 16:36:19 -08:00
Alex Vandiver 04e7621668 upload: Rename upload_message_image_from_request.
The table is named Attachment, and not all of them are images.
2023-03-02 16:36:19 -08:00
Alex Vandiver bd80c048be upload: Rename delete_message_image to use word "attachment".
The table is named Attachment, and not all of them are images.
2023-03-02 16:36:19 -08:00
Alex Vandiver 567d1d54e7 upload: Rename upload_message_file to use word "attachment".
For consistency with the table, which is named Attachment.
2023-03-02 16:36:19 -08:00
Lauryn Menard 96aca49f9f integrations: Update Asana integration doc to point to Zapier.
Updates the Asana documentation, which was a detailed version
of the Zapier documentation with screenshots specifically for
Asana, to instead start with the basic incoming webhook steps
and then point to the general Zapier documentation to complete
the integration.

This will be easier to maintain moving forward in the short
term as ideally we'll migrate to a system that documents all
of the integrations with Zulip that are available via Zapier.

Also, updates the current Zapier documentation to mention
Asana as one of the apps that can be integrated with Zulip.
2023-03-02 13:51:34 -08:00
Aman Agrawal 4f8169aab5 tippy: Add comment justifying `parent` as `appendTo` default. 2023-03-02 13:51:00 -08:00
Lakshay Mittal 9be35d2447
docs: Fix outdated description of where stats views are. 2023-03-02 13:38:08 -08:00
Lauryn Menard bb819b4928 css: Remove rules in `integrations.css` for code elements.
Removes the specific rules for code elements in the integrations
documentation pages.
2023-03-02 13:32:50 -08:00
Lauryn Menard 262debb72b css: Update code element styling for documentation pages.
Updates `markdown.css` to remove border styling from code
elements, and instead use background-color (as well as
font-family) to visually highlight inline code elements
as distinct from regular text.

Updates code element font-family to be the same as in
`zulip.css`.

Makes padding on the left and right the symmetrical for
inline code elements. Previously there was 4px padding on
the right, but not on the left.

Maintains anchor font-color styling for code elements that
are also links.
2023-03-02 13:32:50 -08:00
Lauryn Menard 3c63025d88 css: Remove code elements from bootstrap.css.
Updates `markdown.css` and `rendered_markdown.css` for the rules
in `bootstrap.css` that were being used to style code elements and
removes the now redundant/ignored rules from `bootstrap.css`.
2023-03-02 13:32:50 -08:00
Sahil Batra 734d1848c0 server_events_dispatch: Update bots list only if needed.
After b21f533af, we now update the organization bots
list on receiving realm_user events since non-admins
can also see bots not owned by them in the list.

But the functions to update bot list should be called
only for bot users and not for others, otherwise it
results in an error.

This can be reproduced by first opening the organization
bots list and then just updating the name of the user.
Calling `redraw_bots_list` on receiving "realm_user/add"
event for non bot users will not raise any error but
still we avoid redrawing the whole list when not required.

This commit fixes the code to call functions to update
bot list only when the event is received for a bot.
2023-03-02 13:26:20 -08:00
Anders Kaseorg 6eeeb70570 muted_topics_ui: Rename mute_topic parameter to fix shadowing bug.
This was broken by 6e6fb47e20 (#24386).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:22:05 -08:00
Alya Abbott 157b5ada90 help: Expand introduction on /help/support-zulip-project.
Also minor tweaks to the details below.
2023-03-02 12:17:50 -08:00
Anders Kaseorg 2a70c11c5f eslint: Fix unicorn/prefer-spread.
This was initially disabled for IE/Babel-related reasons that no
longer apply.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 941a9bab38 message_flags.test: Call send_read with an array.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 9d514a29d1 zjquery: Make FakeElement iterable.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Anders Kaseorg 6b3edb8b0d search_suggestion: Rename Attacher#concat to push_many.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-03-02 12:16:56 -08:00
Ujjawal Modi 5cf98d8653 streams: Allow sorting of stream members.
Stream members table in Create stream and stream subscribers UI
can now be sorted.
Fixes #21341
2023-03-01 17:29:01 -08:00
Trident Pancake 2c042ad100 typeahead: Suggest existing custom language in Code Playground settings.
The Code Playground feature can have multiple entries per language. So
the autocomplete for settings should return existing custom languages
too.
2023-03-01 17:02:44 -08:00
Trident Pancake 51bd3c8c8b typeahead: Show Code Playground entries in composebox typeahead.
This addresses #23935.
2023-03-01 17:02:44 -08:00
Trident Pancake f96daca32c typeahead: Handle non-pygments data in compare_language_by_popularity.
This added functionality will be used to compare pygment_language from
Code Playgrounds.

There is a choice of how to sort languages with popularity versus
without popularity. I chose to sort the Code Playground custom language
after other pygment languages based on the reasoning in the comments.
2023-03-01 17:02:44 -08:00
Trident Pancake 6f904dbec2 typeahead: Extract language popularity comparison to its own function.
In preparation for adding logic for Code Playground languages, which has
no popularity score, extracting the popularity comparison part of the
logic out to evolve it in future diffs.
2023-03-01 17:02:44 -08:00