Commit Graph

55428 Commits

Author SHA1 Message Date
9299a9c067 FIX: Set overflow-x to auto to prevent scroll bar from always showing (#28294) 2024-08-13 13:22:36 -06:00
c96dce2934 DEV: Convert user-status-picker to glimmer/gjs/dbutton/input (#28344) 2024-08-13 18:57:57 +02:00
82741eb0a6 DEV: Replace onClick props in topic-timeline container (#28342)
Use `on` modifier instead, and set proper href attributes on links
2024-08-13 18:38:07 +02:00
1e3caeafa0 DEV: Add spec to ensure app works with multiple tagged loggers
When upgrading to Rails 7.1, we had some problems because we were using
several tagged loggers at the same time. They were all added to the main
broadcast logger shipped with Rails, but the Rails 7.1 codebase contains
a bug making a request being run as many times as there are tagged loggers.

The fix was to use the code from the Rails 7.2 codebase.

This patch adds a small spec to ensure the behavior will stay the proper
one in the future.
2024-08-13 18:10:03 +02:00
31ae81b8eb FIX: do not continue list inside codefence (#28346)
This commit forces the textarea to check if the list is inside a codefence and won't continue the list if it's the case.

Note this commit also uses the message param of qunit assertions to make them more explicit. It has no impact on behavior.
2024-08-13 17:36:51 +02:00
b3bf465890 UX: remove baseline alignment from chat timestamp (#28345) 2024-08-13 17:07:12 +02:00
05e120a9f2 Update translations (#28246) 2024-08-13 16:31:24 +02:00
8a09fd370a DEV: Convert software-update-prompt to glimmer/gjs/dbutton (#28341) 2024-08-13 15:47:14 +02:00
eccfc946f1 DEV: Convert admin-watched-word to glimmer/gjs/dbutton (#28340) 2024-08-13 15:45:44 +02:00
41593a5d7d DEV: Convert expand-post to glimmer/gjs/dbutton (#28339) 2024-08-13 14:22:24 +02:00
355dbb928a Revert "DEV: Use on modifier (or @action param) (#28323)" (#28338)
This reverts commit e3e5710b3d0c81217628bf913d888eab800e6435.
2024-08-13 12:39:24 +02:00
9641835743 Build(deps): Bump rexml from 3.3.4 to 3.3.5 (#28325)
Bumps [rexml](https://github.com/ruby/rexml) from 3.3.4 to 3.3.5.
- [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.3.4...v3.3.5)

---
updated-dependencies:
- dependency-name: rexml
  dependency-type: indirect
  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-08-13 11:02:26 +02:00
e3e5710b3d DEV: Use on modifier (or @action param) (#28323)
instead of `onclick` prop
2024-08-13 10:50:09 +02:00
5f9ec742b9 Build(deps): Bump cose from 1.3.0 to 1.3.1 (#28326)
Bumps [cose](https://github.com/cedarcode/cose-ruby) from 1.3.0 to 1.3.1.
- [Changelog](https://github.com/cedarcode/cose-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cedarcode/cose-ruby/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: cose
  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>
2024-08-13 10:49:55 +02:00
1e1fef68af Build(deps-dev): Bump test-prof from 1.3.3.1 to 1.4.0 (#28327)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.3.3.1 to 1.4.0.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.3.3.1...v1.4.0)

---
updated-dependencies:
- dependency-name: test-prof
  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-08-13 10:48:05 +02:00
bcfb8a5fc5 FIX: correctly render sql checkboxes (#28328)
This was not using CheckboxGroup and the I18n key was incorrect.
2024-08-13 10:46:54 +02:00
559c9dfe0a REVERT: FIX: serialize Flags instead of PostActionType (#28334) 2024-08-13 18:32:11 +10:00
0954ae70a6 FEATURE: add delay to native push notifications (#28314)
This change ensures native push notifications respect the site setting for push_notification_time_window_mins. Previously only web push notifications would account for the delay, now we can bring more consistency between Discourse in browser vs Hub, by applying the same delay strategy to both forms of push notifications.
2024-08-13 12:12:05 +04:00
d2c09e5ce1 PERF: do not expire cache when PostActionType is saved (#28337)
Reload is too expensive in a multisite environment. A proper way to expire cache is coming with the next PR.
2024-08-13 18:01:31 +10:00
47f749744f FIX: poll when config is on_close only show results when poll is closed (#28299)
See: https://meta.discourse.org/t/cant-edit-topic-with-poll-bug-occurs/320845?u=merefield

When the Poll is set to "results ON_CLOSE", vote numbers for each option are only streamed to the browser when the vote is Closed. It is therefore not possible to render the Results.

The current issue is that when you refresh the page, for those that have voted the default view is results. For this type of poll this should NOT happen. The Results view in this mode should not be possible to see until closure, even for the Author.

Because the votes are not yet serialised when this kind of poll remains open, an attempt to display results causes a JavaScript exception and in any case does not make logical sense.

So the fix here is making sure the default view, for Polls that have results on close, is the voting view until the Poll is Closed.

I've added a test to cover this scenario.

Additionally, this requires a refresh of the page when the poll admin actions a Close to ensure the results are serialized in.
2024-08-13 09:29:16 +02:00
60d62f1b7e FIX: poll ranked choice voter list corrupting on expand (#28315)
Initially, the poll results display a maximum of 25 voters per option. If the number of voters exceeds this limit, a button allows users to load additional pages of voters.

When this button is clicked, a method is called to retrieve the additional voter information. However, there was a bug where the local tracked object was not properly updated for ranked choice voters. This is due to the existence of two attributes per option: one indicating whether new data is currently loading, and the other containing the list of voters.

Instead of updating the entire option key with the voters list, the fix requires updating the voters attribute only.

This is a small but critical change. The pull request also includes a new test that significantly increases coverage, addressing this issue and beyond.
2024-08-13 09:28:28 +02:00
a6748a7c37 PERF: no redis calls when running migrations (#28336)
Avoid reaching Redis cache while running migrations
2024-08-13 14:20:31 +08:00
Sam
1fa3eb3f2a FIX: stop injecting uneeded margin (#28335) 2024-08-13 08:11:16 +02:00
c1f6ec3019 PERF: skip reset flag callbacks on seed (#28333)
When flags are seeded, we don't need to reset the cache for each record.

We should instead create all flags and reset the cache at the very end.
2024-08-13 13:22:57 +10:00
09262ac9b9 FIX: not hit Redis cache in seeds (#28329)
Hardcode IDs because seed in multisite environment is run concurrently which can cause performance problems.
2024-08-13 12:42:54 +10:00
094052c1ff FIX: serialize Flags instead of PostActionType (#28259)
### Why?
Before, all flags were static. Therefore, they were stored in class variables and serialized by SiteSerializer. Recently, we added an option for admins to add their own flags or disable existing flags. Therefore, the class variable had to be dropped because it was unsafe for a multisite environment. However, it started causing performance problems. 

### Solution
When a new Flag system is used, instead of using PostActionType, we can serialize Flags and use fragment cache for performance reasons. 

At the same time, we are still supporting deprecated `replace_flags` API call. When it is used, we fall back to the old solution and the admin cannot add custom flags. In a couple of months, we will be able to drop that API function and clean that code properly. However, because it may still be used, redis cache was introduced to improve performance.

To test backward compatibility you can add this code to any plugin
```ruby
  replace_flags do |flag_settings|
    flag_settings.add(
      4,
      :inappropriate,
      topic_type: true,
      notify_type: true,
      auto_action_type: true,
    )
    flag_settings.add(1001, :trolling, topic_type: true, notify_type: true, auto_action_type: true)
  end
```
2024-08-13 11:22:37 +10:00
c4c3520ff5 Build(deps-dev): Bump parallel from 1.26.1 to 1.26.2 (#28308)
Bumps [parallel](https://github.com/grosser/parallel) from 1.26.1 to 1.26.2.
- [Commits](https://github.com/grosser/parallel/compare/v1.26.1...v1.26.2)

---
updated-dependencies:
- dependency-name: parallel
  dependency-type: indirect
  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-08-12 23:53:09 +02:00
d10fd36319 FEATURE: participating users statistics (#28322)
Adds a new statistics (hidden from the UI, but available via the API) that tracks daily participating users.

A user is considered as "participating" if they have

- Reacted to a post
- Replied to a topic
- Created a new topic
- Created a new PM
- Sent a chat message
- Reacted to a chat message

Internal ref - t/131013
2024-08-12 23:47:13 +02:00
5b78bbd138 DEV: Convert account activation pages to use Ember (#28206) 2024-08-12 18:02:00 -03:00
df18bcd029 A11Y: remove redundant tabindex=0 from polls (#28320) 2024-08-12 14:42:06 -04:00
c0611a06e5 UX: remove poll button bg color to avoid highlight issue (#28319) 2024-08-12 14:39:37 -04:00
043fc0a117 UX: Small topic map improvements and fixes (#28215) 2024-08-12 15:37:05 -03:00
157c8e660a FEATURE: Change tags sent in topic_tags_changed trigger in automation plugin (#28318)
* FEATURE: Change tags sent in topic_tags_changed trigger in discourse_automation

Before, it was sending the old tags and the current tags in topic.
Now, it sends the removed tags and the added tags in the topic.

* DEV: update `missing_tags` to be `removed_tags`

* DEV: add spacing for better readability
2024-08-12 14:05:16 -03:00
79f871b558 FIX: Display new DM button when public channels are disabled (#28306) 2024-08-12 08:44:51 -05:00
1d6e54e54c DEV: Add admins and moderators sections to the redesigned /about page (#28273)
This commit continues on work laid out by 6039b513fe to redesign the /about page. In this commit, we add sections for showing the site admins and moderators.

The lists of admins and moderators display the 10 most recently seen admins/moderators, with a button to display the rest of admins or moderators. Admins or moderators that have not logged in to the site in the last year will not be shown. Clicking on an admin's or moderator's name/avatar will show their user card.
2024-08-12 16:23:44 +03:00
34de336afb DEV: Remove an unused component (#28316)
(admin/resumable-upload)
2024-08-12 14:45:40 +02:00
2a193f2173 DEV: Fix unsafe binding warnings (#28317)
e.g.

```
WARNING: Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see https://deprecations.emberjs.com/v1.x/#toc_binding-style-attributes. Style affected: \"height: 60px\"
```
2024-08-12 14:06:22 +02:00
d217a1756d Build(deps): Bump oj from 3.16.4 to 3.16.5 (#28287)
* Build(deps): Bump oj from 3.16.4 to 3.16.5

Bumps [oj](https://github.com/ohler55/oj) from 3.16.4 to 3.16.5.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.16.4...v3.16.5)

---
updated-dependencies:
- dependency-name: oj
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* add ostruct to default gems list

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-08-12 12:16:54 +02:00
c42a5a4700 Build(deps-dev): Bump puppeteer-core from 23.0.1 to 23.0.2 (#28291)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 23.0.1 to 23.0.2.
- [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-v23.0.1...puppeteer-core-v23.0.2)

---
updated-dependencies:
- dependency-name: puppeteer-core
  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-08-12 10:57:30 +02:00
84823550d4 DEV: Enable Rails 7.1 defaults 2024-08-12 10:41:13 +02:00
52a14e0669 Build(deps-dev): Bump shoulda-matchers from 6.2.0 to 6.3.0 (#28311)
Bumps [shoulda-matchers](https://github.com/thoughtbot/shoulda-matchers) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/thoughtbot/shoulda-matchers/releases)
- [Changelog](https://github.com/thoughtbot/shoulda-matchers/blob/main/CHANGELOG.md)
- [Commits](https://github.com/thoughtbot/shoulda-matchers/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: shoulda-matchers
  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-08-12 09:22:53 +08:00
529a0450a5 Build(deps-dev): Bump selenium-devtools from 0.126.0 to 0.127.0 (#28309)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.126.0 to 0.127.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-08-12 09:22:42 +08:00
4572c08d79 Build(deps): Bump concurrent-ruby from 1.3.3 to 1.3.4 (#28310)
Bumps [concurrent-ruby](https://github.com/ruby-concurrency/concurrent-ruby) from 1.3.3 to 1.3.4.
- [Release notes](https://github.com/ruby-concurrency/concurrent-ruby/releases)
- [Changelog](https://github.com/ruby-concurrency/concurrent-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ruby-concurrency/concurrent-ruby/compare/v1.3.3...v1.3.4)

---
updated-dependencies:
- dependency-name: concurrent-ruby
  dependency-type: indirect
  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-08-12 09:21:54 +08:00
d9bce3087d Build(deps-dev): Bump @swc/core from 1.7.6 to 1.7.10 (#28312)
Bumps [@swc/core](https://github.com/swc-project/swc) from 1.7.6 to 1.7.10.
- [Release notes](https://github.com/swc-project/swc/releases)
- [Changelog](https://github.com/swc-project/swc/blob/main/CHANGELOG.md)
- [Commits](https://github.com/swc-project/swc/compare/v1.7.6...v1.7.10)

---
updated-dependencies:
- dependency-name: "@swc/core"
  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-08-12 09:21:42 +08:00
516795b81b Build(deps-dev): Bump lefthook from 1.7.11 to 1.7.12 (#28313)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.7.11 to 1.7.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.7.11...v1.7.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-08-12 09:21:29 +08:00
c002911bed UX: set "topics" link in sidebar as active for hot, unseen, and my posts filters (#28305) 2024-08-09 16:39:12 -04:00
9d5eb6fed6 A11Y: add aria-label to avatar link on categories page (#28304) 2024-08-09 14:13:45 -04:00
b59b24884f DEV: Promote modifyClass warning to error (#28300)
This message indicates broken behavior, so it should be an error rather than a warning.

An early-return is added, so that we don't even attempt to make the modification. This will make the behavior consistent, and easier to understand.

Also updates the normalization logic to use the resolver's own logic. This will handle all sorts of normalization in addition to our deprecations.
2024-08-09 16:45:33 +01:00
206bbb4255 UX: Add sidebar DM list back when public channels are disabled (#28301) 2024-08-09 09:16:14 -05:00
df5561d780 DEV: Ensure deprecation warning banner works in development builds (#28302)
In development, Ember raises an error when previously-used values are updated during a render. This is to avoid 'backtracking', where parts of templates have to be re-rendered multiple times. In general, this kind of pattern should be avoided, and Ember's warning helps us do that.

However, for the deprecation warning banner, it is quite reasonable for some rendering to trigger a deprecation, and thereby require the global-notice to be re-rendered. We can use our `DeferredTrackedSet` to achieve that. Its `.add` method will delay adding an item to the Set until after the current render has completed.
2024-08-09 15:04:05 +01:00