Commit Graph
100 Commits
Author SHA1 Message Date
Jarek Radosz a33e9bc2f9 DEV: Remove deprecated search_tokenize_chinese_japanese_korean setting (#30549)
It was supposed to be removed ~3 years ago (there was [a migration](https://github.com/discourse/discourse/blob/b4f0a8748d5dbfbe97f526734ef537f52db2c660/db/migrate/20220126052157_change_segment_cjk_site_setting.rb) already)
2025-01-03 23:21:18 +01:00
Jarek Radosz d8e8c9f1e4 DEV: Convert UserFlagPercentage to gjs (#30453) 2025-01-03 13:20:26 +01:00
Jarek Radosz 145c7e46e1 DEV: Remove invalid parsing options (#30545)
HTML5 parser doesn't have those options
2025-01-03 13:17:49 +01:00
Jarek Radosz c6dd33cc06 DEV: Convert ResponsiveTable to gjs (#30430) 2024-12-23 21:50:13 +01:00
Jarek Radosz c3548aec5e DEV: Don't use 0-delay for test-env discourseLater (#30442)
`discourseLater` automatically uses delay of 10ms in test environment
2024-12-23 16:31:46 +01:00
Jarek Radosz d0e38977e3 UX: Remove chat hover effect from github status badge (#30447) 2024-12-23 16:31:29 +01:00
Jarek Radosz c1818bf40e DEV: Update a topic test to use settled (#30443)
…instead of `next()`/`assert.async()/done()`
2024-12-23 15:49:38 +01:00
Jarek Radosz 3c95aceeb0 DEV: Unify on-resize modifier situation (#30415)
1. Move chat's on-resize to core
2. Remove ember-on-resize-modifier
2024-12-23 09:11:17 +01:00
Jarek Radosz 7b9d484bf4 DEV: Group highlight.js updates (#30426)
(and fix a typo)
2024-12-23 09:09:55 +01:00
Jarek Radosz 6175562cb2 DEV: Convert HighlightSearch to gjs (#30406) 2024-12-23 08:54:59 +01:00
Jarek Radosz df9de3022f DEV: Convert ChooseMessage to gjs (#30408) 2024-12-23 08:47:15 +01:00
Jarek Radosz 0336235c74 DEV: Use object spread instead of Object.assign (#30407) 2024-12-23 08:44:29 +01:00
Jarek Radosz 6f01584607 DEV: Convert DirectoryTable to gjs (#30414)
* DEV: Convert DirectoryTable to gjs

* rename + remove
2024-12-23 16:44:26 +11:00
Jarek Radosz 259f537d02 DEV: Convert DiscourseBanner to gjs (#30413) 2024-12-23 00:57:47 +01:00
Jarek Radosz 0ed4c452d0 DEV: Convert CategoryReadOnlyBanner to gjs (#30412) 2024-12-23 00:55:49 +01:00
Jarek Radosz 59b43b15ee DEV: Convert CategoryTitleBefore to gjs (#30411) 2024-12-23 00:54:48 +01:00
Jarek Radosz d18bf67868 DEV: Remove unnecessary optional chaining operators (#30400) 2024-12-20 16:48:13 +01:00
Jarek Radosz 05dca4c31e DEV: Remove _consoleDebug (#30399)
`this.siteSettings` was always undefined anyway
2024-12-20 16:48:02 +01:00
Jarek Radosz f612e3ba17 DEV: Downgrade highlightjs to 11.10.0 (#30397)
due to rustlang regression

See: https://github.com/discourse/discourse/pull/30288#issuecomment-2556373204
2024-12-20 14:28:24 +01:00
Jarek Radosz a70e7a5cdd DEV: Allow adding classes to ConditionalLoadingSpinner (#30386) 2024-12-20 14:15:47 +01:00
Jarek Radosz 32ab4449a5 DEV: Update ember-qunit to 9.0.1 (#30358)
ember-qunit no longer uses ember-cli-test-loader

relevant files:
https://github.com/emberjs/ember-qunit/blob/main/addon/src/test-loader.js
https://github.com/ember-cli/ember-exam/blob/main/addon-test-support/-private/ember-exam-test-loader.js

<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/emberjs/ember-qunit/releases">ember-qunit's releases</a>.</em></p>
<blockquote>
<h2>Release 9.0.1</h2>
<h4>🐛 Bug Fix</h4>
<ul>
<li><a href="https://redirect.github.com/emberjs/ember-qunit/pull/1183">#1183</a> Export TestLoader (<a href="https://github.com/ef4"><code>@​ef4</code></a>)</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Edward Faulkner (<a href="https://github.com/ef4"><code>@​ef4</code></a>)</li>
</ul>
<h2>Release 9.0.0</h2>
<h4>💥 Breaking Change</h4>
<ul>
<li><a href="https://redirect.github.com/emberjs/ember-qunit/pull/1182">#1182</a> Require explicit calls to loadTests and setupEmberOnerrorValidation (<a href="https://github.com/ef4"><code>@​ef4</code></a>)</li>
</ul>
<h4>🏠 Internal</h4>
<ul>
<li><a href="https://redirect.github.com/emberjs/ember-qunit/pull/1181">#1181</a> Remove unused babel plugins (<a href="https://github.com/ef4"><code>@​ef4</code></a>)</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Edward Faulkner (<a href="https://github.com/ef4"><code>@​ef4</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/emberjs/ember-qunit/commit/48779a91acf9538efc8da01c29a36cd6c8bc5ace"><code>48779a9</code></a> Release 9.0.1</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/a70adfdf58c2845084b405b5d0230fd073367dd4"><code>a70adfd</code></a> Merge pull request <a href="https://redirect.github.com/emberjs/ember-qunit/issues/1183">#1183</a> from emberjs/export-test-loader</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/25e2a6f4b3e1132dbdfa4b82d9cf2573fb3b49fe"><code>25e2a6f</code></a> Export TestLoader</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/a039eda038190b0f002f3660866e606214ac9643"><code>a039eda</code></a> Release 9.0.0</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/18d5ca9543c4354d37b86e168c5d3ed08ff7619f"><code>18d5ca9</code></a> Merge pull request <a href="https://redirect.github.com/emberjs/ember-qunit/issues/1182">#1182</a> from emberjs/isolate-test-loading</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/e4a9efd750dbeab67a03a6032a6613fc1dc40ff7"><code>e4a9efd</code></a> fix missing type</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/634761bc1eb7785879ed915dab32eb130e1eeb34"><code>634761b</code></a> separate onerror validation too</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/d716b61cfd32a184aab82006ecfdebfd742ab7d3"><code>d716b61</code></a> Separate test loading from start</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/3428b769dc432449ff940760e08a96698b20d33f"><code>3428b76</code></a> Inline ember-cli-test-loader implementation</li>
<li><a href="https://github.com/emberjs/ember-qunit/commit/da520e06840d9ab5bba3f6c5b9072fd75f787aed"><code>da520e0</code></a> Merge pull request <a href="https://redirect.github.com/emberjs/ember-qunit/issues/1181">#1181</a> from emberjs/unused-babel-plugins</li>
<li>Additional commits viewable in <a href="https://github.com/emberjs/ember-qunit/compare/v8.1.1...v9.0.1">compare view</a></li>
</ul>
</details>
<br />
2024-12-19 18:38:29 +01:00
Jarek Radosz 023b61ad22 SECURITY: Stored xss in image caption 2024-12-19 13:13:14 -03:00
Jarek Radosz b2dc32f41c FIX: An off-by-one error in glimmer topic list (#30372)
`findIndex` returns -1 when no element is found, but the `start` boundary can't be less than 0.
2024-12-19 13:02:41 +01:00
Jarek Radosz 5747b910e6 FIX: Unpinning topics in glimmer topic list (#30342)
it's already handled by TopicStatus component (so one was undoing the other's toggle)
2024-12-18 15:55:02 +01:00
Jarek Radosz b2b0c462ba DEV: Update content-tag to 3.1.0 (#30339) 2024-12-18 12:59:27 +01:00
Jarek Radosz e03121c55b FIX: Correctly display group unread indicator in gjs (#30302) 2024-12-16 20:50:49 +01:00
Jarek Radosz ae6fca2f0b DEV: Add io-console to default gems list (#30257) 2024-12-13 02:35:05 +01:00
Jarek Radosz 13793a3d8e DEV: Convert bookmark-icon to gjs/glimmer (#30136) 2024-12-05 23:58:43 +01:00
Jarek Radosz 94697467af DEV: Add topic-list-item-class transformer (#30008) 2024-12-03 14:22:13 +01:00
Jarek Radosz 48323230a4 FIX: Stick to then/finally in history-store (#30061)
async/await doesn't play well with transitions (to be investigated… later)
2024-12-03 14:13:26 +01:00
Jarek Radosz 9389bf295c DEV: Make history-store work in non-accceptance tests (#30059) 2024-12-03 13:32:37 +01:00
Jarek Radosz 72f3cd252f DEV: Use new qunit-dom's includesValue/doesNotIncludeValue (#30034) 2024-12-02 16:30:56 +01:00
Jarek Radosz 5af056c48c DEV: Set version on tracked-built-ins patch (#30024) 2024-12-02 10:10:59 +01:00
Jarek Radosz c4d86635d1 DEV: Update decorator-transforms to 2.3.0 (#30020)
1. the patch is no longer needed
2. this unblocks dependabot (it's been erroring out for a bit)
2024-12-02 01:04:20 +01:00
Jarek Radosz 045f119f67 DEV: Update licensee to 11.1.1 (#30022) 2024-12-02 07:34:19 +08:00
Jarek Radosz b3423c40b0 DEV: Fix random typos (#30023)
(late) Nov 2024 edition
2024-12-02 07:34:05 +08:00
Jarek Radosz 6e4baaf092 DEV: Use qunit-dom's hasValue wherever possible (#30018) 2024-12-01 20:37:24 +01:00
Jarek Radosz efa2589204 DEV: Finish qunit-dom hasText migration (#30017) 2024-12-01 14:00:48 +01:00
Jarek Radosz 1396aef99f DEV: Make the logIn helper replace current-user service (#30010) 2024-11-30 17:23:51 +01:00
Jarek Radosz dfb74d90c3 DEV: Extensively use qunit-dom's hasText (#30012) 2024-11-30 16:44:51 +01:00
Jarek Radosz bf3e75ca70 DEV: Reduce async/indirection in site-header (#30011) 2024-11-30 15:33:38 +01:00
Jarek Radosz fa4a37fd7d DEV: Deprecate componentTest (#30001) 2024-11-30 15:33:27 +01:00
Jarek Radosz 85ead5ac7a Revert "FIX: deduplicate css in mails (#30003)" (#30013)
This reverts commit 6e726d436f.

The specs were failing in the original PR but the CI didn't run.
2024-11-30 15:32:32 +01:00
Jarek Radosz 2f932812e0 DEV: Add topic-list-header-sortable-column transformer (#29917)
For conditionally disabling ability to sort on specific columns in the topic list.
2024-11-29 21:32:48 +01:00
Jarek Radosz a2c8177a4c DEV: Deprecate discourseModule (#30000)
We're now using QUnit's `module` directly in core and all plugins/themes.
2024-11-29 20:08:52 +01:00
Jarek Radosz 52b7280ad4 DEV: Remove a use of discourseModule (#29996) 2024-11-29 18:16:21 +01:00
Jarek Radosz 2137f2bb74 DEV: Update content-tag to 3.0.0 (#29980) 2024-11-28 14:07:01 +01:00
Jarek Radosz ef7518d4ad DEV: Fix no-loose-assertions lint (#29965)
and enable some of qunit lints
2024-11-28 11:22:27 +01:00
Jarek Radosz 5db0eba0a8 DEV: Autofix (w/ manual follow up) various qunit lints (#29950) 2024-11-27 13:02:55 +01:00
Jarek Radosz ed73d80cbd DEV: Updates all assert.equal to qunit-dom or strictEqual (#29945)
There will eventually be lint for this.
2024-11-26 22:41:29 +01:00
Jarek Radosz 6e1d01802e DEV: Clean up assertions in transformer-test (#29928) 2024-11-26 00:40:03 +01:00
Jarek Radosz 613dea61a2 DEV: Allow ember hash as a context in applyValueTransformer (#29922)
This unlocks the ability to use that function directly in templates:

```hbs
{{applyValueTransformer
  "foo-bar"
  @defaultValue
  (hash arg1=@arg1 arg2=@arg2)
}}
```
2024-11-25 22:48:00 +01:00
Jarek Radosz 433543a516 DEV: Refactor gjs topic-list (#29792)
Based on the initial review in #28934
2024-11-25 14:15:34 +01:00
Jarek Radosz 0641d3e4b3 DEV: Improve hbr topic list detection (#29892)
1. `addRawTemplate` is called too early for deprecation handlers to process its deprecation call, so toggle the hbr flag directly
2. move the deprecation handler to an initializer so that other (non-template) calls are always handled
3. move the debug logging to the handler
2024-11-22 14:28:01 +01:00
Jarek Radosz b9838d6066 DEV: Fix theme name in this deprecation notices (#29888)
A followup to 019ba099c8
2024-11-22 10:24:02 +00:00
Jarek Radosz 2589545623 DEV: Detect hbr topic list customizations (#29793) 2024-11-21 16:00:49 +01:00
Jarek Radosz 187b7d74fb DEV: Fix linting (#29826) 2024-11-19 21:43:44 +01:00
Jarek Radosz 6e68de79d2 DEV: Use test-provided assert object (#29794) 2024-11-17 22:39:01 +01:00
Jarek Radosz 01a1dc43cb DEV: Skip flaky styleguide system specs (#29773) 2024-11-15 00:13:22 +01:00
Jarek Radosz 907fbd6f1e DEV: Fix ruby linting (#29731) 2024-11-13 08:47:10 +08:00
Jarek Radosz e68905510d DEV: Use the new hasHtml/includesHtml from qunit-dom (#29680) 2024-11-11 13:06:12 +01:00
Jarek Radosz 2272b1340b DEV: Use qunit-dom instead of raw href/title comparisons (#29678) 2024-11-11 11:44:54 +01:00
Jarek Radosz 429b6a4e4e DEV: Use qunit-dom instead of classList/activeElement (#29676) 2024-11-11 11:44:42 +01:00
Jarek Radosz 78ed0bb711 DEV: Use selectors instead of query() where possible (#29677) 2024-11-10 13:53:12 +01:00
Jarek Radosz 16a9663557 DEV: Use qunit-dom's isDisabled/isEnabled (#29675) 2024-11-10 02:24:58 +01:00
Jarek Radosz d67a6002eb DEV: Replace count with qunit-dom (#29674) 2024-11-10 02:06:03 +01:00
Jarek Radosz f9e58938ce DEV: Update visible/invisible uses to qunit-dom (#29672) 2024-11-10 01:41:50 +01:00
Jarek Radosz de6d575d40 DEV: Convert all uses of exists to qunit-dom (#29667) 2024-11-10 01:30:33 +01:00
Jarek Radosz c1916f7984 DEV: Convert assert.true(exists()) to qunit-dom (#29638) 2024-11-08 20:27:32 +01:00
Jarek Radosz 1ba6f6f1ae DEV: Update content-tag to 2.0.3 (#29616) 2024-11-06 13:29:24 +01:00
Jarek Radosz d076ed8c77 DEV: Convert some simple model methods to async/await (#29594) 2024-11-05 14:59:51 +01:00
Jarek Radosz a553c9ea0c FIX: Incorrect reference in TopicListHeaderColumn (#29593) 2024-11-05 13:17:41 +01:00
Jarek Radosz cbfd596b1b DEV: Remove unnecessary setupController methods (#29592)
and call super instead of manually setting model
2024-11-05 13:17:32 +01:00
Jarek Radosz 9c5fc6f1df DEV: Add more-topics plugin API (#29143)
From plugin-api comment:

Registers a new tab to be displayed in "more topics" area at the bottom of a topic page.

```gjs
 api.registerMoreTopicsTab({
   id: "other-topics",
   name: i18n("other_topics.tab"),
   component: <template>tbd</template>,
   condition: ({ topic }) => topic.otherTopics?.length > 0,
 });
```

You can additionally use more-topics-tabs value transformer to conditionally show/hide
specific tabs.

```js
api.registerValueTransformer("more-topics-tabs", ({ value, context }) => {
  if (context.user?.aFeatureFlag) {
    // Remove "suggested" from the topics page
    return value.filter(
      (tab) =>
        context.currentContext !== "topic" ||
        tab.id !== "suggested-topics"
    );
  }
});
```
2024-11-04 17:32:49 +01:00
Jarek Radosz 380974ce00 DEV: Use hasAttribute/hasAria/hasStyle in tests (#29568) 2024-11-04 11:30:38 +01:00
Jarek Radosz 9694d2477a DEV: Convert more notOk assertions (#29556)
…to either qunit-dom or `strictEqual`
2024-11-04 10:27:30 +01:00
Jarek Radosz 693a4e691b DEV: Replace ok(true) assertions (#29555)
…with `verifySteps`, `expect(0)`, or by removing it
2024-11-04 10:27:11 +01:00
Jarek Radosz b81055a6d4 DEV: Convert more equal assertions (#29554)
…to either qunit-dom or `strictEqual`
2024-11-03 21:04:38 +01:00
Jarek Radosz d2056c7fc6 DEV: Update checklist tests (#29553) 2024-11-03 21:04:22 +01:00
Jarek Radosz 4b533c47f0 DEV: Update sidebar plugin api tests (#29507) 2024-10-31 12:26:25 +01:00
Jarek Radosz b44b136b84 DEV: Add back-compat to recently converted computed props (#29508) 2024-10-31 12:25:21 +01:00
Jarek Radosz dc96b6e953 DEV: Add owner arg to plugin connector's shouldRender callbacks (#29488) 2024-10-31 01:06:02 +01:00
Jarek Radosz ae8d919528 DEV: Deprecate htmlHelper (#29495) 2024-10-31 00:37:37 +01:00
Jarek Radosz cf156d0f51 DEV: Convert topic-timeline to gjs (#29483) 2024-10-30 11:13:38 +01:00
Jarek Radosz 671f7beadb DEV: Convert TopicNavigationPopup to gjs (#29476) 2024-10-30 11:13:31 +01:00
Jarek Radosz 81b95d3202 DEV: Convert timeline sub-components to gjs (#29475) 2024-10-30 11:13:21 +01:00
Jarek Radosz cc447a1ae3 DEV: Simplify TopicNotificationsButton (#29465) 2024-10-29 16:27:23 +01:00
Jarek Radosz 6d918c6307 UX: Remove the admin menu button from expanded mobile timeline (#29464) 2024-10-29 12:12:00 +01:00
Jarek Radosz a236e368e4 DEV: Use helperFn in d-presence (#29461) 2024-10-29 11:21:33 +01:00
Jarek Radosz ecdf199585 DEV: Refactor composer-/topic-presence-display (#29455)
Re-land #29262 as the d-shared-edits incompatibility has now been resolved. This reverts commit a59c07fc45.
2024-10-29 10:44:05 +01:00
Jarek Radosz ffd3500f0b DEV: Remove unused component args (#29454) 2024-10-29 10:43:55 +01:00
Jarek Radosz 587264f9d2 DEV: Remove extraneous spec code (#29386)
namely `js: true`, requiring `rails_helper`, and default `freeze_time` args
2024-10-24 14:15:32 +02:00
Jarek Radosz ab7547eb7a DEV: Clean up d-toggle-switch (#29385)
move the template to the bottom, inline `checked`, remove unnecessary `template-lint-disable`
2024-10-24 01:38:55 +02:00
Jarek Radosz 44d1a818a3 DEV: Avoid a hacky workaround in d-toggle-switch specs (#29376) 2024-10-23 23:11:19 +02:00
Jarek Radosz a59c07fc45 Revert "DEV: Refactor composer-/topic-presence-display (#29262)" (#29368)
This reverts commit 38ab3f2349.
2024-10-23 16:26:08 +02:00
Jarek Radosz 38ab3f2349 DEV: Refactor composer-/topic-presence-display (#29262)
A followup to f05b984208

* modifiers to keep track of components' lifecycles, instead of did-insert/did-update/willDestroy
* proper glimmer-friendly tracking in related models
* caching
* `@outletArgs`
* gjs
2024-10-23 15:31:07 +02:00
Jarek Radosz 7acf9e6caf FIX: Invalid raise syntax (#29364) 2024-10-23 11:40:14 +02:00
Jarek Radosz 6a9af7c82f FIX: Show the last rendered user-tip (#29346)
…or a tip with the highest priority.

This regressed in 597ef11195 where we got rid of `next()` calls, so we'd render the first tip we encounter.

The commit also adds a test and updates existing ones.
2024-10-22 22:41:29 +02:00
Jarek Radosz b2167f7651 UX: Move "watching topic" user-tip to the other button (#29323)
Moves the user-tip from the topic-timeline notifications button to the one at the bottom of the topic page.

Three reasons:
1. new users are more likely to use the button that has the full text (and description) rather than the icon-only one
2. we hide the timeline button when scrolled all the way to the bottom of the page, and then the tip doesn't seems to be attached to anything
3. we might be removing the timeline button altogether in the near future
2024-10-22 18:54:18 +02:00
Jarek Radosz f45559a8b3 DEV: Add priority to post menu user-tip (#29322)
…and spread out existing priorities
2024-10-22 18:51:19 +02:00