Commit Graph

54408 Commits

Author SHA1 Message Date
Jarek Radosz 5678332ffb
DEV: Add `td` to the `element` helper list (#27106)
…so it uses the more performant glimmer/template-only component wrapper instead of falling back to an ember component wrapper. see the `element` helper PR for more details.
2024-05-21 18:59:50 +02:00
Kris 06f48a82ed
UX: switch post action buttons to inline-flex to avoid extra whitespace (#27110) 2024-05-21 11:58:15 -04:00
Discourse Translator Bot db3db06caf
Update translations (#27104) 2024-05-21 17:40:50 +02:00
Kris fbb0fb92d1
UX: search context box too dark (#27109) 2024-05-21 10:52:14 -04:00
Jarek Radosz 87769a83c4
DEV: Implement glimmer topic-list (#26743)
(experimental)

The initial implementation of glimmer topic-list and related components. Does not include new APIs and isn't compatible with existing customization. That's gonna come in future PRs.

Enabled by adding groups to `experimental_glimmer_topic_list_groups` setting.
2024-05-21 14:36:15 +02:00
Jarek Radosz eb2df2b7d6
DEV: Clean up sidebar modals (#26999)
1. async/await
2. TrackedSet
3. don't rely on ember array methods
4. list used props
5. move stuff out of constructors
6. don't use ember's Input component
7. convert a function to a method (to avoid passing in a class prop)
8. add missing `@tracked`
9. remove tracking from props that don't need it (not used in templates)
2024-05-21 14:35:22 +02:00
Régis Hanol fe12cfeab2
FIX: shows errors when converting to public is impossible (#27103)
Follow up to e04ac5e2d8 which missed showing the error messages in the "convert to public" modal 🤦‍♂️
2024-05-21 12:14:31 +02:00
Krzysztof Kotlarek 40d65dddf8
Revert "DEV: move post flags into database (#26951)" (#27102)
This reverts commit 7aff9806eb.
2024-05-21 16:21:07 +10:00
Alan Guo Xiang Tan 67a7b28096
DEV: Don't run `discourse-ai` plugin specs when running against stable (#27095)
`discourse-ai` has custom gems which need to be bumped in order to be
compatible with Ruby 3.3. However, its version is pinned so we can't
pull in the commits in which upgrades the gems to be compatible with
Ruby 3.3. Just avoid running the specs on `stable` branch for now until
we release a new stable.
2024-05-21 12:09:40 +08:00
Krzysztof Kotlarek 7aff9806eb
DEV: move post flags into database (#26951)
This is preparation for a feature that will allow admins to define their custom flags. Current behaviour should stay untouched.
2024-05-21 13:15:32 +10:00
Alan Guo Xiang Tan 34c527d694
DEV: Pull compatible themes in tests workflow (#27093)
This commit adds a step in our tests workflow on Github actions to update the themes to
use the compatible version when not running aginast the `main` branch.
This is to ensure that we are not running
the tests for themes against an incompatible version of Discourse.
2024-05-21 10:38:41 +08:00
chapoi 1dcf756d78
UX: shorten duration of bookmark toasties (#27085) 2024-05-21 10:09:12 +10:00
chapoi 5c09792f79
UX: increase base font-size to 16px (#27087) 2024-05-20 21:08:20 +02:00
Joffrey JAFFEUX 7a0c4c5296
FIX: improves chat audio notification reliability (#27089)
Debouncing the audio was causing the audio to be lost sometimes, somewhat randomly. It's not supposed to be necessary.

The commit also refactors the code to async/await.
2024-05-20 20:48:30 +02:00
David Taylor fb9a43c282
DEV: Introduce `element` helper (#27086)
Returns a wrapper component with the given tagname, or an empty wrapper for an empty string.
Similar to the reference implementation of RFC389, with higher-performance shortcuts for common elements.
2024-05-20 17:40:12 +01:00
David Taylor 23b02a3824
DEV: Introduce `@dedupeTracked` (#27084)
Same as `@tracked`, but skips notifying consumers if the value is unchanged. This introduces some performance overhead, so should only be used where excessive downstream re-evaluations are a problem.

This is loosely based on `@dedupeTracked` in the `tracked-toolbox` package, but without the added complexity of a customizable 'comparator'. Implementing ourselves also avoids the need for pulling in the entire package, which contains some tools which we don't want, or which are now implemented in Ember/Glimmer (e.g. `@cached`).
2024-05-20 15:59:30 +01:00
Ted Johansson 32aaf2e8d3
DEV: Remove deprecated AuthProvider#enabled_setting= (#27081)
AuthProvider#enabled_setting=, used primarily by plugins, has been deprecated since version 2.9, in favour of Authenticator#enabled?. This PR confirms we are seeing no more usage and removes the method.
2024-05-20 18:10:15 +08:00
Joffrey JAFFEUX 9302187ca4
FIX: ensures topic info is dynamic with scroll (#27082)
Prior to this fix we were using `topic.current_post_number` which is coming from the server side and represents the initial topic scroll position when initially rendered to the end user. However, this value is not dynamic and is not updated when the user scrolls, `topic.currentPost` is the dynamic equivalent.

No test as there are very low chances a test like this one based on scroll position, will be reliable over time.
2024-05-20 11:20:37 +02:00
Alan Guo Xiang Tan 29bf61d5dd
DEV: Add mutex_m to reviewed gems (#27080) 2024-05-20 15:03:33 +08:00
Martin Brennan 1239178f49
FEATURE: Introduce DBreadcrumbs components (#27049)
This commit introduces the following components:

* DBreadcrumbsContainer - The wrapper template-only component,
  which renders all DBreadcrumbsItem components on the page.
* DBreadcrumbsItem - The component that registers a LinkTo
  for the breadcrumb trail. The breadcrumb > trail > will
  show based on the order these items are rendered on the page.
* BreadcrumbsService - Manages the DBreadcrumbsContainer elements
  on the page via DBreadcrumbsContainerModifier.
* DBreadcrumbsContainerModifier - Handles registering DBreadcrumbsContainer
  elements with the BreadcrumbsService and deregistering them.

For now, we will only use these breadcrumbs in the admin section
of Discourse, and this initial commit only uses them in admin/plugins.

This is heavily based off of
https://github.com/Bagaar/ember-breadcrumbs,
but will be further modified for our needs.
2024-05-20 14:25:54 +10:00
Martin Brennan f2cdc3b2a4
FIX: Take into account language fallbacks for admin sidebar plugin links (#27061)
This commit fixes an issue where I18n.lookup was being used to
check if a link had a valid I18n key when the `addAdminSidebarSectionLink`
plugin API was used. However this was imperfect -- usually when we do
`I18n.t`, we fall back to the default locale (`en`), but if
`I18n.lookup` is used we do not do this, so we were removing the link
needlessly.

This issue was identified via the plugin API's use in https://github.com/discourse/docker_manager

c.f. https://meta.discourse.org/t/new-admin-sidebar-wheres-the-update-discourse-button/308213/15?u=martin
2024-05-20 09:41:53 +10:00
dependabot[bot] e019f848bf
Build(deps-dev): Bump rb-inotify from 0.10.1 to 0.11.1 (#27074)
Bumps [rb-inotify](https://github.com/guard/rb-inotify) from 0.10.1 to 0.11.1.
- [Commits](https://github.com/guard/rb-inotify/compare/v0.10.1...v0.11.1)

---
updated-dependencies:
- dependency-name: rb-inotify
  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>
2024-05-20 07:02:52 +08:00
dependabot[bot] 3081273795
Build(deps-dev): Bump mocha from 2.2.0 to 2.3.0 (#27075)
Bumps [mocha](https://github.com/freerange/mocha) from 2.2.0 to 2.3.0.
- [Changelog](https://github.com/freerange/mocha/blob/main/RELEASE.md)
- [Commits](https://github.com/freerange/mocha/compare/v2.2.0...v2.3.0)

---
updated-dependencies:
- dependency-name: mocha
  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-20 07:02:36 +08:00
dependabot[bot] 3afe9584f5
Build(deps-dev): Bump selenium-devtools from 0.124.0 to 0.125.0 (#27076)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.124.0 to 0.125.0.
- [Release notes](https://github.com/SeleniumHQ/selenium/releases)
- [Changelog](https://github.com/SeleniumHQ/selenium/blob/trunk/rb/CHANGES)
- [Commits](https://github.com/SeleniumHQ/selenium/commits)

---
updated-dependencies:
- dependency-name: selenium-devtools
  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-20 07:02:25 +08:00
dependabot[bot] 7920066e3b
Build(deps-dev): Bump lefthook from 1.6.11 to 1.6.12 (#27077)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.6.11 to 1.6.12.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.6.11...v1.6.12)

---
updated-dependencies:
- dependency-name: lefthook
  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-20 07:02:13 +08:00
dependabot[bot] 7f6b3c56cf
Build(deps-dev): Bump sass from 1.77.1 to 1.77.2 (#27078)
Bumps [sass](https://github.com/sass/dart-sass) from 1.77.1 to 1.77.2.
- [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.77.1...1.77.2)

---
updated-dependencies:
- dependency-name: sass
  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-20 07:02:02 +08:00
Joffrey JAFFEUX f752851030
FIX: mobile modal tweaks (#27073)
- removes `will-change: auto;` which is a performance hack which should be avoided and is probably causing more harm than good here
- lowers swipe velocity to 0.4 to ensure the modal can be dismissed with the thumb
- uses JS CSS animate API to animate the backdrop opacity
- uses the height of the modal container to have more precise values when computing backdrop opacity
- animate the modal container instead of the wrapper
- removes a useless template-lint-disable directive
- simplify the closing animation
- various small code tweaks to limit indirection
2024-05-19 15:43:03 +02:00
carson chang 875a413164
A11Y: Add aria-label to menu tabs (#27071)
* Update menu-tab.hbs

* Update menu-tab.hbs

* linting
2024-05-18 08:39:25 -07:00
Régis Hanol aa1b874f1a
FIX: My Thread's last reply excerpt on mobile (#27072)
... wasn't properly escaped so it would should html entities (like `&#39;` instead of the apostrophe `'`).

I checked all the other places we show an excerpt and this was the only one that was missing the call to `htmlSafe` -> `replaceEmoji`.

Internal ref - t/128877
2024-05-18 14:07:49 +02:00
Régis Hanol bf80688cd3
FIX: group activity's mentions infinite loading (#27070)
In 07ecbb5a3b we ensure the mentions in a group's activity page worked properly but we missed adding proper support for infinite loading.

The client is using the `before` parameter instead of the `before_post_id` to do the pagination.

This adds support for `before` as well as some tests to ensure it doesn't regress.

I also added tests to the group's activity posts as well since those were missing.

Finally I deleted some unused code (`group.messages_for`) which is not used anymore.

Context - https://meta.discourse.org/t/-/308044/9
2024-05-18 00:26:57 +02:00
Penar Musaraj a1843104dd
FIX: Broken link to theme in customize colors page (#27069)
This regressed in https://github.com/discourse/discourse/pull/26644
2024-05-17 15:04:12 -06:00
Isaac Janzen ede0fa5802
DEV: Update bulk-invite logs and PM template (#27057)
# Preview

<img width="754" alt="Screenshot 2024-05-17 at 8 50 03 AM" src="https://github.com/discourse/discourse/assets/50783505/6710234f-0195-42be-b70e-9d57ba48bb4a">


# New Logs

```
[2024-05-17 08:49:54 -0600] Invalid User Field 'backend name' for 'foobarbing@gmail.com'
[2024-05-17 08:49:54 -0600] Invalid Email 'test
[2024-05-17 08:49:54 -0600] Invalid Email 'this@$@**.com
```
2024-05-17 12:21:21 -06:00
Régis Hanol 6060e4618c
FIX: customize chat dropdown labels (#27067)
The translations of the labels of some of the chat preferences dropdowns were not customizable via the "site texts" feature.

This was because they were declared outside of a Controller class and were thus not taking into account the customization through "site texts".

Internal ref - t/128859
2024-05-17 18:56:08 +02:00
Régis Hanol 07ecbb5a3b
FIX: group's mentions was broken (#27066)
In 1deeff2336 we changed the format of the results given by the API but we forgot to update the `#mentions` endpoint as well.

Context - https://meta.discourse.org/t/-/308044
2024-05-17 18:39:05 +02:00
Sérgio Saquetim 501781c2e5
DEV: Add the `registerHomeLogoHrefCallback` plugin API (#27056)
The `registerHomeLogoHrefCallback` API allows setting a callback function that specifies the URL used in the home logo.
2024-05-17 13:06:47 -03:00
Régis Hanol b908abe35a
FIX: keep topic.word_count in sync (#27065)
Whenever one creates, updates, or deletes a post, we should keep the `topic.word_count` counter in sync.

Context - https://meta.discourse.org/t/-/308062
2024-05-17 17:05:49 +02:00
Jan Cernik 57eff8b760
DEV: Full system specs coverage for signup/login (#26977)
- login with username/password
- login with username/password and 2FA
- login with username/password back up code
- login with magic link
- login with magic link and 2FA
- login with magic link and back up code
- login when 2FA is required
- reset password
---
- signup and activate account
- signup with invite code
- signup with invite link
- signup and approve account
- signup and auto approve account
- signup with blocked domain
---
- basic login with Facebook
- basic login with Google
- basic login with Github
- basic login with Twitter
- basic login with Discord
- basic login with Linkedin
2024-05-17 11:56:43 -03:00
Régis Hanol e04ac5e2d8
FIX: display validation errors when converting topics (#27064)
When converting a PM to a public topic (and vice versa), if there was a validation error (like a topic already used, or a tag required or not allowed) the error message wasn't bubbled up nor shown to the user.

This fix ensures we properly stop the conversion whenever a validation error happens and bubble up the errors back to the user so they can be informed.

Internal ref - t/128795
2024-05-17 16:36:25 +02:00
Mark VanLandingham 9264479c27
DEV: Add modifier for webhook event header generation (#27054) 2024-05-17 09:33:39 -05:00
Martin Brennan a388f41dd4
DEV: Delete bookmark slow connection flaky (#27062)
Not much value in keeping this around
2024-05-17 09:31:51 -04:00
Selase Krakani 61e12aaebe
FEATURE: Extend PM recipient bulk imports (#27063)
* FIX: Support multiple topic allowed user imports

* FEATURE: Add topic allowed groups import support
2024-05-17 13:45:20 +02:00
Bianca Nenciu f5a0da6eba
FIX: Simplify navigation to subcategories page (#27053)
Navigation to subcategories page was possible through the category drop
and the "view all" link or through the category drop from the categories
page. This commit removes the latter method.

Follow up to commit 77b032c2b5.
2024-05-17 13:16:44 +03:00
Ítalo Alves 73481e8f45
FIX: Add check for existing provider_uids to generic import (#26914)
Co-authored-by: Gerhard Schlager <gerhard.schlager@discourse.org>
2024-05-17 11:36:31 +02:00
dependabot[bot] e1f3db8861
Build(deps-dev): Bump puppeteer-core from 22.8.2 to 22.9.0 (#27059)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 22.8.2 to 22.9.0.
- [Release notes](https://github.com/puppeteer/puppeteer/releases)
- [Changelog](https://github.com/puppeteer/puppeteer/blob/main/release-please-config.json)
- [Commits](https://github.com/puppeteer/puppeteer/compare/puppeteer-core-v22.8.2...puppeteer-core-v22.9.0)

---
updated-dependencies:
- dependency-name: puppeteer-core
  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-17 00:34:27 +02:00
Sérgio Saquetim 17add599e3
DEV: Add new plugin outlets in the `header/topic/info` component (#27038)
* Add header-topic-info__before and header-topic-info__after outlets
2024-05-16 19:29:44 -03:00
dependabot[bot] cbc564149b
Build(deps): Bump rexml from 3.2.6 to 3.2.8 (#27055)
Bumps [rexml](https://github.com/ruby/rexml) from 3.2.6 to 3.2.8.
- [Release notes](https://github.com/ruby/rexml/releases)
- [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md)
- [Commits](https://github.com/ruby/rexml/compare/v3.2.6...v3.2.8)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-16 23:53:43 +02:00
David Battersby 34c4acd32f
DEV: update thread title prompt migration (#27052)
Add migration to handle batch processing of user options 

Co-authored-by: Osama Sayegh <asooomaasoooma90@gmail.com>
2024-05-17 00:53:19 +04:00
Jean 63b7a36fac
FEATURE: Extend embeddable hosts with Individual tags and author assignments (#26868)
* FEATURE: Extend embeddable hosts with tags and author assignments
2024-05-16 15:47:01 -04:00
Régis Hanol 0e9451e93f
FIX: crawler view with unicode usernames (#27051)
When "unicode_usernames" is enabled, calling the "user_path" helper with a username containing some non ASCII character will break due to the route constraint we have on username.

This fixes the issue by always encoding the username before passing it to the "user_path" helper.

Internal ref - t/127547
2024-05-16 17:11:24 +02:00
Régis Hanol 02469d5795
FIX: chat replies are not always in a thread (#27023)
When you reply to a chat message, we [always create a thread][1]. But when the channel we're in doesn't have threading enabled, the reply is _technically_ not a thread.

This changes the `in_thread?` method to check for both the presence of a `thread_id` and to ensure that the channel has `threading_enabled`.

Internal ref - t/128103/3

[1]: e6e3eaf472/plugins/chat/app/services/chat/create_message.rb (L110-L115)
2024-05-16 16:10:23 +02:00