Previously, deleting drafts was too easy, which could result in
accidentally losing important information.
This commit adds a green confirmation banner showing "N drafts were
deleted" and "Undo" button to restore deleted drafts.
Fixes: #32995.
This commit laying the groundwork for dynamic re-rendering of
drafts.
Previously, the draft list was rendered once with the overlay,
and re-rendering wasn't needed. However, to support features like
"undo," we now need to re-render the draft list dynamically.
This commit splits `setup_bulk_actions_handlers` from
`setup_event_handlers` as prep for drafts undo functionality.
By isolating bulk actions, it reduces redundancy when reusing
`setup_event_handlers` for re-rendering after undoing deletions.
Previously, these functions were nested inside `launch`, limiting their
accessibility. This commit moves them outside, making them accessible
for draft restoration in the draft undo feature.
4ab77e519b trimmed the msgid for translation blocks in templates;
however, this marked the translations as "fuzzy", which makes them not
used by gettext, by default.
For all "fuzzy" translations where the recorded previous `msgid`
differs from the current one only by the trimming normalization,
perform the same normalization on the `msgstr` and mark the string as
non-fuzzy, allowing it to be used.
It was reported that there was no option to mark messages as read
when only unread messages in muted streams and topics remained.
This happened because the logic to show or hide the sidebar menu
icon relied solely on the home view count, which excludes unread
messages in muted streams and topics.
This commit fixes the issue by including the count of unread
messages in muted streams and topics when determining whether to
show or hide the sidebar menu icon.
Fixes: #34682
This commit aligns the popup banners horizontally by using transform,
and removes the need for `pointer-events: none` — which made the
scrolling buggy due to gaps in between the banners.
This commit wraps the alert-box into a wrapper, and moves the
position related CSS to the wrapper, to avoid safari container
regression — which results when position: fixed is applied on the
element which is also the container.
Created a `WEBHOOK_SCREENSHOT_CONFIG` to track those separately, by
renaming the existing `DOC_SCREENSHOT_CONFIG` which contained only the
configs for webhook integrations.
Tracking the screenshot configs separately allows us to generate
the screenshots of all fixtureless integrations in a single batch, and
all webhook integrations in their own separate batch.
Add a `fixtureless_group` of arguments to allow passing in the message,
topic and channel via the commandline.
By default, the script uses the screenshot config from
`integrations.py`.
Example screenshots can now be generated for fixtureless integrations,
by sending mock messages using the topic and message text included in
the screenshot config added in the previous commit.
This is in preparation of adding support for generating screenshots of
fixtureless integrations, which would need to get image_path, without
involving fixture_path.
This is in preparation to differentiate the current config dataclass
(used for webhooks) from the FixturelessScreenshotConfig that will be
added for non-webhook integrations in the following commits.
- Removed the BaseScreenshotConfig dataclass, and merge it with
ScreenshotConfig dataclass.
- Simplified get_fixture_and_image_paths.
- Simplified generate_screenshot_from_config in the screenshot script.
- Deleted send_bot_mock_message.
Nagios is not a webhook integration, and the fixture is only used to
generate the example screenshot for the doc.
Support for generating the Nagios example screenshot will be added in a
later commit, in a different format and system. Removing this fixture
allows removing the current system logic, without raising errors.
- Simplified the loading of commandline options into the config dict.
- Split the logic into two new functions. This is in preparation to
later commits that will parse commandline options for non-webhook
integrations by re-using the created functions.
Group argparse arguments into common and webhook-specific options.
The common group contains arguments that apply to both webhook and
non-webhook integrations. It is not assigned a description.
A fixtureless, non-webhook group will be added later, when its arguments
are created.
to `fixture-name` to match the name of the corresponding field in the
ScreenshotConfig dataclass.
This is in preparation to loading all the options into a config dict
in a single step in a later commit.
Rename `group` to `batch_group`.
It's a mutually exclusive group that lets the user decide whether to
generate screenshots one at a time or in a batch.
Renames invoice_overdue_email_sent to stale_audit_log_data_email_sent
to better reflect the email and state that field is tracking for
the CustomerPlan.
These emails are not necessarily sent when an self-hosted customer
has an outstanding invoice, e.g., they are on an annual plan and
the monthly check for additional licenses happens when the audit
log data is stale.
Updates the notice_reason to be "stale_audit_log_data" instead of
"invoice_overdue". Revises the email subject and text to better
reflect what the support admin needs to investigate.
This commit ensures the hover state appears on the first list item in
the channel picker dropdown by default. It enables navigation through
the list using Up/Down arrows while keeping browser focus in the text
input. The Tab key now shifts focus to the topic input instead of the
next list item.
Fixes: #33448.
This commit add configuration options to improve dropdown behavior:
- `keep_focus_to_search`: Keeps focus in the search input during
navigation.
- `tab_moves_focus_to_target`: Moves focus to the target item on
Tab key press.
This commit renames `active` to `current_user_setting` and
`is_item_selected` to `is_current_user_setting` to clarify
it’s the user’s current choice, not hover, and to prevent
future naming conflicts.