Commit Graph

17666 Commits

Author SHA1 Message Date
David Taylor
003b44c75c
UX: Restore wizard confetti in final step (#23533)
This was accidentally removed as part of the refactoring in fcb4e5a1a1. This commit restores it, and updates it use theme-specific colours.
2023-09-26 12:04:21 +01:00
Godfrey Chan
6bcb9f444e
DEV: Remove unused wizard code (#23664)
favicons were removed in #17477

theme-preview appears to once be a `.hbs` file shared by several
components, which went away with the refactor in #20282. It must
have accidentally came back with some rebase error, and then got
picked up by the template-only component codemod. It's unused and
does nothing anyway.
2023-09-26 12:03:39 +01:00
Godfrey Chan
f576187d78
UX: Correct tab selection in Wizard styling preview (#23639)
It seems like the intention is to update the tab selection at the bottom when the scrollable pane changes enough. In my testing (and I think by definition?), it doesn't seem like `scrollLeft` ever exceeds `offsetWidth`, so that tab-switching behavior doesn't ever happen
2023-09-26 12:02:09 +01:00
Alan Guo Xiang Tan
fa243484ca
FIX: Custom sidebar section link with / path leading to blank page (#23661)
What is the problem we are trying to solve here?

The `/` path in our Ember app leads to the `discovery.index` route but
we actually don't render anything on that route leading to a blank page
if the Ember app were to transition to it which is what was happening
when a user adds a custom sidebar section link with the `/` path.

What is the fix there?

Instead of generating a link for the `discovery.index` route when
creating the sidebar section link, we detect if the Ember route is
`discovery.index` and change it to the `discovery.${defaultHomepage()}`
route instead.
2023-09-26 15:14:13 +08:00
dependabot[bot]
77655cbb8c
Build(deps-dev): Bump sass from 1.66.1 to 1.68.0 in /app/assets/javascripts (#23638)
Bumps [sass](https://github.com/sass/dart-sass) from 1.66.1 to 1.68.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.66.1...1.68.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>
2023-09-26 10:41:35 +08:00
Godfrey Chan
b5ccf89914
DEV: Cleanup unused wizard illustrations (#23659)
These were defunct since #19487
2023-09-26 10:34:38 +08:00
dependabot[bot]
d0c7fa8db0
Build(deps-dev): Bump the babel group (#23657)
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.22.20 to 7.23.0
- [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.0/packages/babel-core)

Updates `@babel/standalone` from 7.22.20 to 7.23.1
- [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.1/packages/babel-standalone)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-26 02:34:33 +02:00
dependabot[bot]
ef878dcf93
Build(deps-dev): Bump babel-import-util in /app/assets/javascripts (#23658)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 1.4.1 to 2.0.1.
- [Commits](https://github.com/ef4/babel-import-util/compare/v1.4.1...v2.0.1)

---
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>
2023-09-26 01:47:26 +02:00
Kris
91c94f5aa6
DEV: update a couple button classes (#23127) 2023-09-25 16:45:57 -04:00
Kris
a40c98cf27
DEV: remove tag from create-topic-button outlets (#23625) 2023-09-25 15:53:53 -04:00
Kris
cbf8d85e6b
UX: improve activity column title data (#23614) 2023-09-25 15:53:16 -04:00
Jarek Radosz
5484030162
DEV: Use disableImplicitInjections more extensively (#23579) 2023-09-25 19:30:07 +02:00
David Taylor
af30536690
DEV: Allow PluginOutlets to 'wrap' a core implementation (#23110)
Our existing PluginOutlet system allows theme/plugin developers to easily insert new content into Discourse.

Another common requirement is to **replace** existing content in Discourse. Previously this could be achieved either using template overrides, or by introducing new content via a PluginOutlet and then hiding the old implementation with CSS. Neither of these patterns are ideal from a maintainability or performance standpoint.

This commit introduces a new mode for PluginOutlets. They can now be used to 'wrap' blocks of content in core. If a plugin/theme registers a connector for the outlet, then it will be rendered **instead of** the core implementation. If needed, outlets can use `{{yield}}` to render the core implementation inside their own implementation (e.g. to add a wrapper element).

In this 'wrapper' mode, only one connector can be registered for each outlet. If more than one is registered, only one will be used, and an error will be printed to the console.

To introduce a new PluginOutlet wrapper, this kind of thing can be added to a core template:

```hbs
<PluginOutlet @name="site-logo" @defaultGlimmer={{true}} @outletArgs={{hash title=title}}>
  <h1>This is the default core implementation: {{title}}</h1>
</PluginOutlet>
```

A plugin/theme can then register a connector for the `site-logo` outlet:

```hbs
{{! connectors/site-logo/my-site-logo-override.hbs }}
<h2>This is the plugin implementation: {{@outletArgs.title}}</h2>
```

Care should be taken when introducing new wrapper PluginOutlets. We need to ensure that

1) They are properly sized. In general it's preferable for each outlet to wrap a small amount of core code, so that plugin/themes only need to re-implement what they want to change

2) The `@outletArgs` are carefully chosen. It may be tempting to pass through lots of core implementation into the outletArgs (or worse, use `this` to pass a reference to the wrapping component/controller). Doing this will significantly increase the API surface area, and make it hard to refactor core. Instead, we should aim to keep `@outletArgs` to a minimum, even if that means re-implementing some very simple things in themes/plugins.
2023-09-25 14:56:06 +01:00
David Taylor
88ec2320dc
UX: Only close modal for full 'click' events outside (#23566)
Previously we were using 'mouseup', which meant that if you started the click inside, and then dragged to outside the modal, it would still close. This kind of dragging action is common when selecting text, and having it close the modal can be very frustrating.

Simply switching to a 'click' listener doesn't totally solve the problem, because when a click event involves dragging from one element to another, the browser will fire the event on "the most specific ancestor element that contained both elements". For modals, the most specific common ancestor was still the `modal-middle-container`, which would cause the modal to close.

Therefore, this commit sets the modal containers to have `pointer-events: none`, and sets up the click listener on the `.modal-backdrop` element, which is **adjacent** to the modal in the DOM. That means that click events fired on any ancestors of the modal will not accidentally trigger closure.
2023-09-25 14:23:59 +01:00
David Taylor
6ad810c991
DEV: Install ember-route-template (#23532)
This will allow us to use `<template>` for route templates. For more details, see the README at https://github.com/discourse/ember-route-template
2023-09-25 14:14:24 +01:00
Jarek Radosz
837cec6c3d
DEV: Consistently call setupTest(hooks) in unit tests (#23610) 2023-09-25 12:43:41 +02:00
dependabot[bot]
da1f1a92dd
Build(deps-dev): Bump terser in /app/assets/javascripts (#23631)
Bumps [terser](https://github.com/terser/terser) from 5.19.4 to 5.20.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.4...v5.20.0)

---
updated-dependencies:
- dependency-name: terser
  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>
2023-09-25 12:36:33 +02:00
Ted Johansson
c42257b47d
DEV: Prettify negative numbers in reviewable score explanation (#23642)
This is an aesthetic change. Currently, if one of the scores involved in the reviewable score explanation is negative, we display it as: + -value. This changes that.

I also made an attempt at converting the component into GJS format. This is done as a separate commit.
2023-09-25 10:34:51 +01:00
dependabot[bot]
efce57e23d
Build(deps-dev): Bump the babel group (#23622)
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.22.19 to 7.22.20
- [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.22.20/packages/babel-core)

Updates `@babel/standalone` from 7.22.19 to 7.22.20
- [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.22.20/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:development
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-25 10:21:55 +02:00
dependabot[bot]
8c0639a8fb
Build(deps-dev): Bump qunit in /app/assets/javascripts (#23645)
Bumps [qunit](https://github.com/qunitjs/qunit) from 2.19.4 to 2.20.0.
- [Release notes](https://github.com/qunitjs/qunit/releases)
- [Changelog](https://github.com/qunitjs/qunit/blob/main/History.md)
- [Commits](https://github.com/qunitjs/qunit/compare/2.19.4...2.20.0)

---
updated-dependencies:
- dependency-name: qunit
  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>
2023-09-25 10:14:21 +02:00
dependabot[bot]
f4b0a48952
Build(deps-dev): Bump eslint in /app/assets/javascripts (#23646)
Bumps [eslint](https://github.com/eslint/eslint) from 8.49.0 to 8.50.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.49.0...v8.50.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2023-09-25 10:13:52 +02:00
Kris
1d14474e1d
A11Y: "more" nav link should use aria-expanded (#23613) 2023-09-15 11:27:02 -04:00
Renato Atilio
aa9510a731
FIX: use the destination_url cookie as return_path if present (#23594) 2023-09-15 12:11:03 -03:00
Ted Johansson
68c891609b
FIX: Add back missing 'delete spammer' flag option (#23605) 2023-09-15 17:21:03 +08:00
dependabot[bot]
f60c01b7e4
Build(deps-dev): Bump the babel group (#23602)
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.22.17 to 7.22.19
- [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.22.19/packages/babel-core)

Updates `@babel/standalone` from 7.22.17 to 7.22.19
- [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.22.19/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:development
  update-type: version-update:semver-patch
  dependency-group: babel
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-15 01:00:18 +02:00
Jarek Radosz
8cb8f130d9
DEV: Convert request-group-membership-form to new modal api (#23600) 2023-09-15 00:39:52 +02:00
Jarek Radosz
4a1621c677
DEV: Use the Store to create User records (#23584) 2023-09-14 23:26:51 +02:00
Jarek Radosz
c75b379d6f
DEV: Future-proof htmlSafe interactions (#23596)
See https://github.com/discourse/discourse-encrypt/pull/282

> `cooked` was an Ember SafeString. The internal storage of the string changed from `.string` to `.__string` at some point between Ember 3.28 and Ember 5. Instead, we can use `toString()` which is guaranteed to work in all situations
2023-09-14 23:04:57 +02:00
Jarek Radosz
ed8d0656f9
DEV: Convert tag-upload to the new modal API (#23590) 2023-09-14 21:32:45 +02:00
Kris
e1c3b14b1a
A11Y: Activate user menu tab on keydown too (#23593) 2023-09-14 14:07:35 -04:00
Blake Erickson
2427af4c46
DEV: Adjust site setting search limiter (#23589)
DEV: Adjust site setting search limiter

This opens up the site setting search limiter some more so that when
searching for "min length" it will contain
"min_personal_message_post_length" as one of the results, but not open
it up so much so that when searching for "digest",
"pending_users_reminder_delay_minutes" won't show up in the results
because it isn't really related.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-09-14 09:52:25 -06:00
Kris
3340852328
A11Y: avatar upload button should be focusable (#23575) 2023-09-14 09:04:17 -04:00
David Taylor
45adb22abe
DEV: Automatically retry patch-package on failure (#23583)
We are seeing occasional flakes in `patch-package`, possibly caused by https://github.com/ds300/patch-package/issues/484. This wrapper script will retry patch-package three times before giving up. Longer-term we hope to upgrade to a package manager with built-in patch support.
2023-09-14 12:25:06 +01:00
Jarek Radosz
4571197e06
DEV: Convert global-notice to a native class (#23582) 2023-09-14 12:34:30 +02:00
David Taylor
a60d7a2bc7
DEV: Modernize admin-site-text route/controller (#23581)
- Switch to `@tracked` and native getters
- Remove queryParam defaults which are awkward to work with. Instead, add `resolvedBlah` getters
- Add 'no results found' text
- Use standard 'model' key instead of a custom `setupController` method
- Remove use of `route-action`
- Remove `{{action` helper

Default queryParams in ember controllers are tricky to work with, especially when combined with the new router service. Instead, we can handle defaults ourselves
2023-09-14 11:27:09 +01:00
Jarek Radosz
5df1b1c523
DEV: Upgrade the so-called share-and-invite modal (#23574) 2023-09-14 10:50:50 +02:00
Jarek Radosz
91e456ba30
DEV: Convert emoji-store into a native class (#23572) 2023-09-14 10:32:17 +02:00
Kelv
a4238a3726
DEV: upgrade grant badge modal to glimmer (#23526)
* DEV: upgrade grant badge modal to glimmer
* DEV: add unit tests for grant badge utils
* DEV: replace grant-badge-controller mixin with grant-badge-utils in admin-user-badges controller
* DEV: remove GrantBadgeController mixin
2023-09-14 10:05:29 +08:00
dependabot[bot]
041f522c85
Build(deps-dev): Bump sinon in /app/assets/javascripts (#23578)
Bumps [sinon](https://github.com/sinonjs/sinon) from 15.2.0 to 16.0.0.
- [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/v15.2.0...v16.0.0)

---
updated-dependencies:
- dependency-name: sinon
  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>
2023-09-14 01:04:14 +02:00
Jarek Radosz
61f4af2995
DEV: Remove unused userInvitedShow logic (#23569)
share-and-invite modal doesn't seem to use it anymore
2023-09-13 23:07:19 +02:00
Jarek Radosz
6c20d8cc8c
DEV: Convert document-title to a native class (#23570)
Included: removed the `reset` method, used private fields, added explicit service injections
2023-09-13 22:12:33 +02:00
Isaac Janzen
3d6b812220
DEV: Move relevant glimmer search menu logic to service (#23483)
This will allow initializing the glimmer search menu without having to pass args directly from header.js widget, to help themes and plugins with search customizations

---------

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2023-09-13 14:32:12 -05:00
Jarek Radosz
6b218636ab
DEV: Convert ConditionalLoadingSpinner to gjs (#23565) 2023-09-13 20:12:38 +02:00
Joffrey JAFFEUX
ef0a049b87
FIX: scope animated-images-pause to topic-post (#23561)
This was causing issues on chat which is not properly supporting this for now.
2023-09-13 16:20:06 +02:00
David Battersby
6e2b484f12
FIX: prevent lightbox images from double escaping titles (#23458)
This change fixes an issue where lightbox images are showing escaped text in the link title and lightbox image description area.
2023-09-13 14:33:08 +08:00
Alan Guo Xiang Tan
038de393ed
DEV: Raise an error in test env when I18n interpolate argument is missing (#23527)
Why this change?

We have been bitten by bugs where tests are not catching missing
interpolate argument in our client side code because the JavaScript
tests are also using `I18n.translate` to assert that the right message
is shown. Before this change, `I18n.interpolate` will just replace the
missing interpolation argument in the final translation with some
placeholder. As a result, we ended up comparing a broken translation
with another broken translation in the test environment.

Why does this change do?

This change introduces the `I18n.testing` property which when set to
`true` will cause `I18n.translate` to throw an error when an interpolate
argument is missing. With this commit, we also set `I18n.testing = true`
when running qunit acceptance test.
2023-09-13 10:53:48 +08:00
OsamaSayegh
c1b5faa5fd
SECURITY: Limit name field length of TOTP authenticators and security keys 2023-09-12 15:31:17 -03:00
Joffrey JAFFEUX
85fddf58bc
Revert "DEV: FloatKit (#23541)" (#23549)
This reverts commits

0623ac684a
408e71e437
a32fa3b947

User tips were running into some issues.
2023-09-12 13:55:12 -04:00
Joffrey JAFFEUX
a32fa3b947
FIX: cancel post toolbar on click outside (#23546)
On `mousedown` if the click is outside a cooked element cancel the `mousedown`/`mouseup` sequence and only rely on the `selectionchange` event.

This change ensures a click on avatar for example will work, even if user is doing a rather slow click (meaning: the mousedown has been hold for more than 100ms).
2023-09-12 18:49:06 +02:00
Blake Erickson
9ac5e09179
DEV: Show separate error message for backup uploads (#23480)
Due to server upload limits backups may receive a 413 error so we need
to display a different error message than the default one we have set
for attachments.
2023-09-12 09:58:29 -06:00