Since we don't have native floatkit/dmenu functionality (yet) to
make the menu stick to the width of the element, this is a
stopgap solution to make sure the menu stays the same width
as the filter input whether resizing the window or hiding/showing
the menu.
Localizes topic titles in these areas
- user notification
- bookmarks
This commit also updates the user notification bookmark list to use fancy
title instead of title, similar to the other user notification tabs.
This PR ports the floatkit-based autocomplete system to chat composer
under a site setting, providing consistent UX across both regular and
chat composers.
### Key Changes
* Adds floatkit_autocomplete_chat_composer setting (defaults to true)
* Adds `fixedTextareaPosition` option and
`createVirtualElementAtTextarea` to DAutocompleteModifier to allow for
positioning of the autocomplete menu relative to the whole textarea
bounds instead of following the cursor - this is better for chat UI &
aligns with current behaviour
* Use DMenu for the filter tips UI
* Move the input, filtering, and DMenu into the same
`FilterNavigationMenu` component to avoid input event listener
shenanigans
* General renaming, refactors, adding comments
* Move searching/suggestion logic for specific types of filter out into
`FilterSuggestions` lib to avoid cluttering the component
This change adds a new `from_described_class` helper to `RSpec::Mocks`, allowing stubs to only be used when called from the described class in a given spec.
The practical application of this helper is to handle flaky specs, where other code can call the mocks before the test target can.
Consolidated all decorator logic into a single `decorate` method,
eliminating the complexity of separate `beforeAdopt` and `afterAdopt`
options. Streamlined related API and component logic for consistency and
maintainability.
This commit ensures that polls including @mentions of users with active user
statuses are rendered correctly without errors. It introduces a document
validation check before rendering components, adds fixtures for polls
with mentions, and provides acceptance tests to verify proper rendering
of polls containing @mentions.
Introduced the `post-meta-data-edits-indicator-label` transformer to
enable customization of post edits indicator labels. Added integration
tests to validate customization and default behavior.
- Add `prevPost` and `nextPost` to post outlet params
- Add `prevPost` to `post-article-class` transformer
- Introduce `in-post-article` plugin outlet for adding extension points
to the post within the `article` itself
- Introduce `post-links` plugin outlet that wraps `PostLinks` component
(I chose to wrap here vs within the component to ensure that we render
the outlet even if there is not post links)
In the glimmer post stream, mutating `post.cooked` will cause ember to
re-render the HTML. That conflicts with d-ai's own morphlex-based diff
streaming.
To avoid this, we can wait until all streaming has finished before
setting the cooked property of the model.
Co-authored-by: Sérgio Saquetim <saquetim@discourse.org>
When on a tag intersection like this: `/tags/intersection/foo/bar`
We have our tag selector:
<img width="946" height="136" alt="image"
src="https://github.com/user-attachments/assets/6f64cec6-c8f0-456e-a139-769ae66584d1"
/>
When you remove all but one tag, we redirect to /tags, which isn't the
best experience. This change will direct users to the single tag page
`/tag/foo` instead.
The localStorage API has been a web standard for a very long time. It's
safe to assume it'll be available in all users browsers, so it makes
sense for the smoke test to match.
Also adds console logs to the smoke-test output, to make debugging
failures easier.
We only want to run this logic in the legacy mobile-mode. Setting the
query params in the new viewport-based mobile mode won't do anything.
Followup to 36a42c5ea7
This commit responds to feedback in the Discourse Meta discussion
https://meta.discourse.org/t/monospace-font-in-the-markdown-only-editor/359936
This change introduces a user preference that allows users to choose
whether the Markdown editor uses a monospace font. The default setting
is `true` for new sites, but set to `false` for existing sites to avoid
disrupting current users' experiences.
Admins can change the `default_other_enable_markdown_monospace_font`
site setting to manage this for all users.
There's a bug now where if a category localization exists for an
unsupported locale, its locale would show up defaulting to the first
item in the dropdown. By right, the dropdown only shows locales set in
`SiteSetting.content_localization_supported_locales`.
This commit makes sure that localization's locale is added to the dropdown.
When users were sent a notification when they were signed up to
an event with predefined attendance, the translation key was misssing,
since we originally needed to append `_html` to the key, but don't
anymore.
Handled this broken translation and used the eventName instead
of description in the notification, since the latter is not always
set and was not passed to I18n anyway.
<img width="1108" height="100" alt="image"
src="https://github.com/user-attachments/assets/d1d1ed16-237a-451b-b376-0c9f4acb9cd4"
/>
<img width="484" height="148" alt="image"
src="https://github.com/user-attachments/assets/bb793249-9c5e-4ef1-b045-abcef8706c97"
/>
This commit is a continuation of
https://github.com/discourse/discourse-ai/pull/1422.
Previously, we entirely skipped / disallowed localization. With this PR,
- For topics, we will only enqueue the translate title job if the post
revisor indicates there is a title change
- For posts, we will only enqueue the translate post job if there is a
post version change
Both jobs will be enqueued with a delay of
`SiteSetting.editing_grace_period` or `5 minutes`, whichever is larger.
Each topic or post may be retranslated to a locale at a maximum of twice
a day.