Commit Graph

13 Commits

Author SHA1 Message Date
Alex Vandiver
1e943ae7df python: Elide type=str from argparse arguments. 2025-10-17 15:34:34 -07:00
Sahil Batra
764f4aa2e0 groups: Use realm_for_sharding for limiting NamedUserGroup queries.
For get and filter queries of NamedUserGroup, realm_for_sharding
field is used instead of realm field, as directly using
realm_for_sharding field on NamedUserGroup makes the query faster
than using realm present on the base UserGroup table.
2025-09-23 12:15:53 -07:00
Anders Kaseorg
3f514a4e00 tools: Convert message-screenshot, thread-screenshot to TypeScript.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-09-10 15:54:28 -07:00
Lauryn Menard
cd4cc1a4b1 tools: Add help text to generate-user-messages-screenshot.
Adds general help description text for the tool that generates
cropped message screenshots for corporate pages.

Notes some of the known issues when updating these screenshots
after there have been UI changes, such as partial dates showing
and truncated channel/topic names in screenshots.
2025-08-14 16:55:13 -07:00
Lauryn Menard
d53f75d0a9 corporate: Update for/education screenshots for canonical Elena.
Fixes the screenshots on the for/education page to have the
canonical last name for the example user Elena Garcia.

Updates year in dates for screenshot content to align with when
the screenshots were taken.

Adjusts the width of the viewport for changes in the message
header bar in the web app. Also closes any alert banner at the
top of the app before navigating to the narrow so that doesn't
impact the cropped screenshot area that's computed later.

Finally, sets hover on the new conversation button so that none
of the message action buttons are visible in the message feed
when the screenshot is taken.
2025-08-14 16:55:13 -07:00
Shubham Padia
0def74b097 message: Make is_modifying_message a mandatory kwarg.
This is valuable so that one is forced to explicitly make a decision
on what is correct when adding new callers. Past experience tells us that
not having to explicitly show the decision leads to people introducing
security bugs in PRs that the maintainer has to catch in review, and our
goal for access control code should be that security bugs are hard to write.
Fixes #33688.
2025-02-28 10:10:33 -08:00
Anders Kaseorg
653b0b0436 ruff: Partially reformat Python with Ruff 0.9 (2025 style).
These are the changes that are backwards compatible with the 2024
style.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2025-01-14 09:42:16 -08:00
Anders Kaseorg
3f29bc42b1 ruff: Fix B905 zip() without an explicit strict= parameter.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg
531b34cb4c ruff: Fix UP007 Use X | Y for type annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
Anders Kaseorg
e08a24e47f ruff: Fix UP006 Use list instead of List for type annotation.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2024-07-13 22:28:22 -07:00
roanster007
00d127965e portico: Extend the script to generate thread screenshots.
This commit extends the script used to generate thread
screenshots to be able to create invite_only streams,
add starred messages, create user groups, add edited
notice to messages, and send messages from notification
bots.

The window width is updated, and background for the
screenshots is changed to white.

It is also updated so that user-avatars mapping
occurs within the script itself.

This is a prep commit to #30128
2024-07-01 16:04:13 -07:00
Alex Vandiver
08b24484d1 upload: Remove redundant acting_user_profile argument.
This argument, effectively added in 9eb47f108c, was never actually
used.
2024-06-26 16:43:11 -07:00
roanster007
3f8f10fed7 portico: Add script to auto-generate message screenshots /for/research.
Previously, we manually generated screenshots on /for/research
and other landing pages, which makes them difficult to maintain.

This PR adds a script - generate-user-messages-screenshot, which
expects the path of the filename containing the thread conversation
and path where screenshot needs to be generated, and generates
screenshot at the mentioned location.

Fixes #30016
2024-05-14 16:17:44 -07:00