Commit Graph

34580 Commits

Author SHA1 Message Date
7da4fe82b6 FIX: redirect to parent tag when synonym page visited (#31688)
When a synonym page is visited, the user should be redirected to the
parent tag.
2025-03-10 09:45:38 +11:00
3cab4afd28 Build(deps-dev): Bump @swc/core from 1.11.7 to 1.11.8 (#31723)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.7 to
1.11.8.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/swc-project/swc/compare/v1.11.7...v1.11.8)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-09 23:22:33 +01:00
1d1db19775 Build(deps): Bump autoprefixer from 10.4.20 to 10.4.21 (#31724)
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from
10.4.20 to 10.4.21.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
-
[Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/postcss/autoprefixer/compare/10.4.20...10.4.21)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-03-09 23:22:23 +01:00
c6a3e40d1f UX: hide tag separator for box/bullet styles (#31709)
This is a follow-up to
55a3a4e69e,
the tag separator should be hidden for box/bullet tag styles
2025-03-07 13:09:03 -05:00
e124b54c84 Build(deps): Bump @faker-js/faker from 9.5.1 to 9.6.0 (#31705)
Bumps [@faker-js/faker](https://github.com/faker-js/faker) from 9.5.1 to
9.6.0.
- [Release notes](https://github.com/faker-js/faker/releases)
- [Changelog](https://github.com/faker-js/faker/blob/next/CHANGELOG.md)
- [Commits](https://github.com/faker-js/faker/compare/v9.5.1...v9.6.0)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-07 17:28:33 +01:00
55a3a4e69e FEATURE: customizable tag separator with value transformer in proper HTML (#31674)
We were using CSS to add commas between tags like this: 


![image](https://github.com/user-attachments/assets/9de36cd1-35c5-4778-acb6-a39fb0dfaf48)


but this is kind of a hacky way to add content and we've also ended up
with a separate encoding issue side-effect


<img width="400"
src="https://github.com/user-attachments/assets/dc155c69-1a3c-4f88-952c-fe1756e4cffe"
/>


So this avoids that whole thing by adding the commas in the HTML
properly — this also unlocks a bonus feature of using our value
transformer system so it's easy to change the separator like this:

```js
import { apiInitializer } from "discourse/lib/api";

export default apiInitializer((api) => {
  api.registerValueTransformer("tag-separator", ({ value, context }) => {
    return "|"
  });
});
```

to get: 


![image](https://github.com/user-attachments/assets/289bcbe1-f93d-4bb3-856d-8a16a471b3b7)
2025-03-07 08:59:06 -05:00
908cd542c9 UX: adjust progress bar position when composer preview is hidden (#31679)
this adjusts the topic progress bar when the composer is open and the
preview is hidden, so it properly aligns:

Before:

![image](https://github.com/user-attachments/assets/7cb1868b-c608-4e02-820b-5120cc55090f)


After:

![image](https://github.com/user-attachments/assets/4f791f17-b309-4047-9085-2c3f0e34ad99)
2025-03-07 08:52:24 -05:00
340441e17e DEV: discourse-emojis 1.0.37 (#31698)
Changes:

- symlinks aliases instead of copies
- symlinks fallbacks instead of copies
- tada is main emoji instead of party_popper
- removed emoji with accents and just use the non accent version
- smiley is main emoji instead of grinning_face_with_big_eyes
2025-03-07 13:13:22 +01:00
e77e5bd3cc FIX: If a tag has a description, use it for the meta description. (#31689)
When a tag has a description defined, we should use that in the `<meta
name="description"...` tag on the tagged topic list page. This matches
the behaviour on the equivalent category pages.
2025-03-07 12:53:54 +11:00
b9e037471e FEATURE: add typographer-replacements rich editor extension (#31182)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds input rules to support the same [custom typographer
replacements](https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse-markdown-it/src/features/custom-typographer-replacements.js)
we support when cooking.
2025-03-06 20:56:55 -03:00
71303a509f FEATURE: add html-block rich editor extension (#31181)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `html_block` node and its parsing/serialization logic.

It's rendered as a code block with HTML syntax highlighting, and
serialized as-is to the Markdown output.
2025-03-06 20:52:18 -03:00
03429b0f8f FEATURE: add html-inline rich editor extension (#31180)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Adds an `html_inline` node for a subset for allowed HTML, its
parsing/serializing logic, and an input rule to auto-trigger the node
creation when a `<allowedtag>` is typed.

Not related to the above, but I also renamed the tests that don't define
a template from `gjs` to `js`.
2025-03-06 20:47:46 -03:00
a5cacde681 FEATURE: add code-block rich editor extension (#31179)
Continues the work done on
https://github.com/discourse/discourse/pull/30815.

Extends the ProseMirror-markdown `code-block` node by integrating our
existing HighlightJS pipeline for code highlighting and adding a node
view with a `<select>` to change the language of the block.

We're also adding the markdown paste extension, which handles converting
pasted text/plain to rich content if it contains Markdown.

---------

Co-authored-by: Martin Brennan <martin@discourse.org>
2025-03-06 20:43:33 -03:00
915e72033d DEV: Move bulk-select-enabled from body to topic-list element (#31687)
Followup to 41eb83a40185e43feb964288a5ebc5a903f05e13
2025-03-06 23:12:10 +00:00
23dd5c20d3 Build(deps-dev): Bump ember-cli-deprecation-workflow from 3.1.0 to 3.2.0 (#31682)
Bumps
[ember-cli-deprecation-workflow](https://github.com/ember-cli/ember-cli-deprecation-workflow)
from 3.1.0 to 3.2.0.
- [Release
notes](https://github.com/ember-cli/ember-cli-deprecation-workflow/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli-deprecation-workflow/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli-deprecation-workflow/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-06 23:56:17 +01:00
0976e4ad18 Build(deps-dev): Bump ember-cli from 6.2.2 to 6.2.3 (#31680)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 6.2.2 to
6.2.3.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
-
[Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
-
[Commits](https://github.com/ember-cli/ember-cli/compare/v6.2.2...v6.2.3)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-03-06 23:55:16 +01:00
41eb83a401 DEV: Add body class when bulk select is enabled (#31677) 2025-03-06 14:53:32 -06:00
5b092d4466 FIX: ensures emoji picker loader is centered (#31676)
before:
![Screenshot 2025-03-06 at 21 04
32](https://github.com/user-attachments/assets/080d188b-f3ad-48a6-aee7-e8d4be36d407)

after:
![Screenshot 2025-03-06 at 21 04
28](https://github.com/user-attachments/assets/6e131e66-7cc4-45e3-a783-d2774dbf92b4)
2025-03-06 21:19:01 +01:00
0e8d36d080 DEV: Fixup theme detection for template-override deprecation (#31672) 2025-03-06 16:46:06 +00:00
ac736ec0ca DEV: merge mobile stylesheets into common with breakpoints (#31656)
This is the beginning of a longer process to merge our stylesheets under
the common directory.

I also converted a SCSS variable to a CSS custom property along the way.

In the case of the lightbox styles, this seemed more appropriate to
distinguish by primary input type (touch vs mouse) rather than
breakpoint sizes.
2025-03-06 08:44:54 -05:00
9dd26a3954 DEV: discourse-emojis 1.0.32 (#31669)
This gems bring a whole improved fluentui emoji set. Each image has been
recomputed to optimise the size of the emoji and remove useless margins.

For this reason the version has been bumped.

Other changes:
- not loading rake task dependencies in production
- renamed yo_yo/yo-yo to yoyo
2025-03-06 10:35:04 +01:00
c6b4a09ad9 UX: remove padding in admin card section (#31666)
Before
<img width="1064" alt="Screenshot 2025-03-06 at 3 05 55 pm"
src="https://github.com/user-attachments/assets/38acc2cd-1204-42ec-aac7-18dfee32e8bc"
/>


After
<img width="949" alt="Screenshot 2025-03-06 at 3 06 44 pm"
src="https://github.com/user-attachments/assets/ded3c81f-8057-483d-b997-d1983ccf1318"
/>
2025-03-06 16:35:25 +11:00
ba19430286 DEV: Add a PluginOutlet for mobile-view topic activity number (#31567)
This commit adds a PluginOutlet for activity number in mobile view, so I
can override it with my theme component.

Why?
======

In this theme component
https://meta.discourse.org/t/show-both-op-and-last-reply-on-mobile/267944,
I need to add an avatar to the post time to indicate the last poster.


![image](https://github.com/user-attachments/assets/a33ff8ed-50c6-4bc4-a093-115578ad9bad)

Without this outlet, I can't do this, having to rewrite the entire
`item.gjs`, or use some vanilla JavaScript tricks to do it.

---------

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2025-03-06 10:50:43 +08:00
bbc1c2726c Revert "DEV: discourse-emojis 1.0.31 (#31655)" (#31662)
This reverts commit 7e65cdbc9aa86677a2f6f7a8d4f1b8e87da07ff1.

It broke the production build, as it's trying to load
`selenium-webdriver` (a dev dep) in the production env.
2025-03-06 00:40:01 +01:00
6882453ab7 UX: card section toggle (#31644)
Demo

https://github.com/user-attachments/assets/17e2b6d9-ba49-4312-85d9-6ff2ccad2290
2025-03-06 10:31:29 +11:00
593f4f7592 Build(deps-dev): Bump ember-exam from 9.0.0 to 9.1.0 (#31660)
Bumps [ember-exam](https://github.com/ember-cli/ember-exam) from 9.0.0
to 9.1.0.
- [Release notes](https://github.com/ember-cli/ember-exam/releases)
-
[Changelog](https://github.com/ember-cli/ember-exam/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-exam/commits)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 23:40:29 +01:00
7e65cdbc9a DEV: discourse-emojis 1.0.31 (#31655)
This gems bring a whole improved fluentui emoji set. Each image has been
recomputed to optimize the size of the emoji and remove useless margins.

For this reason the version has been bumped.

Other notable change: the emoji yo-yo can now be called "yoyo".
2025-03-05 21:49:18 +01:00
faa985bf28 DEV: Add search_result_view app event to SearchMenu (#31632)
For plugins/themes to be able to hook into after search result review is
rendered
2025-03-05 12:20:56 -06:00
f9e4ac94f5 DEV: Add a new behavior transformer to topic list item click (#31653)
- Add the behavior transformer `topic-list-item-click` to allow the
customization for the click behavior on the topic list item.
2025-03-05 15:15:17 -03:00
299b1b42ec DEV: Reduce the use of self/set in tests (#31648)
still lots to update but it's a start
2025-03-05 13:10:20 +01:00
0684ac64f2 DEV: Remove the deprecated componentTest helper (#31649) 2025-03-05 12:50:12 +01:00
95939ca499 DEV: set field type in control wrapper (#31647)
Calling `<field.Calendar>` will ultimately call `componentFor` which
will mutate the type of the field. Problem is the way we use a hash to
define all the available controls, would work correctly on first render,
but because of the mutation in `componentFor` if something would trigger
a re-render it would have to evaluate all the `componentFor` calls, and
the last one would "win" (currently calendar), which would mean that a
field rendered as custom would for example become calendar.

The easiest repro was:

```gjs
<Form as |form|>
  <form.field as |field|>
    {{log field}}
    <field.Custom>
      Hello world
    </field.Custom>
  </form.field>
</Form>
```

The fix for now is to mutate the value at the point where the component
is actually rendered, in control-wrapper.

A possibly more correct longer term fix could be to change the API, to
set the type on the field when defined in the template, and render a
generic component which would use this type to know what to render:

```gjs
<form.field @type="calendar" as |field|>
  <field.Control @someCalendarOption="bar" />
</form.field>
```
2025-03-05 11:43:53 +01:00
ba262733a6 A11Y: Improve contrast for FormKit help text and optional text (#31645) 2025-03-04 22:29:15 -07:00
63213398bf UX: Add left border to indented field and update caret for consistency (#31643)
* Added a subtle left border to the indented field to improve visual
hierarchy
* Updated the caret to align with other expandable elements for
consistency
2025-03-05 14:29:51 +11:00
e4401e587e FIX: Ensure queued posts with watched words are processed correctly. (#31641)
This change ensures that queued posts that have ended up in the review queue due to matched a watched word display correctly.

It also improves the data checking to ensure that any other reviewables with watched words don't break the review queue, either.
2025-03-05 13:59:42 +11:00
223b40de1c FEATURE: Store composer version and device info on post stat (#31600)
We are developing our new composer, and it would be useful
if we could know how posts are being created by members.

To this end, we are going to start storing the following
on post_stats, which are created at the same time as a post
is created:

* writing_device - Based on `BrowserDetection.device`, which in
  turn is based on user agent. Will store .e.g iphone, android,
  mac, windows etc.
* writing_user_agent - Stores the full user agent (truncated at
  400 chars) of the device/browser the member used to write the post.
* composer_version - Either `1` for our old composer, or
  `2` if the new rich composer is enabled in site settings and
  the user has toggled it on
2025-03-05 12:48:32 +10:00
702a2a9cbc UX: display html tags in silence reason (#31598)
Allow HTML tags in silence reason. Tags must be stripped for title
attribute.

Before

![image](https://github.com/user-attachments/assets/05d9819a-9dbf-46b2-b9c5-88187ca9af5b)


After
<img width="1079" alt="Screenshot 2025-03-04 at 11 39 05 am"
src="https://github.com/user-attachments/assets/2bb41deb-227c-47a8-b840-b0316a764252"
/>
<img width="1096" alt="Screenshot 2025-03-04 at 11 39 22 am"
src="https://github.com/user-attachments/assets/02e27fc0-317e-43df-bce8-6b68e48ac40e"
/>
2025-03-05 12:43:03 +11:00
828fcb1ad3 DEV: Add rake task to bulk delete posts (#31642)
Same as #31576, but in that one I added some support files that turned out to be unnecessary and broke the build. So this is the re-do. 🙏
2025-03-05 09:31:23 +08:00
72ba574d6f DEV: Convert tests using the gjs codemod (#31625)
```sh
pnpm dlx @embroider/template-tag-codemod@alpha --relativeLocalPaths=false --nativeRouteTemplates=false --nativeLexicalThis=false --templateInsertion="end"
```
2025-03-05 01:37:30 +01:00
28e00d9bfe DEV: Update lint-configs and autofix issues (#31620)
This updates us to Prettier 3.x
2025-03-05 01:20:16 +01:00
f8b30ffd06 Build(deps-dev): Bump @swc/core from 1.11.5 to 1.11.7 (#31636)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.11.5 to
1.11.7.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
-
[Commits](https://github.com/swc-project/swc/compare/v1.11.5...v1.11.7)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-05 00:26:30 +01:00
143550a93b Build(deps-dev): Bump babel-import-util from 3.0.0 to 3.0.1 (#31635)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from
3.0.0 to 3.0.1.
- [Release notes](https://github.com/ef4/babel-import-util/releases)
-
[Changelog](https://github.com/ef4/babel-import-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ef4/babel-import-util/commits)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Discourse CI <ci@ci.invalid>
2025-03-05 00:03:22 +01:00
c1d9887ead FIX: only show small user list if users has length (#31631)
Need to check length here so we're not exposing the component when there
are no users, fixes:
https://meta.discourse.org/t/expanding-topic-actions-displays-who-liked-the-posts-but-nobody-has-liked-it/355225

follow-up to
5312550bf9
2025-03-04 16:50:41 -05:00
2ab00c5b37 DEV: Add apply_modifier on group's mentionable scope (#31565)
This PR adds DiscoursePluginRegistry.apply_modifier on group's
mentionable scope.
2025-03-04 15:36:55 -06:00
dde1b523b6 DEV: Update template-override deprecation (#31623)
- Update Meta topic URLs

- Add theme/plugin identification to deprecation

- Enable admin warning banner

- Enable overriding of gjs component templates, to unblock core upgrade
work between now and final removal of the template override feature

https://meta.discourse.org/t/355668
2025-03-04 18:49:49 +00:00
2041eaf89d DEV: Drop PluginOutlet parentView and DButton string actions (#31624)
These have been deprecated, with admin warnings, for some time
2025-03-04 18:48:56 +00:00
3160ad8fb0 DEV: Convert d-button test classes to native syntax (#31622) 2025-03-04 18:44:07 +01:00
150edff1cf DEV: Use an inline require to avoid a circular import (#31615) 2025-03-04 17:34:44 +01:00
b0cf0f89be DEV: Inline the test templates (#31614)
in preparation for running the gjs codemod
2025-03-04 17:34:22 +01:00
5aa47a26ee DEV: Remove unused modal code (#31613) 2025-03-04 17:24:17 +01:00