Commit Graph

53272 Commits

Author SHA1 Message Date
5c1147adf3 UX: Move top dismiss button from topics to d-navigation (#26032) 2024-03-05 15:43:07 -05:00
0c827980e6 FIX: do not show threads with no replies (#26033)
Prior to this fix if a user had started to reply to a message without actually sending a message, the thread would still be created and we would end up listing it in the threads list of a channel.

This commit also improves adds thread and thread_replies_count to the 4th parameter of the chat_message_created event.
2024-03-05 20:26:35 +01:00
f99687e10d UX: fix fontsize and weight for prioritize username setting (#26034) 2024-03-05 19:42:24 +01:00
bf02657dbf DEV: Add system test for soft loading topic search results (#25525)
Follow up to: https://github.com/discourse/discourse/pull/25504
2024-03-05 09:10:09 -07:00
6791eb1a94 Update translations (#26030) 2024-03-05 16:47:46 +01:00
6702babd5e DEV: More bulk select modal enhancements (#25979)
* Add cancel button

* Add loading spinner

* Add toast message
2024-03-05 08:30:26 -07:00
38ff1a38bd DEV: Improve uploads_importer script (#25971)
* Print instructions when the `sqlite3` gem can't be loaded
* Use `display_filename` instead of `filename` if available
* Support uploading for a multisite
2024-03-05 16:27:45 +01:00
ccf0b61fe3 DEV: Convert truth-helpers to a v2 addon and simplify imports (#26029)
No need for a build step here, since the helpers are all simple js.
2024-03-05 15:24:47 +00:00
180e6c6188 UX: chat message creator scss cleanup + design tweak to username display (#25928)
* UX: chat message creator scss cleanup + design tweak to username display

* add user status with live updates to modal

* show user status description in modal

* add tests for user status

* UX: add user-status styling to chat message creator


---------

Co-authored-by: David Battersby <info@davidbattersby.com>
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-03-05 12:49:29 +01:00
2f9db62e1c DEV: Skip babel for qunit and sinon (#26028)
Skipping babel for qunit is part of the default embroider blueprint. Adding these doesn't seem to have a measurable effect on build time, but it does stop this message from being printed in the build log:

```
The code generator has deoptimised the styling of /Users/david/discourse/discourse/node_modules/sinon/pkg/sinon-esm.js as it exceeds the max of 500KB
```
2024-03-05 11:34:51 +00:00
27407a25b4 FIX: correctly shows as disabled a user who can't chat (#26010)
Prior to this fix we were checking if user was not part of a group which allows to chat, but we were not checking if this user was part of groups who can use direct messages.
2024-03-05 09:13:42 +01:00
00e76efb7c FEATURE: site setting to include post in penalty messages (#26025)
Adds a site setting to include a post's content in penalty message.
When silencing/suspending a user from a post, or a reviewable with
a post, adds an option to include a post's content in the email
message by default.
2024-03-04 18:35:21 -08:00
28af4031ae FIX: active webhook types exclude inactive plugins (#26022)
Bug introduced when webhooks were granularized in this PR - c468110929

Only active webhooks should be available when webhooks is configured.

https://meta.discourse.org/t/i18n-keys-showing-on-webhooks-edit-page/297701
2024-03-05 12:47:04 +11:00
447ed2c06c Build(deps-dev): Bump rubocop-rspec from 2.27.0 to 2.27.1 (#26017)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.27.0 to 2.27.1.
- [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.27.0...v2.27.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  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-05 10:04:24 +11:00
ce3ff7d7f5 UX: always show image controls on touch devices (#26018) 2024-03-04 17:19:09 -05:00
40b707a690 FEATURE: Add onebox for loom (#26016)
Loom share links will now onebox and use the embedded loom player.
2024-03-04 15:12:08 -07:00
b788c08712 FEATURE: Introduce APIs for manipulating header icons (#25916) 2024-03-04 12:51:49 -07:00
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