Commit Graph

32240 Commits

Author SHA1 Message Date
Natalie Tay
113e6fd274
DEV: Increase external avatar url limit (#26966) 2024-05-10 16:19:23 +08:00
Joffrey JAFFEUX
2a2eaf835f
FIX: disables the modal on mobile bookmark-menu (#26958)
It's a temporary solution while I work a better solution. The problem here is quite tricky. We are showing a modal from a modal. But if we close the previous modal, before the second one is show it means we destroy the menu holding the first modal which prevents showing the second modal.

One possible solution would be to refactor d-modal’s show function. At the moment if you await on show it will await until closed and not when the modal has been inserted to the DOM. It means we don't have a clean moment to close the d-menu.

The second issue it that even though it's possible to have multiple modals on screen, the close modal assumes only one active modal at a time.
2024-05-09 22:17:31 +02:00
Joffrey JAFFEUX
9e696a0305
FIX: allows to disable body scroll lock on swipe modifier (#26957)
Cases like the glimmer-site-header are complex because the swiped area is not the moved target, for now it's simpler to not apply the body scroll lock automatically.

A new property is now available on the swipe modifier: `{{swipe @lockBody=false}}`

Note I tried to have tests for this modifier in the past, but it was very inconsistent on CI causing lots of flakeys, this is why there are no tests for now. I might try to write them again using system specs.
2024-05-09 21:16:27 +02:00
Joffrey JAFFEUX
cb9817acb6
FIX: close d-menu before action in topic menu (#26956)
Prior to this fix we were making the action and then closing the d-menu which in this case would be a modal and close the modal opened by the action.
2024-05-09 21:08:15 +02:00
carson chang
4fad0b33eb
UX: Use breakpoint CSS variable instead of arbitrary 570px (#26945)
* Update header.scss

* Update discourse.scss
2024-05-09 09:16:24 -07:00
Mark Reeves
ce798ac2af
FIX: Open Powered-by link in new tab (#26953)
Opening the Discourse Powered-by link in a new tab doesn't take away from focus in the forum, avoids back button issues.
2024-05-09 11:08:01 -04:00
Vinoth Kannan
9747037554
FIX: update duration & interval when input values updated. (#26796)
Previously, we only updated the duration and interval values in the constructor. So whenever the initial values are updated in the form the changes are not reflected in the UI. To fix this issue we're using "get" methods in this PR.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-05-09 18:06:19 +08:00
Jarek Radosz
20e049bcbc
DEV: Minor refactor of d-menu/d-tooltip (#26942)
* `menuInstance` cached getter -> prop
* `next()` and a `trigger` check -> gone
* `allowedProperties` action -> getter
* `keys` -> `entries`
* update the `service` import
* flatten the object spread structures
2024-05-09 10:54:37 +02:00
Rishabh
69158ebb5c
Update /powered-by link to final target (#26950) 2024-05-09 13:00:08 +05:30
Alan Guo Xiang Tan
7079698cdf
FIX: Use MaxMind supplied permalinks to download MaxMind databases (#26847)
This commit switches `DiscourseIpInfo.mmdb_download` to use the
permalinks supplied by MaxMind to download the MaxMind databases as
specified in
https://dev.maxmind.com/geoip/updating-databases#directly-downloading-databases
which states:

```
To directly download databases, follow these steps:

1. In the "Download Links" column, click "Get Permalink(s)" for the desired database.
2. Copy the permalink(s) provided in the modal window.
3. Provide your account ID and your license key using Basic Authentication to authenticate.
```

Previously we are downloading from `https://download.maxmind.com/app/geoip_download` but this is not
documented anyway on MaxMind's docs so this URL can in theory break
in the future without warning. Therefore, we are taking a proactive
approach to download the databases from MaxMind the recommended way
instead of relying on a hidden URL. This old way of downloading the
databases with only a license key will be deprecated in 3.3 and be
removed in 3.4.
2024-05-09 15:11:56 +08:00
Martin Brennan
abb073b80a
UX: Add CSS for admin plugin empty list CTA (#26949)
This adds `admin-plugin-config-area__empty-list`,
allows us to standardize on CTA styling for empty lists.
2024-05-09 12:46:41 +10:00
Keegan George
0695424c92
DEV: Bump ember-instantsearch to v1.1.2 (#26943) 2024-05-08 13:06:59 -07:00
Jarek Radosz
e579cfc08f
DEV: Avoid using the old action helper (#26935) 2024-05-08 20:26:48 +02:00
Jarek Radosz
1b80ee9eb7
FIX: Track User.status property (#26941)
Fixes a bug I stumbled upon in dev env:

```
Error: Assertion Failed: You attempted to update <discourse@model:user::ember337>.status to "[object Object]", but it is being tracked by a tracking context, such as a template, computed property, or observer. In order to make sure the context updates properly, you must invalidate the property when updating it. You can mark the property as `@tracked`, or use `@ember/object#set` to do this.
```
2024-05-08 19:07:43 +02:00
Jan Cernik
7bc7ad45bb
UX: Merge the redesign experiment for embedded replies (#26876)
This PR merges the [design experiment](https://meta.discourse.org/t/embedded-replies-feedback/290538) based on the [Custom embedded replies component](https://meta.discourse.org/t/custom-embedded-replies/272670) created by [Don](https://meta.discourse.org/u/don/summary)

---------

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2024-05-08 18:00:17 +02:00
Joffrey JAFFEUX
9bf763d03f
FIX: inject current user service in category model (#26937) 2024-05-08 14:09:00 +02:00
Jarek Radosz
5d7aff12a7
DEV: Convert dialog-holder to gjs (#26869) 2024-05-08 13:04:01 +02:00
Joffrey JAFFEUX
7896d00a7a
FIX: incorrect divider in topic admin menu (#26934)
Adds a divider only if we are staff or have extra buttons.
2024-05-08 11:49:04 +02:00
David Taylor
0f4520867b
DEV: @babel/plugin-proposal-decorators -> decorator-transforms (#25290)
decorator-transforms (https://github.com/ef4/decorator-transforms) is a modern replacement for babel's plugin-proposal-decorators. It provides a decorator implementation using modern browser features, without needing to enable babel's full suite of class feature transformations. This improves the developer experience and performance.

In local testing with Google's 'tachometer' tool, this reduces Discourse's 'init-to-render' time by around 3-4% (230ms -> 222ms).

It reduces our initial gzip'd JS payloads by 3.2% (2.43MB -> 2.35MB), or 7.5% (14.5MB -> 13.4MB) uncompressed.
2024-05-08 10:40:51 +01:00
dependabot[bot]
592d05cb9c
Build(deps): Bump babel-plugin-ember-template-compilation (#26932)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.3 to 2.2.4.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 11:11:09 +02:00
dependabot[bot]
34b9b3f6a7
Build(deps): Bump the embroider group with 3 updates (#26931)
Bumps the embroider group with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/router](https://github.com/embroider-build/embroider/tree/HEAD/packages/router) and [@embroider/addon-shim](https://github.com/embroider-build/embroider/tree/HEAD/packages/addon-shim).


Updates `@embroider/compat` from 3.4.9 to 3.5.0
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/router` from 2.1.6 to 2.1.7
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/router)

Updates `@embroider/addon-shim` from 1.8.7 to 1.8.8
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/addon-shim)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
- dependency-name: "@embroider/router"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/addon-shim"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 11:10:45 +02:00
Rishabh
a20e0ef0b6
powered-by-discourse should link to /about instead (#26930) 2024-05-08 18:45:08 +10:00
dependabot[bot]
93e55ed355
Build(deps-dev): Bump @types/jquery in the types group (#26918)
Bumps the types group with 1 update: [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery).


Updates `@types/jquery` from 3.5.29 to 3.5.30
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

---
updated-dependencies:
- dependency-name: "@types/jquery"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 10:40:14 +02:00
Joffrey JAFFEUX
cf8b81771f
DEV: implements <DropdownMenu /> (#26917)
DropdownMenu component is meant as a way to describe the content of menus.

Syntax:

```
<DropdownMenu as |dm|>
  <dm.item class="test">
    First
  </dm.item>
  <dm.divider class="foo" />
  <dm.item class="bar">
    Second
  </dm.item>
</DropdownMenu>
```
2024-05-08 09:08:42 +02:00
dependabot[bot]
7744e8ac85
Build(deps-dev): Bump sinon from 17.0.1 to 17.0.2 (#26920)
Bumps [sinon](https://github.com/sinonjs/sinon) from 17.0.1 to 17.0.2.
- [Release notes](https://github.com/sinonjs/sinon/releases)
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md)
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.1...v17.0.2)

---
updated-dependencies:
- dependency-name: sinon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 14:08:39 +08:00
dependabot[bot]
b67513eb28
Build(deps-dev): Bump sass from 1.76.0 to 1.77.0 (#26921)
Bumps [sass](https://github.com/sass/dart-sass) from 1.76.0 to 1.77.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.76.0...1.77.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-08 14:08:20 +08:00
Krzysztof Kotlarek
b3f321e333
Revert "FEATURE: revert redirect from wizard to guide (#26873)" (#26916)
This reverts commit 74f1a79d36.
2024-05-08 08:46:30 +10:00
Joffrey JAFFEUX
fe16633a0c
DEV: allows for multiple menus/tooltips (#26823)
menus and tooltips are now appended to their own portals. The service are the only responsible for managing the instances, prior to this commit, services could manage one instance, but the DMenu and DTooltip components could also take over which could cause unexpected states.

This change also allows nested menus/tooltips.

Other notable changes:

- few months ago core copied the CloseOnClickOutside modifier of float-kit without removing the float-kit one, this commit now only use the core one.
- the close function is now trully async
- the close function accepts an instance or an identifier as parameter
2024-05-07 23:48:44 +02:00
Jarek Radosz
b49fc052eb
DEV: Use current-user service wherever possible (#26901) 2024-05-07 22:19:42 +02:00
Sérgio Saquetim
e992cf1507
DEV: Prevent removed keys from being resolved in the DAG (#26912) 2024-05-07 16:59:36 -03:00
chapoi
4edc011d10
UX: use quaternary colour for keyboard navigation (#26911) 2024-05-07 20:20:16 +02:00
Joffrey JAFFEUX
49661d7098
DEV: removes flakey tests (#26909)
Removes tests, just can't be made resilient on CI
2024-05-07 18:55:42 +02:00
Joffrey JAFFEUX
92a59e2480
DEV: uses swipe-events lib for swipe modifier (#26905)
This commit also:

uses the swipe modifier in the glimmer-site-header component
changes closing condition for d-modal and toast from distance to velocity
cancels toast auto close on touch
2024-05-07 17:43:37 +02:00
Joffrey JAFFEUX
69e5c9f611
FIX: prevents flakey due to usernames with quotes (#26907)
Faker could generate usernames like `D'angelo` and that doesn’t work out nicely for our tests. Using domain names seems safer.
2024-05-07 17:41:49 +02:00
Kris
01e725a225
DEV: Remove default button classes from sidebar buttons (#26893) 2024-05-07 09:20:30 -04:00
Joffrey JAFFEUX
6b36b31ee0
rebase + fix typo (#26902) 2024-05-07 13:45:50 +02:00
Alan Guo Xiang Tan
0b947b6aab
DEV: Improve code comment about when ignored columns can be removed (#26894)
Ignored columns can only be dropped when its associated post-deploy
migration has been promoted to a regular migration. This is so because
Discourse doesn't rely on a schema file system to setup a brand new
database and thus the column information will be loaded by the
application first before the post-deploy migration runs.
2024-05-07 11:06:31 +08:00
Jarek Radosz
16cd098de9
DEV: Convert count-i18n to gjs (#26888) 2024-05-06 21:03:39 +02:00
Jarek Radosz
79870d3a1e
DEV: Fix random typos (#26881) 2024-05-06 20:52:48 +02:00
Jarek Radosz
d8b1c3c807
DEV: Don't add 0-width char if there's no icon in d-button (#26880)
Previously, if you supplied your own content to DButton it would still add the character:

```hbs
<DButton>my text</DButton>
```

```html
<button>&#8203; my text</button>
```
2024-05-06 20:52:11 +02:00
Jarek Radosz
378faf060d
Revert "DEV: Remove unused ignored_columns from ActiveRecord models (#26875)" (#26887)
This reverts commit 755ff43dc1.
2024-05-06 20:18:53 +02:00
Daniel Waterworth
e2ceea8815
FIX: Preload all ancestors of sidebar categories (#26715)
... instead of just the immediate parents.
2024-05-06 11:55:20 -05:00
Daniel Waterworth
a6b8051645
DEV: Use has_many and ArraySerializer for SidebarSectionsSerializer (#26716) 2024-05-06 11:32:18 -05:00
Régis Hanol
10f77556cd FIX: ensure no infinite category loop
If there's ever a circular reference in categories, don't go into an infinite loop when generating the category slug.

Instead, keep track of parent ids, and bail out as soon as we're encountering one more than once.
2024-05-06 18:02:22 +02:00
Régis Hanol
95885645d9 FIX: send activity summaries based on "last seen"
instead of "last emailed" so that people getting email notifications (from a watched topic for example) also get the activity summaries.

Context - https://meta.discourse.org/t/activity-summary-not-sent-if-other-emails-are-sent/293040

Internal Ref - t//125582
2024-05-06 15:22:52 +02:00
dependabot[bot]
22db0b56e6
Build(deps-dev): Bump @floating-ui/dom from 1.6.4 to 1.6.5 (#26870)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.4 to 1.6.5.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.5/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 10:45:11 +02:00
dependabot[bot]
832bbe93c8
Build(deps): Bump babel-plugin-ember-template-compilation (#26871)
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.2 to 2.2.3.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/commits)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-06 10:43:33 +02:00
Ted Johansson
9655bf3e24
DEV: Delete upload references on draft cleanup (#26877)
In #22851 we added a dependent strategy for deleting upload references when a draft is destroyed. This, however, didn't catch all cases, because we still have some code that issues DELETE drafts queries directly to the database. Specifically in the weekly cleanup job handled by Draft#cleanup!.

This PR fixes that by turning the raw query into an ActiveRecord #destroy_all, which will invoke the dependent strategy that ultimately deletes the upload references. It also includes a post migration to clear orphaned upload references that are already in the database.
2024-05-06 14:08:10 +08:00
Krzysztof Kotlarek
74f1a79d36
FEATURE: revert redirect from wizard to guide (#26873)
In this PR we started redirecting to the guide page after the wizard - https://github.com/discourse/discourse/pull/26696

The guide will require rebrand and until it is ready, we should redirect to `/latest`
2024-05-06 14:56:35 +10:00
Alan Guo Xiang Tan
b6f6852bba
FIX: Make getCategoryIdByName theme migration helper case insensitive (#26878) 2024-05-06 12:42:58 +08:00
Alan Guo Xiang Tan
755ff43dc1
DEV: Remove unused ignored_columns from ActiveRecord models (#26875)
The columns have already been dropped in
beea8215d7.
2024-05-06 11:42:08 +10:00
Daniel Waterworth
e5597cd196
DEV: Make edit sidebar categories modal load more results incrementally (#26761) 2024-05-03 12:39:45 -05:00
Penar Musaraj
d6b63309b0
FIX: Restore legacy popup menu SCSS (#26864)
Were removed in 8dd883d but some plugins rely on them. Let's restore
them for now and address cleaning up once plugins/themes no longer use
them.

Should fix https://meta.discourse.org/t/see-who-voted-display-issue/306641
2024-05-03 12:27:09 -04:00
SouthpawKB
9ce4503a26
UX: Increase custom user field description character limit (#26863)
* UX: Increase custom user field description character limit

Allow Admins creating custom user fields to write longer descriptions

* lint
2024-05-03 12:09:55 -04:00
Joffrey JAFFEUX
d795e22804
FIX: adds support for location and details in ICS calendar (#26862) 2024-05-03 16:27:26 +02:00
Jan Cernik
5ac7e01b8d
FIX: Select posts menu styles (#26857) 2024-05-03 01:33:09 -03:00
Martin Brennan
b1a78d9080
FIX: Do not show bookmark button label in PM topic footer (#26858)
Followup 2d2329095c

Previous to the above commit, in PMs the bookmark button
was icon-only and did not show a label. This restores the
same functionality.
2024-05-03 14:33:00 +10:00
Alan Guo Xiang Tan
243fcb6ffc
DEV: Introduce run_theme_migration spec helper in test environment (#26845)
This commit introduces the `run_theme_migration` spec helper to allow
theme developers to write RSpec tests for theme migrations. For example,
this allows the following RSpec test to be written in themes:

```
RSpec.describe "0003-migrate-small-links-setting migration" do
  let!(:theme) { upload_theme_component }

  it "should set target property to `_blank` if previous target component is not valid or empty" do
    theme.theme_settings.create!(
      name: "small_links",
      theme: theme,
      data_type: ThemeSetting.types[:string],
      value: "some text, #|some text 2, #, invalid target",
    )

    run_theme_migration(theme, "0003-migrate-small-links-setting")

    expect(theme.settings[:small_links].value).to eq(
      [
        { "text" => "some text", "url" => "#", "target" => "_blank" },
        { "text" => "some text 2", "url" => "#", "target" => "_blank" },
      ],
    )
  end
end
```

This change is being introduced because we realised that writting just
javascript tests for the migrations is insufficient since javascript
tests do not ensure that the migrated theme settings can actually be
successfully saved into the database. Hence, we are introduce this
helper as a way for theme developers to write "end-to-end" migrations
tests.
2024-05-03 06:29:18 +08:00
David Taylor
6bfc81978c
DEV: Improve built-in browser performance marks/measurements (#26758)
- Rename `discourse-booted` to 'discourse-init' (because 'booted' makes it sound like boot was finished. When in fact, it was just starting)

- Introduce `discourse-paint`, which is fired after the Ember application has been painted to the screen by the browser. This happens slightly after DOMContentLoaded

- Add a `performance.measure` call to link those two marks, so they're easily visible in performance traces

Also removes an ember boot-order workaround which is no longer required.
2024-05-02 23:07:36 +01:00
Daniel Waterworth
d937f5b098
DEV: Use safer SQL function for string queries when searching groups (#26851)
... so that special characters in 'term' aren't interpreted by ILIKE.
2024-05-02 13:41:49 -05:00
dependabot[bot]
12cb557eb5
Build(deps): Bump decorator-transforms from 1.2.1 to 2.0.0 (#26788)
Bumps [decorator-transforms](https://github.com/ef4/decorator-transforms) from 1.2.1 to 2.0.0.
- [Release notes](https://github.com/ef4/decorator-transforms/releases)
- [Changelog](https://github.com/ef4/decorator-transforms/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ef4/decorator-transforms/commits)

---
updated-dependencies:
- dependency-name: decorator-transforms
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-02 17:16:30 +01:00
David Taylor
9db5eafb15
PERF: Improve production JS build in low-memory environments (#26849)
- Use 'cheap-source-map' webpack config on low-memory machines

  This results in worse quality sourcemaps in browser dev tools, but it significantly reduces memory use in our webpack build. In approximate local testing it drops from 1100mb to 590mb. This should make the rebuild process on low-memory machines much faster and less likely to trigger OOM errors.

  In development, and on higher-memory machines, the higher-quality 'source-map' option is maintained.

- Disable Webpack's built-in `minimize` feature. Embroider already applies Terser after the webpack build is complete. There is no need to double-minimize the output.

- Update ember-cli-progress-ci to print to stderr instead of stdout. For some reason, pups (used by discourse_docker) buffers the stdout of commands and only prints when they are finished. stderr does not have this same limitation, so switching will mean sysadmins can see the progress of the ember build in real-time.

Given the number of variables it's hard to promise exact numbers. But, in my tests on a DO droplet with 1GB RAM (+2GB swap), this reduced the `ember build` portion of a `./launcher rebuild app` from ~50 minutes to ~15 minutes.
2024-05-02 11:43:59 +01:00
Martin Brennan
914f93b896
DEV: Add more structure for admin plugin config nav (#26707)
* Simplify config nav link generation to always inject the Settings
  tab
* Auto-redirect to the first non-settings config link (if there is one)
  when the user lands on /admin/plugins/:plugin_id
* Add `extras` to admin plugin serializer so plugins can add more
  data on first load
* Add PikadayCalendar page object for system specs, extracted from the
CalendarDateTimePicker to make it more generic.
2024-05-02 11:36:46 +10:00
Daniel Waterworth
07dc6efdc9
DEV: Use safer SQL functions for string queries in CategoryHashTagDataSource (#26836)
Instead of `LIKE`, use either `starts_with` or `position`. This way the
term isn't interpreted as a pattern.
2024-05-01 13:27:46 -05:00
Isaac Janzen
dc54884c1a
DEV: Backport after-header-panel plugin outlet to widget header (#26837) 2024-05-01 13:08:11 -05:00
Isaac Janzen
b8333d7aa2
DEV: Add after-header-panel plugin outlet (#26835) 2024-05-01 12:41:25 -05:00
Daniel Waterworth
b2fe8510e4
FIX: Order categories in SQL for Categories#search (#26810)
Otherwise, the results don't make sense if the number of categories is
more than the limit provided.
2024-05-01 12:21:10 -05:00
dependabot[bot]
2b6f4f4a7f
Build(deps-dev): Bump the embroider group with 3 updates (#26832)
Bumps the embroider group with 3 updates: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat), [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) and [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros).


Updates `@embroider/compat` from 3.4.8 to 3.4.9
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

Updates `@embroider/core` from 3.4.8 to 3.4.9
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/core)

Updates `@embroider/macros` from 1.16.0 to 1.16.1
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/macros)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/macros"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 12:29:27 +02:00
dependabot[bot]
51cd244bf8
Build(deps-dev): Bump sass from 1.75.0 to 1.76.0 (#26833)
Bumps [sass](https://github.com/sass/dart-sass) from 1.75.0 to 1.76.0.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.75.0...1.76.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-01 12:24:45 +02:00
Jarek Radosz
c97d58f377
DEV: Add placement: center option to float-kit (#26830)
Implements this custom placement strategy: https://floating-ui.com/docs/offset#creating-custom-placements
2024-05-01 12:12:00 +02:00
Jarek Radosz
b39736a167
DEV: Add autofocus option to d-menu (#26829)
(to be used by the glimmer replacement of topic-entrance component)
2024-05-01 12:11:11 +02:00
Aida Syoko
3a69824ffb
DEV: remove repetitive words (#26684) 2024-05-01 17:58:02 +10:00
Jan Cernik
ddf7bbfa97
FIX: Do not show empty list in the topic admin menu (#26825) 2024-04-30 14:31:39 -03:00
Régis Hanol
e7d0083dbe FIX: creating watched words...
... wasn't working because it wasn't storing the proper "action" value.

Issue was that we were using the "action" parameter which is being used by Rails to determine which controller action to call.

We need to use the "action_key" parameter instead.
2024-04-30 19:16:47 +02:00
Jan Cernik
ff8e1f4ed6
FIX: Do not show topic admin menu button to regular users (#26820) 2024-04-30 13:47:36 -03:00
Jarek Radosz
3930064fd1
DEV: Convert various components to gjs (#26782)
Those were all low hanging fruits - all were already glimmer components, so this was mostly merging js and hbs files and adding imports.

(occasionally also adds/fixes class names)
2024-04-30 16:44:49 +02:00
Carson Chang
5d1f38a592
Update icon-avatar.gjs (#26819) 2024-04-30 21:46:37 +08:00
Alan Guo Xiang Tan
a6624af66e
DEV: Add isValidUrl helper function to theme migrations (#26817)
This commit adds a `isValidUrl` helper function to the context in
which theme migrations are ran in. This helper function is to make it
easier for theme developers to check if a string is a valid URL or path
when writing theme migrations. This can be helpful in cases when
migrating a string based setting to `type: objects` which contain `type:
string` properties with URL validations enabled.

This commit also introduces the `UrlHelper.is_valid_url?` method
which actually checks that the URL string is of the valid format instead of
only checking if the URL string is parseable which is what `UrlHelper.relaxed_parse` does
and is not sufficient for our needs.
2024-04-30 16:45:07 +08:00
Krzysztof Kotlarek
8704499b5a
FEATURE: additional links for moderator's sidebar (#26815)
In this PR we introduced an admin sidebar for moderators - https://github.com/discourse/discourse/pull/26795

`What's new` and `all reports` links were missing as moderators have access to those pages.
2024-04-30 10:34:12 +10:00
dependabot[bot]
267b26c8d6
Build(deps): Bump the babel group with 2 updates (#26811) 2024-04-30 01:38:48 +02:00
dependabot[bot]
336a92ba44
Build(deps): Bump terser from 5.30.4 to 5.31.0 (#26812) 2024-04-30 01:38:00 +02:00
Krzysztof Kotlarek
0842ca7f9e
UX: admin sidebar headings are bold (#26801)
Make admin sidebar headings bold.
2024-04-30 09:31:53 +10:00
Jarek Radosz
0548f24208
DEV: Convert topic-title to glimmer/gjs (#26808)
This reverts commit 5d568d0bab. (reland of #26775)

Now with removed unnecessary `?.` operators to workaround a terser/babel/??? issue.
2024-04-29 23:06:50 +02:00
Jan Cernik
8dd883d4e5
DEV: Refactor topic admin menu to use <DMenu> (#26678)
* DEV: Refactor topic admin menu to use `<DMenu>`

This PR also introduces a new plugin API to add buttons to the topic admin menu

```javascript
api.addTopicAdminMenuButton((topic) => {
  return {
    action: () => {
      alert('Sunrise!');
    },
    icon: 'sun',
    className: 'sunrise-button',
    label: 'actions.rise',
  };
});
```

The plugins that needed to be updated are:

- [discourse-zoom](https://github.com/discourse/discourse-zoom/pull/73)
- [discourse-salesforce](https://github.com/discourse/discourse-salesforce/pull/74)
- [discourse-topic-noindex](https://github.com/discourse/discourse-topic-noindex/pull/11)
2024-04-29 12:44:38 -03:00
Vinoth Kannan
143f06f2c6
FEATURE: Allow watched words to be created as a group (#26632)
At the moment, there is no way to create a group of related watched words together.  If a user needed a set of words to be created together, they'll have to create them individually one at a time.

This change attempts to allow related watched words to be created as a group. The idea here is to have a list of words be tied together via a common `WatchedWordGroup` record.  Given a list of words, a `WatchedWordGroup` record is created and assigned to each `WatchedWord` record. The existing WatchedWord creation behaviour remains largely unchanged.

Co-authored-by: Selase Krakani <skrakani@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-04-29 15:50:55 +05:30
David Battersby
0c8f531909
FEATURE: encourage users to set chat thread titles (#26617)
This change encourages users to title their threads to make it easier for other users to join in on conversations that matter to them.

The creator of the chat thread will receive a toast notification prompting them to add a thread title when on mobile and the thread has at least 5 sent replies.
2024-04-29 17:20:01 +08:00
Joffrey JAFFEUX
1510c6d004
FIX: correctly enable/disable body scroll on modal (#26784) 2024-04-29 08:45:48 +02:00
Martin Brennan
94fe31e5b3
UX: Fix report color duplication (#26799)
In the "Consolidated Pageviews with Browser Detection (Experimental)"
report we used the same color for "Known Crawler" and "Other pageviews"
which makes the report confusing to look at, this commit makes them
different.
2024-04-29 15:12:47 +10:00
Krzysztof Kotlarek
da329d54af
FEATURE: new admin sidebar for moderators (#26795)
Enable a new sidebar for moderators with limited links.
2024-04-29 11:32:47 +10:00
Jarek Radosz
5d568d0bab
Revert "DEV: Convert topic-title to glimmer/gjs (#26775)" (#26794)
This reverts commit 261ef8404e.
2024-04-29 09:15:35 +08:00
Martin Brennan
edec941a87
FIX: Better tracking of topic visibility changes (#26709)
This commit introduces a few changes as a result of
customer issues with finding why a topic was relisted.
In one case, if a user edited the OP of a topic that was
unlisted and hidden because of too many flags, the topic
would get relisted by directly changing topic.visible,
instead of going via TopicStatusUpdater.

To improve tracking we:

* Introduce a visibility_reason_id to topic which functions
  in a similar way to hidden_reason_id on post, this column is
  set from the various places we change topic visibility
* Fix Post#unhide! which was directly modifying topic.visible,
  instead we use TopicStatusUpdater which sets visibility_reason_id
  and also makes a small action post
* Show the reason topic visibility changed when hovering the
  unlisted icon in topic status on topic titles
2024-04-29 10:34:46 +10:00
dependabot[bot]
3e1377578a
Build(deps-dev): Bump babel-import-util from 2.0.3 to 3.0.0 (#26786)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.3 to 3.0.0.
- [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/compare/v2.0.3...v3.0.0)

---
updated-dependencies:
- dependency-name: babel-import-util
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 00:45:54 +02:00
dependabot[bot]
4a200a670b
Build(deps-dev): Bump @floating-ui/dom from 1.6.3 to 1.6.4 (#26785)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.3 to 1.6.4.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.4/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 00:41:43 +02:00
dependabot[bot]
2013673d9e
Build(deps-dev): Bump ember-cli from 5.8.0 to 5.8.1 (#26787)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.8.0 to 5.8.1.
- [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/v5.8.0...v5.8.1)

---
updated-dependencies:
- dependency-name: ember-cli
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-29 00:22:49 +02:00
Jarek Radosz
f75c253b95
DEV: Inline cancel-link code (#26778)
No need for this small component (and its unused and empty admin component twin)
2024-04-27 14:26:29 +02:00
Jarek Radosz
505d8b52b8
DEV: Add support for arrays to concatClass (#26777)
It'd be useful in cases like:

```gjs
get flagNames() {
  return this.flags?.map((flag) => flag && `flag-${flag.name}`);
  // w/o this change you'd have to handle it here:
  // return this.flags?.map((flag) => flag && `flag-${flag.name}`).filter(Boolean).join(" ");
}

<template>
  <span class={{concatClass "gadget" this.flagNames}}>
  {{! …or here: }}
  <span class={{concatClass "gadget" (concatClass this.flagNames)}}>
```

(also: replaces ember's `compact()` with `filter(Boolean)`)
2024-04-27 12:02:20 +02:00
Jarek Radosz
cf11e556cb
DEV: Update htmlSafe imports (#26776) 2024-04-27 12:01:58 +02:00
Jarek Radosz
261ef8404e
DEV: Convert topic-title to glimmer/gjs (#26775) 2024-04-27 11:58:59 +02:00
Jarek Radosz
2a52f7f13f
DEV: Convert track-selected to glimmer/gjs (#26773) 2024-04-27 11:58:42 +02:00
Jarek Radosz
6c7e46a32f
DEV: Remove key-enter-escape mixin (#26759)
Was used in only two places, just inline it to unblock conversion to glimmer
2024-04-26 16:42:22 +02:00