Commit Graph

53980 Commits

Author SHA1 Message Date
Vinoth Kannan
143f06f2c6
FEATURE: Allow watched words to be created as a group (#26632)
At the moment, there is no way to create a group of related watched words together.  If a user needed a set of words to be created together, they'll have to create them individually one at a time.

This change attempts to allow related watched words to be created as a group. The idea here is to have a list of words be tied together via a common `WatchedWordGroup` record.  Given a list of words, a `WatchedWordGroup` record is created and assigned to each `WatchedWord` record. The existing WatchedWord creation behaviour remains largely unchanged.

Co-authored-by: Selase Krakani <skrakani@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-04-29 15:50:55 +05:30
David Battersby
0c8f531909
FEATURE: encourage users to set chat thread titles (#26617)
This change encourages users to title their threads to make it easier for other users to join in on conversations that matter to them.

The creator of the chat thread will receive a toast notification prompting them to add a thread title when on mobile and the thread has at least 5 sent replies.
2024-04-29 17:20:01 +08:00
David Taylor
620f76cec1
DEV: Log original exception/backtrace for RequestTracker errors (#26802) 2024-04-29 09:05:32 +01:00
Joffrey JAFFEUX
1510c6d004
FIX: correctly enable/disable body scroll on modal (#26784) 2024-04-29 08:45:48 +02:00
Joffrey JAFFEUX
c1c823144b
FIX: correctly rename scroller everywhere (#26783) 2024-04-29 08:45:37 +02:00
Martin Brennan
94fe31e5b3
UX: Fix report color duplication (#26799)
In the "Consolidated Pageviews with Browser Detection (Experimental)"
report we used the same color for "Known Crawler" and "Other pageviews"
which makes the report confusing to look at, this commit makes them
different.
2024-04-29 15:12:47 +10:00
Martin Brennan
79cccaf61f
DEV: Try fix flaky sidebar filter spec (#26797)
We were getting this error causing it to flake when
creating users:

```
ActiveRecord::StatementInvalid:
  PG::ReadOnlySqlTransaction: ERROR:  cannot execute INSERT in a read-only transaction
```
2024-04-29 15:01:33 +10:00
Krzysztof Kotlarek
0bfa37eb2d
DEV: fix flaky admin_customize_themes spec (#26798)
Because spec is searching for "5", we need to be sure that "Cool theme 5" is created.
2024-04-29 11:39:14 +08:00
Krzysztof Kotlarek
da329d54af
FEATURE: new admin sidebar for moderators (#26795)
Enable a new sidebar for moderators with limited links.
2024-04-29 11:32:47 +10:00
Charley Sheets
6c9f04a56c
DEV: Fix confusing comment (#26781) 2024-04-29 09:16:20 +08:00
Jarek Radosz
5d568d0bab
Revert "DEV: Convert topic-title to glimmer/gjs (#26775)" (#26794)
This reverts commit 261ef8404e.
2024-04-29 09:15:35 +08:00
Martin Brennan
edec941a87
FIX: Better tracking of topic visibility changes (#26709)
This commit introduces a few changes as a result of
customer issues with finding why a topic was relisted.
In one case, if a user edited the OP of a topic that was
unlisted and hidden because of too many flags, the topic
would get relisted by directly changing topic.visible,
instead of going via TopicStatusUpdater.

To improve tracking we:

* Introduce a visibility_reason_id to topic which functions
  in a similar way to hidden_reason_id on post, this column is
  set from the various places we change topic visibility
* Fix Post#unhide! which was directly modifying topic.visible,
  instead we use TopicStatusUpdater which sets visibility_reason_id
  and also makes a small action post
* Show the reason topic visibility changed when hovering the
  unlisted icon in topic status on topic titles
2024-04-29 10:34:46 +10:00
Martin Brennan
acc5b01e21
DEV: Add pry-stack_explorer again (#26763)
This was reverted in 26a387c9c6
because the other pry gem changes there broke prod -- it
should be safe to just add this dev/test dependency
2024-04-29 10:34:28 +10:00
dependabot[bot]
674cc2d1b5
Build(deps-dev): Bump selenium-webdriver from 4.20.0 to 4.20.1 (#26793) 2024-04-29 02:21:05 +02:00
dependabot[bot]
3e1377578a
Build(deps-dev): Bump babel-import-util from 2.0.3 to 3.0.0 (#26786)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.3 to 3.0.0.
- [Release notes](https://github.com/ef4/babel-import-util/releases)
- [Changelog](https://github.com/ef4/babel-import-util/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.3...v3.0.0)

---
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>
2024-04-29 00:45:54 +02:00
dependabot[bot]
f674c6659f
Build(deps-dev): Bump rubocop from 1.63.3 to 1.63.4 (#26789)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.63.3 to 1.63.4.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.63.3...v1.63.4)

---
updated-dependencies:
- dependency-name: rubocop
  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-04-29 00:42:54 +02:00
dependabot[bot]
4a200a670b
Build(deps-dev): Bump @floating-ui/dom from 1.6.3 to 1.6.4 (#26785)
Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.6.3 to 1.6.4.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.4/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  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-04-29 00:41:43 +02:00
dependabot[bot]
2dedaf91a2
Build(deps-dev): Bump parallel_tests from 4.7.0 to 4.7.1 (#26791)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 4.7.0 to 4.7.1.
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v4.7.0...v4.7.1)

---
updated-dependencies:
- dependency-name: parallel_tests
  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-04-29 00:41:09 +02:00
dependabot[bot]
56f2ea7d46
Build(deps-dev): Bump parser from 3.3.0.5 to 3.3.1.0 (#26790)
Bumps [parser](https://github.com/whitequark/parser) from 3.3.0.5 to 3.3.1.0.
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v3.3.0.5...v3.3.1.0)

---
updated-dependencies:
- dependency-name: parser
  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-04-29 00:40:51 +02:00
dependabot[bot]
2013673d9e
Build(deps-dev): Bump ember-cli from 5.8.0 to 5.8.1 (#26787)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.8.0 to 5.8.1.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v5.8.0...v5.8.1)

---
updated-dependencies:
- dependency-name: ember-cli
  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-04-29 00:22:49 +02:00
Jarek Radosz
f75c253b95
DEV: Inline cancel-link code (#26778)
No need for this small component (and its unused and empty admin component twin)
2024-04-27 14:26:29 +02:00
Jarek Radosz
505d8b52b8
DEV: Add support for arrays to concatClass (#26777)
It'd be useful in cases like:

```gjs
get flagNames() {
  return this.flags?.map((flag) => flag && `flag-${flag.name}`);
  // w/o this change you'd have to handle it here:
  // return this.flags?.map((flag) => flag && `flag-${flag.name}`).filter(Boolean).join(" ");
}

<template>
  <span class={{concatClass "gadget" this.flagNames}}>
  {{! …or here: }}
  <span class={{concatClass "gadget" (concatClass this.flagNames)}}>
```

(also: replaces ember's `compact()` with `filter(Boolean)`)
2024-04-27 12:02:20 +02:00
Jarek Radosz
cf11e556cb
DEV: Update htmlSafe imports (#26776) 2024-04-27 12:01:58 +02:00
Jarek Radosz
261ef8404e
DEV: Convert topic-title to glimmer/gjs (#26775) 2024-04-27 11:58:59 +02:00
Jarek Radosz
2a52f7f13f
DEV: Convert track-selected to glimmer/gjs (#26773) 2024-04-27 11:58:42 +02:00
Joffrey JAFFEUX
fb40f50865
FIX: ensures last read is updated on new message (#26772) 2024-04-26 18:27:39 +02:00
Jarek Radosz
6c7e46a32f
DEV: Remove key-enter-escape mixin (#26759)
Was used in only two places, just inline it to unblock conversion to glimmer
2024-04-26 16:42:22 +02:00
Jarek Radosz
9874801f94
DEV: Convert topic-post-badges to glimmer/gjs (#26760) 2024-04-26 16:16:32 +02:00
Joffrey JAFFEUX
e7f0aa52fa
FIX: ensures we don't exit without pending automations (#26771)
This case is not supposed to happen but it seems safer to ensure this case will recreate pending automations.
2024-04-26 14:05:27 +02:00
Régis Hanol
803c275bd7 DEV: add support for adding custom status filter
Those can be used in the /filter routes.
2024-04-26 14:04:03 +02:00
Joffrey JAFFEUX
351d212e8a
FIX: do not increment reply count manually (#26769)
That could cause flakeyness in specs depending in which timing message bus would arrive and it's not necessary as it should be updated with `handleThreadOriginalMessageUpdate`.
2024-04-26 12:32:06 +02:00
Joffrey JAFFEUX
a7f596da7a
FIX: relative picker was being reset on change (#26766)
A change in relative picker was causing a serie of events which ultimately would cause the whole list of time options to be reset and re-rendered which would cause a new instance of the picker to be created, causing a reset.

The fix is using id in the each loop to help ember identify that it doesn’t have to re-render a specific component.
2024-04-26 10:59:51 +02:00
David Battersby
dad6912566
DEV: add toast progress bar to styleguide (#26767) 2024-04-26 16:49:58 +08:00
dependabot[bot]
5dad583442
Build(deps-dev): Bump puppeteer-core from 22.7.0 to 22.7.1 (#26762)
Bumps [puppeteer-core](https://github.com/puppeteer/puppeteer) from 22.7.0 to 22.7.1.
- [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.7.0...puppeteer-core-v22.7.1)

---
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-04-26 09:50:55 +02:00
David Battersby
09f2a42f5f
FIX: build chat message excerpt for thread preview (#26765)
Follow up to #26712 to account for older threads that don't have a persisted excerpt, as this was previously generated on every page load.

This change allows us to build the excerpt on the fly when none exists, fixing the issue of missing message excerpts for thread previews (within channel) and thread lists (on mobile/desktop).
2024-04-26 14:29:35 +08:00
Alan Guo Xiang Tan
9d96fcb821
DEV: Improve test coverage of themes:update rake task (#26764)
This commit adds a test to ensure that settings for a theme are retained
even if saving a theme setting after a theme setting migration fails.
Prior to the fix introduced in 35bc27a36d,
failing to save the new settings will actually cause some or all of the
theme's setting to be lost.
2024-04-26 10:04:15 +08:00
David Taylor
594026d65f
FIX: Include HTML content for authenticated users with crawler UA (#26757)
e05628c0 introduced an optimization to remove basic-HTML content for authenticated users. The assumption is that, if they were able to log in, they must have a JS capable browser and do not need the basic HTML.

However, there are use-cases where an API-key is used to crawl a private site, or private categories of a public site. This commit re-enables those use cases by keeping the basic-html in place for crawler/bot user agents.
2024-04-25 22:41:57 +01:00
Daniel Waterworth
e0e0e0506f
DEV: Limit the number of category sidebar links a user can have (#26756) 2024-04-25 13:21:39 -05:00
Régis Hanol
989d6f921a UX: loading spinner when clicking an item
This fixes the UX when clicking a checklist item to toggle its state.
2024-04-25 18:45:38 +02:00
Daniel Waterworth
c77d109362
FIX: Selecting categories for new admin webhooks (#26746) 2024-04-25 09:43:16 -05:00
Joffrey JAFFEUX
0f2067b363
DEV: drop ignored columns (#26755)
chat_channels - last_message_sent_at
2024-04-25 16:35:23 +02:00
Bianca Nenciu
dbe923d26e
FIX: Fetch categories for "+subcategories" option (#26622)
Selecting the +subcategories option does not work sometimes when "lazy
load categories" is enabled because the subcategories may not be
fetched. This ensures that subcategories are loaded by requesting them
before being used.
2024-04-25 16:47:45 +03:00
Osama Sayegh
2215fa0c8e
FIX: Pass values of objects typed settings to theme migrations (#26751)
This commit fixes a bug in theme settings migrations where values of `objects` typed theme settings aren't passed to migrations even when there are overriding values for those settings. What causes this bug is that, when creating the hash that contains all the overridden settings and will be passed to migrations, the values of `objects` typed settings are incorrectly retrieved from the `value` column (which is always nil for `objects` type) instead of `json_value`. `objects` settings are different from all other types in that they store their values in the `json_value` column and they need to be special-cased when retrieving their values.
2024-04-25 16:39:22 +03:00
Joffrey JAFFEUX
9d3ab91517
UX:minor tweaks to user notifications dropdown (#26754)
- changes mute icon to bell-slash
- changed mute text
- changed ignore text
2024-04-25 15:22:41 +02:00
Natalie Tay
00a9369ca2
FIX: Move user reindexing into a job (#26753)
In a large forum with millions of users and millions of user_fields
updating the list of dropdown user field options will result in a
502 now due to the large number of fields.

This commit moves the indexing into a job.
2024-04-25 20:58:34 +08:00
David Battersby
c62d3610c6
PERF: Reduce overhead from chat message excerpt (#26712)
This change moves the chat message excerpt into a new database column (string) on the chat_messages table.

As part of this change, we will now set the excerpt within the `Chat::CreateMessage` service, and update it within the `Chat::UpdateMessage` service.
2024-04-25 14:29:00 +02:00
dependabot[bot]
14fc029a30
Build(deps-dev): Bump selenium-devtools from 0.123.0 to 0.124.0 (#26748)
Bumps [selenium-devtools](https://github.com/SeleniumHQ/selenium) from 0.123.0 to 0.124.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-04-25 12:03:14 +02:00
dependabot[bot]
79941473c6
Build(deps-dev): Bump selenium-webdriver from 4.19.0 to 4.20.0 (#26747)
Bumps [selenium-webdriver](https://github.com/SeleniumHQ/selenium) from 4.19.0 to 4.20.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/compare/selenium-4.19.0...selenium-4.20.0)

---
updated-dependencies:
- dependency-name: selenium-webdriver
  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-04-25 12:02:56 +02:00
David Taylor
2f2da72747
FEATURE: Add experimental tracking of 'real browser' pageviews (#26647)
Our 'page_view_crawler' / 'page_view_anon' metrics are based purely on the User Agent sent by clients. This means that 'badly behaved' bots which are imitating real user agents are counted towards 'anon' page views.

This commit introduces a new method of tracking visitors. When an initial HTML request is made, we assume it is a 'non-browser' request (i.e. a bot). Then, once the JS application has booted, we notify the server to count it as a 'browser' request. This reliance on a JavaScript-capable browser matches up more closely to dedicated analytics systems like Google Analytics.

Existing data collection and graphs are unchanged. Data collected via the new technique is available in a new 'experimental' report.
2024-04-25 11:00:01 +01:00
Joffrey JAFFEUX
52e8d57293
FEATURE: implements last read message for threads (#26702)
This commit will now allow us to track read position in a thread and returns to this position when you open the thread.

Note this commit is also extracting the following components to make it possible:
- `<ChatMessagesScroller />`
- `<ChatMessagesContainer />`

The `UpdateUserThreadLastRead` has been updated to allow this.

Various refactorings have also been done to the code and specs to improve the support of last read.
2024-04-25 10:47:54 +02:00