Commit Graph

51063 Commits

Author SHA1 Message Date
jbrw
909620db18
FIX: Allow pending posts to have empty titles (#23366)
It's possible for a pending post to have a nil title. The PendingPostSerializer should not throw an error when this is encountered.
2023-09-01 12:43:25 -04:00
Mark VanLandingham
9c65e2140a
DEV: Use Notice API for mention warnings (#23238)
This PR swaps out the custom pathway to publishing and rendering mention warnings after a message is sent.

ChatPublisher#publish_notice is used, and expanded. Now, instead of only accepting text_content as an argument, component and component_args are accepted and there is a renderer for these components.

Translations moved to server, as notices expect text to be passed in unless a component is rendered

The warnings are rendered at the top now, outside of the scope of the single message that sent it.

I entirely removed the jit_messages_spec b/c it's duplicate testing of other parts of the app. IMO we don't need a backend test for a feature, a component test for the feature AND a system test (that is slow and potentially even flakey due to timing issues with wait) to test the same thing. So jit_messages_spec is gone.
2023-09-01 09:07:23 -05:00
Joffrey JAFFEUX
ed35ae4dcd
FIX: closes chat emoji picker on body scroll (#23362)
Prior to this fix we would scroll the emoji picker with the body of the page in drawer mode.

With this fix scrolling inside the drawer or the emoji picker will scroll the drawer or the emoji picker, but, scrolling body will close the chat emoji picker.
2023-09-01 09:17:48 +02:00
Martin Brennan
5cb45f8714
DEV: Add email fixture (#23364)
For use with discourse-automation feature
2023-09-01 16:29:47 +10:00
PangBo
d79ff4f810
FIX: Pop up dialog correctly when fail to delete a user (#20645) 2023-09-01 12:13:18 +10:00
Keegan George
d7d3bc758e
DEV: Add plugin outlets for after category/tag inputs in composer (#23363) 2023-09-01 12:08:48 +10:00
Blake Erickson
be32f580ad
DEV: Delete unused site settings (#23353)
In a previous commit these site settings were removed from the codebase
because they were identified as unused settings. This commit removes
these settings from the db in case they existed in the site settings
table.

Follow up to: da389d7844
2023-08-31 18:19:55 -06:00
Jordan Vidrine
72f33d1d5d
FIX: Chat message button radius (#23358) 2023-08-31 15:00:39 -05:00
Renato Atilio
3eef3dc88e
FIX: form template cooked heading from label (#23359) 2023-08-31 16:58:09 -03:00
Joffrey JAFFEUX
f1d8cd529e
Revert "Revert "PERF: Cache each theme field value once (#23192)" (#23354)" (#23356)
This reverts commit 9821ca9413.
2023-08-31 14:12:03 -05:00
marstall
d3c9bb69a1
FIX: wrap tag description in a span tag (#23357) 2023-08-31 15:07:20 -04:00
Joffrey JAFFEUX
24d46fd981
Revert "DEV: Improve strategy for identifying ember-cli JS chunks (#23336)" (#23355)
This reverts commit 2c58d456dd.
2023-08-31 19:28:48 +02:00
Joffrey JAFFEUX
9821ca9413
Revert "PERF: Cache each theme field value once (#23192)" (#23354)
This reverts commit 82a56334a3.
2023-08-31 19:04:43 +02:00
Daniel Waterworth
82a56334a3
PERF: Cache each theme field value once (#23192)
Previously, theme fields from components would be cached for each of
their parent themes.
2023-08-31 11:24:02 -05:00
chapoi
c9c2a73441
UX: thread list design changes (#23348) 2023-08-31 18:09:41 +02:00
Jarek Radosz
dac4f97032
DEV: Convert reviewable-bundled-action to gjs (#23320) 2023-08-31 16:59:19 +02:00
Jarek Radosz
06a9963cbb
DEV: Don't fetch tagNotifications when additional tags are present (#23351)
We don't display them, see: 006a5166e5/app/assets/javascripts/discourse/app/components/d-navigation.js (L55-L55)
2023-08-31 16:40:33 +02:00
Penar Musaraj
006a5166e5
DEV: Refactor rp_id and rp_name (#23339)
They're both constant per-instance values, there is no need to store them
in the session. This also makes the code a bit more readable by moving
the `session_challenge_key` method up to the `DiscourseWebauthn` module.
2023-08-31 09:11:23 -04:00
Alan Guo Xiang Tan
5724b7bccd
DEV: Add hidden cross_origin_opener_policy_header site setting (#23346)
Why this change?

As part of our ongoing efforts to security harden the Discourse
application, we are adding the `cross_origin_opener_policy_header` site setting
which allows the `Cross-Origin-Opener-Policy` response header to be set on requests
that preloads the Discourse application. In more technical terms, only
GET requests that are not json or xhr will have the response header set.

The `cross_origin_opener_policy_header` site setting is hidden for now
for testing purposes and will either be released as a public site
setting or be remove if we decide to be opinionated and ship a default
for the `Cross-Origin-Opener-Policy` response header.
2023-08-31 08:50:06 -04:00
Joffrey JAFFEUX
d4322a69db
UX: hides original message user in thread participants (#23350)
Usage:

```hbs
<Chat::Thread::Participants
  @thread={{@thread}}
  @includeOriginalMessageUser={{false}}
/>
```
2023-08-31 14:46:37 +02:00
Jarek Radosz
6bd66438d8
FIX: Add missing props to move-to-topic (#23349)
Fixes tagging topics in that modal.
2023-08-31 14:18:57 +02:00
dependabot[bot]
6588814bac
Build(deps): Bump rotp from 6.2.2 to 6.3.0 (#23343)
Bumps [rotp](https://github.com/mdp/rotp) from 6.2.2 to 6.3.0.
- [Release notes](https://github.com/mdp/rotp/releases)
- [Changelog](https://github.com/mdp/rotp/blob/main/CHANGELOG.md)
- [Commits](https://github.com/mdp/rotp/compare/v6.2.2...v6.3.0)

---
updated-dependencies:
- dependency-name: rotp
  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>
2023-08-31 11:55:04 +02:00
Jarek Radosz
1c87bb7fe9
DEV: Update DButton uses (#23333)
1. Use `this.` instead of `{{action}}` where applicable
2. Use `{{fn}}` instead of `@actionParam` where applicable
3. Use non-`@` versions of class/type/tabindex/aria-controls/aria-expanded
4. Remove `btn` class (it's added automatically to all DButtons)
5. Remove `type="button"` (it's the default)
6. Use `concat-class` helper
2023-08-31 11:49:35 +02:00
Loïc Guitaut
e1ae32103d DEV: Refactor chat specs related to message creation
This is extracted from #22390.

This patch aims to ease the transition to the new message creation
service. (in progress in #22390) Indeed, the new service patch is
breaking some specs from `discourse-ai` and `discourse-templates`
because these plugins are using either `Chat::MessageCreator` or the
`chat_message` fabricator.

This patch addresses theses issues by normalizing how we create a chat
message in specs. To do so, the preferred way is to use
`Fabricate(:chat_message)` with a new `:use_service` option allowing to
call the service under the hood. While this patch will obviously call
`Chat::MessageCreator`, the new service patch will now be able to simply
change the call to `Chat::CreateMessage` without breaking any specs from
other plugins.

Another thing this patch does is to not create chat messages using the
service for specs that aren’t system ones, thus speeding the execution
time a bit in the process.
2023-08-31 11:21:23 +02:00
Martin Brennan
253d4a154c
FIX: Confusing vague upload error (#23347)
When an upload fails and we don't have a specific error, we
show a generic one. But it's a little too generic -- it doesn't
even include the file name.

This commit shows the file name so you at least know which of your
uploads failed.
2023-08-31 18:02:00 +10:00
Vinoth Kannan
5a810fd6cc
UX: display warning message when uploads are not included in backup. (#23253)
Also, this PR will introduce a new checkbox in the modal window to manage whether the uploads should be included in the backup or not.
2023-08-31 10:21:07 +05:30
Martin Brennan
8ef569cda4
UX: Remove Plugin Settings tab (#23345)
This tab doesn't really provide anything useful, and can be quite
confusing in some cases. Each plugin is already listed below, and
you can navigate to their settings from there. We want to move away
from the catch-all Plugins category for site settings. Core plugins are
not shown in this list as at 97a812f022.
2023-08-31 12:11:39 +10:00
Meghna
2cd2d7d4d6
FIX: add mobile specific stylesheet for onebox (#23329) 2023-08-31 10:35:28 +10:00
Martin Brennan
97a812f022
FIX: Hide core plugins from the admin Plugins list (#23328)
Most of the core plugins were already hidden, this hides
chat, styleguide, and checklist to avoid potential confusion
for end users.

Also removes respond_to? :hide_plugin, since that API has been
in place for a while now.
2023-08-31 10:01:01 +10:00
Martin Brennan
c5d6e8cd23
Revert "FIX: Remove chat "enable chat plugin text" (#23327)" (#23344)
This reverts commit 7f5c3d4e9a,
the setting text is not localized so we do need the label
even if it is redundant.
2023-08-31 09:59:51 +10:00
Kris
556e59580e
DEV: add plugin outlet to mobile login (#23341) 2023-08-30 17:36:47 -04:00
Kris
6b375440f5
DEV: add plugin outlets to create/login (#23340) 2023-08-30 15:58:22 -04:00
David Taylor
2c58d456dd
DEV: Improve strategy for identifying ember-cli JS chunks (#23336)
Our Ember build compiles assets into multiple chunks. In the past, we used the output from `ember-auto-import-chunks-json-generator` to give Rails a map of those chunks. However, that addon is specific to ember-auto-import, and is not compatible with Embroider.

Instead, we can switch to parsing the html files which are output by ember-cli. These are guaranteed to have the correct JS files in the correct place. A `<discourse-chunked-script>` will allow us to easily identify which chunks belong to which entrypoint.

In future, as we update more entrypoints to be compiled by Embroider/Webpack, we can easily introduce new wrappers.
2023-08-30 18:47:06 +01:00
chapoi
a97dcd8564
UX: composer fixes (#23334)
* UX: fix disappearing separator

* UX: slightly smaller composer btns on non-mobile
2023-08-30 15:10:21 +02:00
Jarek Radosz
7b78895930
DEV: Group babel updates together (#23322)
Grouped Dependabot updates are now available (https://github.blog/changelog/2023-08-24-grouped-version-updates-for-dependabot-are-generally-available/) so we can finally make it create a single PR for both `@babel/core` and `@babel/standalone` 😌
2023-08-30 10:38:26 +02:00
Jarek Radosz
f6cd8e5968
DEV: Remove redundant braces (#23321) 2023-08-30 10:37:03 +02:00
Martin Brennan
2965519c76
DEV: Add auto _map extensions for list site settings with no type (#23331)
Followup to eea74e0e32. Site settings
which are a list without a list_type should also have the _map
extension added which returns an array based on split("|").

For example:

```
SiteSetting.post_menu_map
=> ["read", "like"]
```
2023-08-30 16:14:06 +10:00
Ted Johansson
d3a5156e66
DEV: Move 'ignore and delete' action under 'ignore' menu for chat flags (#23304)
This moves the "delete message" action (if it is available) of a flagged chat message under the "ignore" menu. This puts it on par with the menu for flagged posts.
2023-08-30 10:51:32 +08:00
dependabot[bot]
4f830d7561
Build(deps): Bump @uppy/utils in /app/assets/javascripts (#22767)
Bumps [@uppy/utils](https://github.com/transloadit/uppy) from 5.4.0 to 5.4.3.
- [Release notes](https://github.com/transloadit/uppy/releases)
- [Changelog](https://github.com/transloadit/uppy/blob/main/CHANGELOG.md)
- [Commits](https://github.com/transloadit/uppy/compare/@uppy/utils@5.4.0...@uppy/utils@5.4.3)

---
updated-dependencies:
- dependency-name: "@uppy/utils"
  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>
2023-08-30 12:50:46 +10:00
Martin Brennan
7f5c3d4e9a
FIX: Remove chat "enable chat plugin text" (#23327)
This text is repetitive and also a little confusing
to end users, since it doesn't really matter that
chat is a plugin, since it is in core.
2023-08-30 12:17:01 +10:00
Martin Brennan
bbd908ae09
FIX: Add hashtag placeholder when chat message sent (#23287)
This commit fixes an issue from 2ecc8291e8
where the user sees an ugly plain #hashtag when sending a chat
message. Now, we add a basic placeholder that looks like the
cooked hashtag with a grey square, which is then filled in
once the "sent" message bus event for the message comes back,
and we do decorateCooked on the message to fill in the proper
hashtag details.
2023-08-30 11:31:34 +10:00
dependabot[bot]
875a817410
Build(deps): Bump css_parser from 1.14.0 to 1.15.0 (#23323)
Bumps [css_parser](https://github.com/premailer/css_parser) from 1.14.0 to 1.15.0.
- [Changelog](https://github.com/premailer/css_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/premailer/css_parser/compare/v1.14.0...v1.15.0)

---
updated-dependencies:
- dependency-name: css_parser
  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>
2023-08-30 01:56:34 +02:00
Blake Erickson
da389d7844
DEV: Remove unused site settings (#23326)
According to the output of this rake task:

`LOAD_PLUGINS=0 bin/rails "site_settings:find_dead"`

which searches for unused site settings, these settings:

```
rate_limit_new_user_create_topic
enable_system_avatars
check_for_new_features
allow_user_api_keys
```

are unused.
2023-08-29 17:42:32 -06:00
dependabot[bot]
ab3e622a45
Build(deps-dev): Bump rubocop from 1.56.1 to 1.56.2 (#23325)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.56.1 to 1.56.2.
- [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.56.1...v1.56.2)

---
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>
2023-08-30 01:36:13 +02:00
dependabot[bot]
79b2eb238f
Build(deps-dev): Bump webmock from 3.19.0 to 3.19.1 (#23324)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.19.0 to 3.19.1.
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.19.0...v3.19.1)

---
updated-dependencies:
- dependency-name: webmock
  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>
2023-08-30 01:34:49 +02:00
dependabot[bot]
f97aef4b27
Build(deps-dev): Bump terser in /app/assets/javascripts (#23319)
Bumps [terser](https://github.com/terser/terser) from 5.19.2 to 5.19.3.
- [Changelog](https://github.com/terser/terser/blob/v5.19.3/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.2...v5.19.3)

---
updated-dependencies:
- dependency-name: terser
  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>
2023-08-30 00:35:57 +02:00
Renato Atilio
58b49bce41
FEATURE: support to initial values for form templates through /new-topic (#23313)
* FEATURE: adds support for initial values through /new-topic to form templates
2023-08-29 18:41:33 -03:00
Kris
8dddc9eb39
DEV: remove broken margin removal (#23318) 2023-08-29 17:11:38 -04:00
Renato Atilio
f49389309a
FIX: no form template logic when editing posts (#23317) 2023-08-29 16:07:33 -03:00
Isaac Janzen
6650aa18f5
DEV: Convert move-to-topic modal to component-based API (#23293)
<img width="654" alt="Screenshot 2023-08-28 at 2 49 04 PM" src="https://github.com/discourse/discourse/assets/50783505/5fc4dfb5-a7da-4a2b-a524-e81b5039efe6">
<img width="745" alt="Screenshot 2023-08-28 at 2 48 47 PM" src="https://github.com/discourse/discourse/assets/50783505/4432338e-ba05-4206-8553-eb69f8b31b4f">
<img width="448" alt="Screenshot 2023-08-28 at 2 48 44 PM" src="https://github.com/discourse/discourse/assets/50783505/6d6c305d-396b-488a-9ee9-bc41773dd98b">
<img width="747" alt="Screenshot 2023-08-28 at 2 48 42 PM" src="https://github.com/discourse/discourse/assets/50783505/9279f591-ca4a-4152-81c5-71d79dbcbc10">
<img width="671" alt="Screenshot 2023-08-28 at 2 40 42 PM" src="https://github.com/discourse/discourse/assets/50783505/dea02b8b-cf87-45bb-8466-449367b5609a">
<img width="643" alt="Screenshot 2023-08-28 at 2 40 37 PM" src="https://github.com/discourse/discourse/assets/50783505/e422b9b0-89b5-4681-91db-89b8eee05872">
2023-08-29 13:50:13 -05:00