Commit Graph

18114 Commits

Author SHA1 Message Date
David Taylor
9f9c82ea97
DEV: Only add ember-global deprecation for Ember 3 (#24667)
(otherwise, we're accidentally extending support into Ember 5!)

Followup to 106c1c317f
2023-12-01 14:50:15 +00:00
David Taylor
106c1c317f
DEV: Restore ember-global deprecation in production (#24664)
Even with our patch to the deprecate() macro, this is optimized out of the production build because it's wrapped in an `if(DEBUG)` statement. (https://github.com/davidtaylorhq/ember.js/blob/14c02f53b8/packages/%40ember/-internals/bootstrap/index.ts#L19-L19)
2023-12-01 13:07:57 +00:00
David Taylor
b72a177fb3
DEV: Exclude deprecation-collector plugin from source identifier (#24662) 2023-12-01 12:21:19 +00:00
dependabot[bot]
4df672a541
Build(deps-dev): Bump jsdom from 23.0.0 to 23.0.1 in /app/assets/javascripts (#24657)
* Build(deps-dev): Bump jsdom in /app/assets/javascripts

Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/23.0.0...23.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-12-01 11:11:16 +01:00
Isaac Janzen
aadc104817
FIX: Flashing when loading glimer search results (#24658) 2023-11-30 20:54:32 -07:00
Isaac Janzen
7539b457b2
DEV: Add forceDropdownForMenuPanels to plugin api (#24655) 2023-11-30 15:26:13 -07:00
Keegan George
d2b53ccac2
DEV: Port discourse-table-builder theme component to core (#24441) 2023-11-30 10:54:29 -08:00
Krzysztof Kotlarek
7e013b2120
DEV: add recurrence rule parameter to downloadCalendar API (#24404)
Add option to create recurrent calendar events. Recurrence rule parameter follows rfc5545 specification: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
2023-11-30 13:56:22 +11:00
Martin Brennan
c58cd697d2
FIX: Further improvements for plugin list (#24622)
Followup e37fb3042d

* Automatically remove the prefix `Discourse ` from all the plugin titles to avoid repetition
* Remove the :discourse_dev: icon from the author. Consider a "By Discourse" with no labels as official
* We add a `label` metadata to plugin.rb
  * Only plugins made by us in `discourse` and `discourse-org` GitHub organizations will show these in the list
* Make the plugin author font size a little smaller
* Make the commit sha look like a link so it's more obvious it goes to the code

Also I added some validation and truncation for plugin metadata
parsing since currently you can put absolutely anything in there
and it will show on the plugin list.
2023-11-30 10:53:17 +10:00
dependabot[bot]
f90fab3628
Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#24637)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.23.3 to 7.23.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.5/packages/babel-core)

Updates `@babel/standalone` from 7.23.4 to 7.23.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.5/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-11-29 22:29:41 +01:00
Isaac Janzen
11636f8736
DEV: Add missing html-safe on search result blurb (#24633) 2023-11-29 09:05:10 -07:00
Mark VanLandingham
c4767158df
DEV: Move desktop notifications logic to service (#24466) 2023-11-29 08:20:48 -06:00
Jarek Radosz
8cf13977a1
DEV: Fix or disable various lint rules (#24630)
A grab bag of smaller issues (constructor-super, no-fallthrough, ember/no-private-routing-service, no-unreachable, no-async-promise-executor)
2023-11-29 15:14:53 +01:00
Jarek Radosz
7cac167928
DEV: Fix "ember/no-empty-glimmer-component-classes" lint (#24629) 2023-11-29 15:14:30 +01:00
Jarek Radosz
0f7e4d2eaa
DEV: Convert input-tip to gjs (#24624) 2023-11-29 13:00:36 +01:00
Bianca Nenciu
1881ae50be
FIX: category-selector for top level categories (#24627)
The filter for top-level categories by using parent_category_id = -1 is
only implemented by the new search API.

Follow up to commit dbb8b66a37.
2023-11-29 13:29:18 +02:00
Jarek Radosz
d38360b23f
DEV: Fix ember/no-private-routing-service (#24009) 2023-11-29 12:26:52 +01:00
Jarek Radosz
cbe772f6fa
DEV: Fix router linting errors (#24012)
`ember/no-unnecessary-route-path-option`
`ember/routes-segments-snake-case`
2023-11-29 12:26:31 +01:00
Bianca Nenciu
dbb8b66a37
FIX: Show only top categories in first category-drop (#24575) 2023-11-29 09:41:25 +02:00
Isaac Janzen
8f6e8344aa
DEV: Remove unused search plugin outlets (#24614) 2023-11-28 14:55:22 -07:00
Isaac Janzen
9a909758ac
FIX: Escape topic titles when use_pg_headlines_for_excerpt true (#24608) 2023-11-28 14:32:22 -07:00
Kris
9576f3ec97
UX: create category doesn't always need a dropdown (#24610) 2023-11-28 16:28:07 -05:00
dependabot[bot]
2d2fd15636
Build(deps-dev): Bump the embroider group in /app/assets/javascripts with 1 update (#24615)
* Build(deps-dev): Bump the embroider group

Bumps the embroider group in /app/assets/javascripts with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).

- [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)

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

Signed-off-by: dependabot[bot] <support@github.com>

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-11-28 22:23:13 +01:00
Jordan Vidrine
178c1f74ae
UX: Place login button text in span tag (#24613) 2023-11-28 15:02:30 -06:00
Isaac Janzen
e4499d98e6
DEV: Update search-menu-before-term-input outlet args (#24573) 2023-11-28 13:47:23 -07:00
Bianca Nenciu
fae3b89818
FIX: Add setters for some group properties (#24572)
These properties are set on the "Manage > Categories" group page. It
used to work, but only because it overridden the properties and it did
not update the IDs too.
2023-11-28 21:38:49 +02:00
Kris
19378cc068
FIX: lint unlinted file (#24612) 2023-11-28 14:11:55 -05:00
Jordan Vidrine
12902c1fc1
FEATURE: Add search menu outlet (#24609) 2023-11-28 12:12:09 -06:00
Isaac Janzen
feb5eda0d1
DEV: Make theme-qunit discoverable from /tests (#24606)
https://github.com/discourse/discourse/assets/50783505/c6db8c35-1473-4ccd-aca2-bfb71af9e73e
2023-11-28 10:04:23 -07:00
Bianca Nenciu
e85a81f33c
FIX: Make category-drop work with lazy_load_categories (#24187)
The category drop was rerendered after every category async change
because it updated the categories list. This is not necessary and
categories can be referenced indirectly by ID instead.
2023-11-28 17:58:47 +02:00
Jarek Radosz
2a3418fe24
DEV: Don't use the deprecated createEvent() (#24601) 2023-11-28 15:05:51 +01:00
Jarek Radosz
9d44d833d5
DEV: Remove unnecessary getURL() calls (#24591)
`ajax()` already uses it
2023-11-28 14:32:15 +01:00
Jarek Radosz
0cad82ef55
DEV: Update click-track tests (#24597) 2023-11-28 13:54:30 +01:00
David Taylor
5783f231f8
DEV: Introduce DISCOURSE_ASSET_URL_SALT (#24596)
This value is included when generating static asset URLs. Updating the value will allow site operators to invalidate all asset urls to recover from configuration issues which may have been cached by CDNs/browsers.
2023-11-28 11:28:40 +00:00
Jarek Radosz
4953bced64
DEV: Remove unused searchTags param (#24590) 2023-11-28 10:56:36 +01:00
Jarek Radosz
4c7793940a
DEV: Fix "no-dupe-keys" lint (#24589) 2023-11-28 10:55:52 +01:00
Jarek Radosz
70dc6bcfd3
DEV: Fix "no-unsafe-finally" lint (#24587) 2023-11-28 10:54:13 +01:00
Jarek Radosz
916e1371b3
DEV: Fix "ember/no-global-jquery" lint (#24586) 2023-11-28 10:53:38 +01:00
Jarek Radosz
22210a9c15
DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
Jarek Radosz
a80e32fe75
DEV: Fix no-extra-boolean-cast lint (#24582) 2023-11-28 10:37:23 +01:00
Jarek Radosz
cd69891b14
DEV: Fix no-unnecessary-curly-parens lint rule (#24581) 2023-11-28 10:35:36 +01:00
Krzysztof Kotlarek
5551a71c55
FEATURE: increase tag description limit to 1000 (#24561)
Admin can add tag description up to 1000 characters.

Full description is displayed on tag page, however on topic list it is truncated to 80 characters.
2023-11-28 08:45:40 +11:00
Penar Musaraj
633deb5af8
UX: Submit security key edit form on Enter (#24532)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-11-27 16:11:12 -05:00
David Taylor
6f3b087907 DEV: Generate Ember5 lockfile 2023-11-27 16:40:22 +00:00
David Taylor
16b6e86932 DEV: Introduce feature-flag for Ember 5 upgrade
This commit introduces the scaffolding for us to easily switch between Ember 3.28 and Ember 5 on the `main` branch of Discourse. Unfortunately, there is no built-in system to apply this kind of flagging within yarn / ember-cli. There are projects like `ember-try` which are designed for running against multiple version of a dependency, but they do not allow us to 'lock' dependency/sub-dependency versions, and are therefore unsuitable for our use in production.

Instead, we will be maintaining two root `package.json` files, and two `yarn.lock` files. For ember-3, they remain as-is. For ember5, we use a yarn 'resolution' to override the version for ember-source across the entire yarn workspace.

To allow for easy switching with minimal diff against the repository, `package.json` and `yarn.lock` are symlinks which point to `package-ember3.json` and `yarn-ember3.lock` by default. To switch to Ember 5, we can run `script/switch ember version 5` to update the symlinks to point to `package-ember5.json` and `package-ember3.json` respectively. In production, and when using `bin/ember-cli` for development, the ember version can also be upgraded using the `EMBER_VERSION=5` environment variable.

When making changes to dependencies, these should be made against the default `ember3` versions, and then `script/regen_ember_5_lockfile` should be used to regenerate `yarn-ember5.lock` accordingly. A new 'Ember Version Lockfiles' GitHub workflow will automate this process on Dependabot PRs.

When running a local environment against Ember 5, the two symlink changes will show up as git diffs. To avoid us accidentally committing/pushing that change, another GitHub workflow is introduced which checks the default Ember version and raises an error if it is greater than v3.

Supporting two ember versions simultaneously obviously carries significant overhead, so our aim will be to get themes/plugins updated as quickly as possible, and then drop this flag.
2023-11-27 16:40:22 +00:00
David Taylor
bdd71d49b5 DEV: Rename files in preparation for version feature-flagging 2023-11-27 16:40:22 +00:00
Renato Atilio
d93be8c7a1
FIX: remove trailing slashes and query params on meta-tag-updater's canonical url (#24445)
* FIX: remove trailing slashes and query params on meta-tag-updater's canonical url
2023-11-27 12:28:07 -03:00
Duc Manh
d506721eee
Fix: Handle failing to update parent category (#24401)
Co-authored-by: Jan Cernik <jancernik12@gmail.com>
2023-11-27 11:33:31 -03:00
David Taylor
a9bc732837
DEV: Prepare jquery integration for Ember upgrade (#24566)
- Update optional-features to tie the `jquery-integration` flag to the current ember version
- Wrap ember-4-specific logic in ember-cli-build with a version check
- Update global-compat.js to add the jquery global if it doesn't exist (i.e. if we're on a modern ember version)

Extracted from https://github.com/discourse/discourse/pull/21720. This is a no-op under our current Ember 3.28 version.
2023-11-27 14:01:27 +00:00
David Taylor
04164f7dda
DEV: Prepare lib/ember-events for Ember upgrade (#24565)
Extracted from https://github.com/discourse/discourse/pull/21720. This is a no-op under our current Ember 3.28 version.
2023-11-27 14:00:30 +00:00