Commit Graph

45777 Commits

Author SHA1 Message Date
Jarek Radosz 302fab07a3
DEV: Update `jsdom` (#17264) 2022-06-28 21:22:06 +02:00
Jarek Radosz bfeee1b803
DEV: Update `sinon` (#17266) 2022-06-28 21:21:51 +02:00
Jarek Radosz 16f22e3c36
DEV: Add `--forward-host` option to `bin/ember-cli` (#17244)
This allows to e.g. test multisite setup in a local dev environment. Also fixes some minor proxy issues.
2022-06-28 21:20:14 +02:00
Jarek Radosz 39a025c7af
DEV: Allow newer versions of node (#17261)
It should now properly work with 18.x, so we should start moving into direction of it being the default.
2022-06-28 20:52:31 +02:00
Discourse Translator Bot c6b3d3e4b4
Update translations (#17267) 2022-06-28 20:52:09 +02:00
Alan Guo Xiang Tan 836b5300fc
DEV: Move sidebar utility class to body tag (#17259) 2022-06-28 11:32:06 -04:00
Jarek Radosz 4821d44c3c
DEV: Update `webpack` (#17262) 2022-06-28 14:39:09 +02:00
Chapoi a832c94527
UX: update color on arrow tippy box (#17263) 2022-06-28 13:25:40 +02:00
Natalie Tay ff77ad7ac0
UX: Change copy for user-selector placeholder (#17260) 2022-06-28 19:01:16 +08:00
dependabot[bot] aa38dcd263
Build(deps): Bump rubocop from 1.30.1 to 1.31.0 (#17258)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.30.1 to 1.31.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.30.1...v1.31.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  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>
2022-06-28 00:10:41 +02:00
Sérgio Saquetim 5840fb5c62
UX: Update topics stats automatically (#17135)
Updates automatically data on the stats section of the topic.

It will update automatically the following information: likes, replies and last reply (timestamp and user)
2022-06-27 18:21:05 -03:00
dependabot[bot] 31a0bf11f2
Build(deps): Bump rack-test from 1.1.0 to 2.0.1 (#17257)
Bumps [rack-test](https://github.com/rack/rack-test) from 1.1.0 to 2.0.1.
- [Release notes](https://github.com/rack/rack-test/releases)
- [Changelog](https://github.com/rack/rack-test/blob/main/History.md)
- [Commits](https://github.com/rack/rack-test/compare/v1.1.0...v2.0.1)

---
updated-dependencies:
- dependency-name: rack-test
  dependency-type: indirect
  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>
2022-06-27 22:13:46 +02:00
Jarek Radosz a7284d3b96
DEV: Auto-allow multisite hosts in dev (#17246) 2022-06-27 21:58:33 +02:00
Isaac Janzen 2b80133819
FIX: Fix bulk_invite flaky tests (#17256) 2022-06-27 14:50:20 -05:00
Rafael dos Santos Silva f56c44d1c7
FEATURE: Validate tags in WatchedWords (#17254)
* FEATURE: Validate tags in WatchedWords

We didn't validate watched words automatic tagging, so it was possible
for an admin to created watched words with an empty tag list which would
result in an exception when users tried to create a new topic that
matched the misconfigured watched word.

Bug report: https://meta.discourse.org/t/lib-topic-creator-fails-when-the-word-math-appears-in-the-topic-title-or-text/231018?u=falco
2022-06-27 16:16:33 -03:00
Jarek Radosz 64adf3cba3
DEV: Don't template-lint all files in lefthook (#17255)
Just templates is a-ok, thx :P
2022-06-27 20:01:13 +02:00
Jarek Radosz aabb98aedc
DEV: Deprecate `DISCOURSE_DEV_HOSTS` (#17245)
`RAILS_DEVELOPMENT_HOSTS` is a Rails standard that does exactly the same thing.
2022-06-27 19:04:42 +02:00
Jarek Radosz 94e59ad9b6
DEV: Update `html-entities` (#17250) 2022-06-27 18:40:58 +02:00
Jarek Radosz f8691d12e1
DEV: Update `ember-cli-app-version` (#17253) 2022-06-27 18:13:56 +02:00
Jarek Radosz f505221a9c
DEV: Update `ember-cli-terser` (#17252) 2022-06-27 18:13:46 +02:00
Jarek Radosz 1344e7d62c
DEV: Update `js-yaml` (#17249) 2022-06-27 18:13:29 +02:00
Jarek Radosz 6a2ea012c7
DEV: Update `@glimmer/tracking` (#17248) 2022-06-27 18:13:04 +02:00
dependabot[bot] 312fd4a26e
Build(deps): Bump unicode-display_width from 2.1.0 to 2.2.0 (#17243)
Bumps [unicode-display_width](https://github.com/janlelis/unicode-display_width) from 2.1.0 to 2.2.0.
- [Release notes](https://github.com/janlelis/unicode-display_width/releases)
- [Changelog](https://github.com/janlelis/unicode-display_width/blob/main/CHANGELOG.md)
- [Commits](https://github.com/janlelis/unicode-display_width/compare/v2.1.0...v2.2.0)

---
updated-dependencies:
- dependency-name: unicode-display_width
  dependency-type: indirect
  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>
2022-06-27 12:12:48 +02:00
dependabot[bot] e7b627be49
Build(deps): Bump pg from 1.4.0 to 1.4.1 (#17242)
Bumps [pg](https://github.com/ged/ruby-pg) from 1.4.0 to 1.4.1.
- [Release notes](https://github.com/ged/ruby-pg/releases)
- [Changelog](https://github.com/ged/ruby-pg/blob/master/History.rdoc)
- [Commits](https://github.com/ged/ruby-pg/compare/v1.4.0...v1.4.1)

---
updated-dependencies:
- dependency-name: pg
  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>
2022-06-27 12:12:28 +02:00
dependabot[bot] 85668d7da6
Build(deps-dev): Bump parallel_tests from 3.11.0 to 3.11.1 (#17241)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.11.0 to 3.11.1.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.11.0...v3.11.1)

---
updated-dependencies:
- dependency-name: parallel_tests
  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>
2022-06-27 12:12:08 +02:00
jbrw 9874fe3fb3
FIX: Improve mixcloud oneboxing (#17237)
- Sets `https://www.mixcloud.com` as a `requires_iframe_origins` to allow the iframe content to be displayed
- Attempts to render something approximating the Mixcloud content in the preview pane of the Composer, rather than just displaying a large version of the artwork associated with the link
2022-06-27 08:32:24 +10:00
Joe 526115f11a
FIX: Defer removing the splash screen until the window load event fires take 3 (#17238)
We currently remove the splash screen once Discourse starts booting.

This can be an issue on very slow devices, which can take up to 6 seconds. This PR ensures that we don't remove the splash until the browser has finished parsing all of the site's assets. It won't impact fast devices.

Internal topic /t/65378/60
2022-06-25 12:59:16 +08:00
Kris 305c4750df
UX: allow more mobile topic elements to be tapped (#17234) 2022-06-24 15:55:52 -04:00
Jarek Radosz c672144c14
DEV: Fix flaky tests caused by timezone updates (#17232)
Hopefully fixes flakes like:

```
not ok 1123 Chrome 102.0 - [undefined ms] - Global error: Uncaught Error: Unhandled request in test environment: /forum/u/eviltrout.json (PUT) at http://localhost:7357/assets/vendor.js, line 38378
 While executing test: Unit | Utility | click-track: routes to absolute internal urls
    ---
        browser log: |
            {"type":"error","text":"Unhandled request in test environment: /forum/u/eviltrout.json (PUT)"}
            {"type":"error","text":"Uncaught Error: Unhandled request in test environment: /forum/u/eviltrout.json (PUT) at http://localhost:7357/assets/vendor.js, line 38378\n","testContext":{"id":1123,"name":"Unit | Utility | click-track: routes to absolute internal urls","items":[],"state":"executing"}}
    ...
```
2022-06-24 19:19:11 +02:00
Jarek Radosz 9669794f85
DEV: Remove more legacy ember code (#17218)
Also fixes flaky d-editor tests
2022-06-24 18:56:08 +02:00
Joe f73796b258
FIX: Skip the window load event for now (#17231) 2022-06-24 19:23:33 +08:00
Joe 529c5e343d
FIX: Defer removing the splash screen until the window load event fires take 2 (#17230)
There's an obscure bug where really slow devices end up removing the splash screen before they're finished parsing all of the Discourse assets.

This PR won't impact fast devices but should hopefully prevent the premature removal of the splash on super slow devices.
2022-06-24 17:39:26 +08:00
Joe e993a23a54
FIX: Remove splash screen in no-js view take 2 (#17229)
We use javascript to remove the splash screen when the site boots up. If the user has js disabled, they get stuck on the splash screen.

If the user has js disabled. We don't show the splash screen at all.
2022-06-24 17:38:42 +08:00
Jarek Radosz bd85c15acb
DEV: Update broccoli-babel-transpiler (#17221)
Fixes concurrent addon build lockups.
2022-06-24 10:48:05 +02:00
Joe 07cb8e5300
FIX: Reverts #17225 & #17223 (#17228)
* Revert "FIX: Defer removing the splash screen until the window load event fires (#17225)"

This reverts commit 6a61e855b3.

* Revert "FIX: Remove splash screen in no-js view (#17223)"

This reverts commit 5257cae1b8.
2022-06-24 15:59:27 +10:00
Alan Guo Xiang Tan 7d41e980c9
FIX: Uninitialized class variable error in sidekiq (#17227)
Follow-up to 4199ada1ce
2022-06-24 14:17:39 +10:00
Martin Brennan 3f5e19c62a
FIX: Typo in log_thread (#17226)
Follow up to 4199ada1ce
2022-06-24 12:12:30 +08:00
Joe 6a61e855b3
FIX: Defer removing the splash screen until the window load event fires (#17225)
There's an obscure bug where really slow devices end up removing the splash screen before they're finished parsing all of the Discourse assets.

This PR won't impact fast devices but should hopefully prevent the premature removal of the splash on super slow devices.
2022-06-24 11:27:41 +08:00
Alan Guo Xiang Tan 7b2ad1b931
UX: Truncate long category names in sidebar (#17203) 2022-06-24 10:28:35 +08:00
Alan Guo Xiang Tan 4199ada1ce
DEV: Ensure Sidekiq logging thread is always running (#17211) 2022-06-24 10:28:18 +08:00
Jarek Radosz d1d6868325
DEV: Update xss.js (#17216)
* DEV: Update xss.js

* Fix our hack
2022-06-24 10:28:05 +08:00
Joe 5257cae1b8
FIX: Remove splash screen in no-js view (#17223)
We use javascript to remove the splash screen when the site boots up. If the user has js disabled, they get stuck on the splash screen.

If the user has js disabled. We don't show the splash screen at all.
2022-06-24 09:25:10 +08:00
Joe 801750ffc4
UX: Makes splash setting visible (#17222)
The setting was previously hidden but we're now in a state where we want admins to see and experiment with it.
2022-06-24 08:50:29 +08:00
Blake Erickson 2861b9337d
DEV: Fix flaky admin badges.json api docs spec (#17210)
* DEV: Fix flaky admin badges.json api docs spec

This commit is to fix this incredibly vague error message:

```
Failure/Error: expect(valid).to eq(true)

  expected: true
       got: false
```

From this test:

> Assertion: badges /admin/badges.json get success response behaves like
> a JSON endpoint response body matches the documented response schema

I was finally able to repro locally using parallel tests:

```
RAILS_ENV=test bundle exec ./bin/turbo_rspec
```

I *think* the parallel tests might be swallowing the `puts` output, but
when I also specified the individual spec file

```
RAILS_ENV=test bundle exec ./bin/turbo_rspec spec/requests/api/badges_spec.rb
```

It revealed the issue:

```
VALIDATION DETAILS: {"missing_keys"=>["i18n_name"]}
```

``` ruby
...
  def include_i18n_name?
    object.system?
  end
```

Looks like if the "system" user isn't being used the `i18n_name` won't
be returned in the json response so we shouldn't mark it as a required
attribute.

* Switch to using fab!

When using `let(:badge)` to fabricate a test badge it wouldn't be
returned from the controller, but switching to using `fab!` allows it to
be returned in the json data giving us a non-system badge to test
against.
2022-06-23 14:32:17 -06:00
Jarek Radosz f27dddd405
DEV: Make addons buildable on their own (#17205) 2022-06-23 22:19:54 +02:00
Penar Musaraj 3baefa25b5
FIX: Use first supported type item when JSON-LD returns array (#17217) 2022-06-23 13:02:01 -04:00
Jarek Radosz 20e34b5da6
DEV: Stabilize watched words order (#17215)
Fixes a flaky spec:

```
  1) WordWatcher.word_matcher_regexp format of the result regexp is correct when watched_words_regular_expressions = true
     Failure/Error: expect(regexp.inspect).to eq("/(#{word1})|(#{word2})/i")

       expected: "/(word35)|(word36)/i"
            got: "/(word36)|(word35)/i"

       (compared using ==)
     # ./spec/services/word_watcher_spec.rb:19:in `block (4 levels) in <main>'
```
2022-06-23 15:38:12 +02:00
Jarek Radosz 16550537d0
DEV: Drop ember-maybe-import-regenerator (#17195)
I believe it's no longer needed on the browsers we support
2022-06-23 15:20:10 +02:00
Jarek Radosz 3cb67fcb6c
DEV: Update ember-cli-htmlbars (#17194) 2022-06-23 14:36:50 +02:00
Jarek Radosz 56d3bd5bdd
DEV: Update `@glimmer/component` (#17197) 2022-06-23 13:35:42 +02:00