This commit fixes the flaky "Admin Customize Themes Config Area Page
when there are components installed loads more components when scrolling
to the bottom"
system test by reducing the height of the window to totally prevent
infinite
loading from triggering until we scroll.
When visiting a channel's members info route directly, the add member
button will always be shown because the logic to show the button assumes
that chat messages have been loaded. Skip for now while we figure out a
fix.
This commit removes `spec/system/user_invites_spec.rb` added in
55bf0e21fb. The system tests are flaky
because of the use of an [arbitrary `invite_redemption_delay` in
`User#invited_by`](https://github.com/discourse/discourse/blob/936ed3d8e78dfb802f37c5c36f2184710ab56c3e/app/models/user.rb#L613-L616).
In system test, the user is always going to be
created before the delay.
Also I don't think a system test is required here since we have unit
tests for the `User#invited_by` method. Hence, I'm removing the system
test instead of just fixing it.
The Horizon theme was overriding `btn-default` styles for the new topic
button in the sidebar with custom CSS to achieve `btn-primary` styles.
Ideally we should be able to swap out the class and rely on that!
<img width="299" height="258" alt="image"
src="https://github.com/user-attachments/assets/3485fb0b-4714-49ce-9ac4-7e1ac6fb358b"
/>
So here I
1. Convert CreateTopicButton to Glimmer component
2. Add `@btnTypeClass` param - Allows parent components to specify the
button type
(`btn-primary`, `btn-default`, etc.)
3. Separate concerns:
* `@btnClass` handles general class name needs (and existing use)
* `@btnTypeClass` handles core visual style
Prevents pathological issues with crawlers querying topic lists with
very large page parameters. The new limit also allows us to tweak this
under specific instances or circumstances (high traffic, for example).
A `page` parameter above the limit will throw an `InvalidParameters`
400 error.
---------
Co-authored-by: Martin Brennan <martin@discourse.org>
Repro steps:
- enable the assign plugin
- check the `unassigned on close` and `reassign on open` site settings
- assign a topic with more than 5 posts to a user
- view the topic and scroll to post 5 or more
- close the topic
- open the topic
- repeat a few times (behaviour can be inconsistent)
Expected: topic reloads without scrolling away from the current post.
Current behaviour: topic scrolls to OP. Notice in the video that it also
scrolls to OP for any other clients that are on the same topic
(left-side browser is of a random user).
https://github.com/user-attachments/assets/0cc79bf2-a2e9-4a1e-b3e3-5f2b19763d8c
Why? The assign plugin passes `reload_topic: true, refresh_stream: true`
via MessageBus. On the frontend code, when we reload the topic we did
not pass the `post_number` to the request, and therefore the current
position was lost. Passing the current post number to the topic reload
fixes the issue because then in the frontend the topic model maintains
the right position.
Another option is to not trigger `refresh_stream=true` here. It feels
unnecessary to do so for assignments that are opened/closed. That said,
other plugins also use this option and may have a valid reason to do so.
The test is flaky because the route which we are asserting for leads to
a redirect. If the assertion is called before the redirect, the test
passes. If the assertion is called after the redirect, the test fails.
Instead, we can just assert for the final state which we want to see.
The intermediate route itself is not important.
…for autoprefixer. This fixes missing prefixed props (like
`-webkit-text-size-adjust`) in cases where e.g. desktop Safari doesn't
support a property at all (`text-size-adjust`) but mobile Safari does
(but prefixed)
When escaping the composer discard draft modal, this change allows users
to continue editing and auto save their draft as usual. With this
change, escaping the modal has the same functionality as the Keep
Editing button.
Internal ref: /t/-/162257
When both parent and child categories had the same style type, the icon
and emoji values would leak from the child to the parent when generating
the category badge html. When processing categories recursively in this
way we should unset these values to ensure they are taken from the
ancestor category directly rather than from an option.
### Before
<img width="459" height="81" alt="Screenshot 2025-09-03 at 3 30 39 PM"
src="https://github.com/user-attachments/assets/476b10ed-b9f9-4d84-bae2-6cd0dfbbf507"
/>
### After
<img width="461" height="73" alt="Screenshot 2025-09-03 at 3 30 24 PM"
src="https://github.com/user-attachments/assets/55960899-f0db-43d1-9831-c6087c42349e"
/>
In some rare instance the provider of the "authOptions" might not be set
correctly. Instead of showing an string like "authenticated by [missing
%{provider value}]" we show a generic "ok" message.
Internal ref - /t/154880/58
During in-container updates, the old version of the application
continues running while an update is applied. That means that it's
possible for the `node_modules/ember-source` version to be different to
the version currently loaded in the transpiler. That means it's
theoretically possible for theme assets to be built with the old
compiler, and then stored against the new version.
This commit removes that race condition by adding an `ember_version`
method to the JS transpiler. This is guaranteed to give us an accurate
version number for the template-compiler currently being used for
themes.
This commit also bumps the BASE_COMPILER_VERSION to force a recompile on
any sites affected by this race condition.
This import will fail for non-admin users. Most of the time this isn't
causing a problem, since `edit-category-general` isn't imported by
non-admin logic. However, if a theme imports or calls `modifyClass` on
it, this import will be evaluated and fail.
This was affecting an initializer in the discourse-air theme for
non-admin users. However, the automatic error recovery for theme
initializers caught it, so the only impact was a console log.