Commit Graph

53355 Commits

Author SHA1 Message Date
405bfba3c0 DEV: Convert home-logo widget to a glimmer component (#25989)
Part of the larger effort to upgrade the header from widgets to glimmer components: https://github.com/discourse/discourse/pull/25214
2024-03-04 10:02:23 -07:00
04b0f40db8 DEV: Modifier for Chat::Mailer to skip summary email for users (#26011) 2024-03-04 09:21:02 -06:00
f7d7092a7a DEV: Update rubocop-discourse to latest version
The lastest version of rubocop-discourse enables rules regarding
plugins.
2024-03-04 15:08:35 +01:00
7a6ba47e7b DEV: quit session asap (#26009) 2024-03-04 11:50:13 +01:00
3be5daae37 DEV: skip flakey last read spec (#26008) 2024-03-04 11:35:49 +01:00
7036a4295d DEV: Fix migration that adds index to incoming_emails topic_id (#26007)
Why this change?

Follow up to f880f1a42ffc39cd65eeaf318682b166290fd1d4. When adding an
index concurrently where the database transaction is disabled, we have
to ensure that we drop the index first if it exists because an invalid
index can be created if the migration has failed before.
2024-03-04 16:52:20 +08:00
955339668b FIX: ThemeSettingsObjectValidator not allowing URL paths for string (#26005)
Why this change?

Prior this change, we were using `URI.regexp` which was too strict as it
doesn't allow a URL path.

What does this change do?

Just parse the string using `URI.parse` and if it doesn't raise an error
we consider the string to be a valid URL
2024-03-04 13:22:14 +08:00
f880f1a42f DEV: add topic_id index to incoming_emails table (#26004)
This table may grow to be large, and an index on this column improves
performance for SELECT queries.
2024-03-04 13:50:01 +10:00
718a91c297 UX: Site setting descriptions initial pass (#25829)
This commit changes the wording of the 50 site settings that
previously had the shortest descriptions (e.g. City for Disputes
was described as City for Disputes...) using AI-generated and then
human curated descriptions based on the Forum Helper persona
on Discourse Meta.

In future we may want to do more of these, this is only a first pass.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2024-03-04 13:48:39 +10:00
eca10e56b8 FEATURE: Allow specific groups to view raw email (#26003)
When a post is created by an incoming email, we show
an envelope icon on it which then opens a modal with the
raw email contents. Previously this was staff (admin+mod)
only, but now this commit adds the `view_raw_email_allowed_groups`
site setting, so any group can be added to give users permission
to see this.
2024-03-04 13:48:16 +10:00
fef52c2ab7 DEV: Delete old enable_bookmarks_with_reminders setting (#25982)
This setting has not been used for a long time, get rid
of it and also update the historical migration to not
rely on the SiteSetting model.
2024-03-04 13:48:04 +10:00
1a76c4e099 DEV: convert PrivateMessageMap widget to glimmer components (#25837)
* DEV: add map system test for private message map
* DEV: convert PrivateMessageMap to glimmer components
2024-03-04 10:24:25 +08:00
13230ae4c2 Build(deps): Bump json_schemer from 2.1.1 to 2.2.0 (#25998)
Bumps [json_schemer](https://github.com/davishmcclurg/json_schemer) from 2.1.1 to 2.2.0.
- [Changelog](https://github.com/davishmcclurg/json_schemer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/davishmcclurg/json_schemer/compare/v2.1.1...v2.2.0)

---
updated-dependencies:
- dependency-name: json_schemer
  dependency-type: direct:production
  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-03-04 09:05:22 +08:00
5a1892479b Build(deps-dev): Bump rubocop-rspec from 2.26.1 to 2.27.0 (#25999)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.26.1 to 2.27.0.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.26.1...v2.27.0)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  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-03-04 09:05:03 +08:00
1e7525e818 Build(deps-dev): Bump rubocop-ast from 1.31.0 to 1.31.1 (#26000)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.31.0 to 1.31.1.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.31.0...v1.31.1)

---
updated-dependencies:
- dependency-name: rubocop-ast
  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-03-04 09:04:18 +08:00
70748cf276 Build(deps-dev): Bump xss from 1.0.14 to 1.0.15 (#26001)
Bumps [xss](https://github.com/leizongmin/js-xss) from 1.0.14 to 1.0.15.
- [Changelog](https://github.com/leizongmin/js-xss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/leizongmin/js-xss/compare/v1.0.14...v1.0.15)

---
updated-dependencies:
- dependency-name: xss
  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-03-04 09:04:07 +08:00
41f78b31a9 FIX: down downgrade trust level if all requirements are met. (#25953)
Currently, the trust level method  is calculating trust level based on maximum value from:
- locked trust level
- group automatic trust level
- previously granted trust level by admin

https://github.com/discourse/discourse/blob/main/lib/trust_level.rb#L33

Let's say the user belongs to groups with automatic trust level 1 and in the meantime meets all criteria to get trust level 2.

Each time, a user is removed from a group with automatic trust_level 1, they will be downgraded to trust_level 1 and promoted to trust_level 2

120a2f70a9/lib/promotion.rb (L142)

This will cause duplicated promotion messages.

Therefore, we have to check if the user meets the criteria, before downgrading.
2024-03-04 09:30:30 +11:00
b5199eac80 Update a typographer markdown settings text on server.en.yml (#25996)
Remove (c) from enable_markdown_typographer_settings text
2024-03-03 02:48:44 -08:00
e408f4ff95 DEV: remove various unused CSS (#25994) 2024-03-01 16:51:26 -05:00
653b2e4678 DEV: remove unneeded buttons mobile CSS (#25992) 2024-03-01 16:42:02 -05:00
9421997866 DEV: remove old bootstrap alert CSS (#25991) 2024-03-01 16:03:34 -05:00
84882ad25f UX: disable the image preview controls while invisible (#25990) 2024-03-01 15:06:43 -05:00
0f32e496bc Build(deps-dev): Bump yard from 0.9.35 to 0.9.36 (#25988)
Bumps [yard](https://github.com/lsegal/yard) from 0.9.35 to 0.9.36.
- [Release notes](https://github.com/lsegal/yard/releases)
- [Changelog](https://github.com/lsegal/yard/blob/main/CHANGELOG.md)
- [Commits](https://github.com/lsegal/yard/compare/v0.9.35...v0.9.36)

---
updated-dependencies:
- dependency-name: yard
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-01 20:15:22 +01:00
5fcb7c262d FIX: prevents duplicate attachments in incoming emails (#25986)
## What?

Depending on the email software used, when you reply to an email that has some attachments, they will be sent along, since they're part of the embedded (replied to) email.

When Discourse processes the reply as an incoming email, it will automatically add all the (valid) attachments at the end of the post. Including those that were sent as part of the "embedded reply".

This generates posts in Discourse with duplicate attachments 🙁

## How?

When processing attachments of an incoming email, before we add it to the bottom of the post, we check it against all the previous uploads in the same topic. If there already is an `Upload` record, it means that it's a duplicate and it is _therefore_ skipped.

All the inline attachments are left untouched since they're more likely new attachments added by the sender.
2024-03-01 18:38:49 +01:00
ccf0fdaa81 UX: improve group email setting wrap, cleanup styles (#25985) 2024-03-01 12:34:55 -05:00
5dc95eaacc DEV: Update ExpandingTextArea component (#25890) 2024-03-01 17:20:15 +01:00
3200e276b7 DEV: attempts to fix flakey spec (#25984) 2024-03-01 10:08:24 +01:00
0b60086ff8 DEV: Hide min_trust_level_to_allow_profile_background setting (#25980)
Followup to a57280cb175c6352c64bf8d7b3330b477222af4d,
it was an oversight
2024-03-01 13:32:19 +10:00
29458c436c FIX: return missing href attribute for topic map participants avatars (#25981) 2024-03-01 11:14:57 +08:00
6bcbe56116 DEV: Use freeze_time_safe in more places (#25949)
Followup to 120a2f70a9ea3b08a39fc1fbb251f59ecf968cde,
uses new method to avoid time-based spec flakiness
2024-03-01 10:07:35 +10:00
8503d3afe1 UX: improve advanced search wrapping, remove mobile stylesheet (#25975) 2024-02-29 18:07:18 -05:00
2d890d73a2 FEATURE: Add recover api scopes (#25978)
This commit adds two new api scopes. One for recovering topics, and the
other for recovering posts.
2024-02-29 15:49:29 -07:00
0b778697ff FIX: instantly removes group message when leaving (#25961)
Prior to this fix clicking <kbd>x</kdb> on a channel row would effectively leave the channel on server side, but it wouldn't disappear from the screen before a page refresh.
2024-02-29 23:49:01 +01:00
40eea40d69 UX: clean up tag info styles, remove mobile stylesheet (#25973) 2024-02-29 17:48:47 -05:00
721fa86b24 Build(deps): Bump actionview_precompiler from 0.3.0 to 0.4.0 (#25977)
Bumps [actionview_precompiler](https://github.com/jhawthorn/actionview_precompiler) from 0.3.0 to 0.4.0.
- [Commits](https://github.com/jhawthorn/actionview_precompiler/compare/v0.3.0...v0.4.0)

---
updated-dependencies:
- dependency-name: actionview_precompiler
  dependency-type: direct:production
  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-02-29 23:34:00 +01:00
1e666ddfd7 Build(deps-dev): Bump express from 4.18.2 to 4.18.3 (#25974)
Bumps [express](https://github.com/expressjs/express) from 4.18.2 to 4.18.3.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.18.2...4.18.3)

---
updated-dependencies:
- dependency-name: express
  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-02-29 22:53:08 +01:00
db2f5ae51b UX: simplify styles for image uploader (#25970) 2024-02-29 14:39:00 -05:00
47b8e98cf7 UX: enable badge title on mobile, style cleanup (#25968) 2024-02-29 13:55:13 -05:00
6847ed5be6 FIX: import:rebake_uncooked_* jobs couldn't be run in parallel (#25969)
If those jobs were started multiple times each process would have rebaked the same posts.
2024-02-29 19:54:19 +01:00
841b353d38 DEV: Close user menu after clicking view-all notifications (#25966)
We needed to call closeUserMenu after navigating to the show all notifications url.
2024-02-29 11:52:51 -07:00
6c2c690479 DEV: Add push notification filtering to MessageBus alerts (#25965) 2024-02-29 12:49:46 -06:00
f0baa0ddfe DEV: Prefer defer_get_set over get/set on DistributedCache (#25967) 2024-02-29 11:10:24 -06:00
7aa3e15440 DEV: Deprecate FoundUserWithStatusSerializer (#25883)
A followup to b3a11994.
2024-02-29 20:20:48 +04:00
0a58b18970 DEV: Move DiscourseEvent trigger in PostAlerter#push_notification (#25931) 2024-02-29 08:33:38 -06:00
03de0421af DEV: Convert share-source to gjs (#25964) 2024-02-29 15:12:17 +01:00
f087234ff7 Build(deps-dev): Bump rubocop from 1.60.2 to 1.61.0 (#25958)
* Build(deps-dev): Bump rubocop from 1.60.2 to 1.61.0

Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.60.2 to 1.61.0.
- [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.60.2...v1.61.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  update-type: version-update:semver-minor
...

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

* fix the issue

---------

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-02-29 14:09:49 +01:00
11400bca1a DEV: attempts to make last spec non flakey (#25962) 2024-02-29 13:15:00 +01:00
7043512b8d Build(deps): Bump jwt from 2.8.0 to 2.8.1 (#25959)
Bumps [jwt](https://github.com/jwt/ruby-jwt) from 2.8.0 to 2.8.1.
- [Release notes](https://github.com/jwt/ruby-jwt/releases)
- [Changelog](https://github.com/jwt/ruby-jwt/blob/main/CHANGELOG.md)
- [Commits](https://github.com/jwt/ruby-jwt/compare/v2.8.0...v2.8.1)

---
updated-dependencies:
- dependency-name: jwt
  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-02-29 13:03:38 +01:00
25bba3fbda Build(deps-dev): Bump rubocop-ast from 1.30.0 to 1.31.0 (#25960)
Bumps [rubocop-ast](https://github.com/rubocop/rubocop-ast) from 1.30.0 to 1.31.0.
- [Release notes](https://github.com/rubocop/rubocop-ast/releases)
- [Changelog](https://github.com/rubocop/rubocop-ast/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-ast/compare/v1.30.0...v1.31.0)

---
updated-dependencies:
- dependency-name: rubocop-ast
  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-02-29 12:58:18 +01:00
e74a9efee1 FIX: Show "no category" in category-chooser (#25917)
CategoryChooser component usually displays just categories, but
sometimes it can show two none values: a "no category" or Uncategorized.
This commit makes sure that these are rendered correctly.

The problem was that the "none" item was automatically inserted in the
list of options, but that should not always happen. Toggling option
`autoInsertNoneItem` requires setting `none` too.
2024-02-29 13:48:20 +02:00