Commit Graph

52060 Commits

Author SHA1 Message Date
1df1a9490d UX: fix sidebar modal (#24646)
* UX: fix modal width
2023-12-04 08:10:17 +01:00
adb75cf3a9 DEV: Delete redundant bookmark test (#24680)
Cases were identical and also already covered on L63
2023-12-04 12:27:35 +10:00
74011232e9 FIX: Request html when fetching inline onebox data (#24674)
We do expect to receive html
2023-12-04 11:36:42 +10:00
eada155dcd DOCS: Update INSTALL-email to point to Brevo correctly
Brevo changed their DNS Names
2023-12-04 11:46:33 +11:00
d9ac0c33ff FIX: update tag description field placeholder (#24644)
Improvements after  https://github.com/discourse/discourse/pull/24561

1. Make placeholder more descriptive
2. Respect new line breaks in description
2023-12-04 09:38:20 +11:00
56795f5c07 UX: improve btn-transparent styling (#24666) 2023-12-02 14:21:22 +11:00
aba3acf4cc DEV: Correct deprecation id for discovery-controller-shims (#24671) 2023-12-01 19:11:48 +00:00
fb06cd6712 DEV: Add JS API to adjust desktop topic timeline min/max height (#24669) 2023-12-01 10:29:12 -06:00
d636ff216a DEV: Resolve transitionTo deprecation in chat-channel route (#24668) 2023-12-01 16:01:59 +00:00
9f9c82ea97 DEV: Only add ember-global deprecation for Ember 3 (#24667)
(otherwise, we're accidentally extending support into Ember 5!)

Followup to 106c1c317f70c80f968038f0c770ac1d9d480927
2023-12-01 14:50:15 +00:00
f8bf4bda00 UX: fix info text color on custom field for login (#24665) 2023-12-01 14:41:44 +01:00
106c1c317f DEV: Restore ember-global deprecation in production (#24664)
Even with our patch to the deprecate() macro, this is optimized out of the production build because it's wrapped in an `if(DEBUG)` statement. (https://github.com/davidtaylorhq/ember.js/blob/14c02f53b8/packages/%40ember/-internals/bootstrap/index.ts#L19-L19)
2023-12-01 13:07:57 +00:00
ecf7a4f0c6 FIX: Ensure app-cdn CORS is not overridden by cors_origin setting (#24661)
We add `Access-Control-Allow-Origin: *` to all asset requests which are requested via a configured CDN. This is particularly important now that we're using browser-native `import()` to load the highlightjs bundle. Unfortunately, user-configurable 'cors_origins' site setting was overriding the wldcard value on CDN assets and causing CORS errors.

This commit updates the logic to give the `*` value precedence, and adds a spec for the situation. It also invalidates the cache of hljs assets (because CDNs will have cached the bad Access-Control-Allow-Origin header).

The rack-cors middleware is also slightly tweaked so that it is always inserted. This makes things easier to test and more consistent.
2023-12-01 12:57:11 +00:00
b72a177fb3 DEV: Exclude deprecation-collector plugin from source identifier (#24662) 2023-12-01 12:21:19 +00:00
4df672a541 Build(deps-dev): Bump jsdom from 23.0.0 to 23.0.1 in /app/assets/javascripts (#24657)
* Build(deps-dev): Bump jsdom in /app/assets/javascripts

Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/23.0.0...23.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-12-01 11:11:16 +01:00
54e813e964 FIX: Don't error out when trying to retrieve title and URL won't encode (#24660) 2023-12-01 15:03:06 +08:00
aadc104817 FIX: Flashing when loading glimer search results (#24658) 2023-11-30 20:54:32 -07:00
7539b457b2 DEV: Add forceDropdownForMenuPanels to plugin api (#24655) 2023-11-30 15:26:13 -07:00
5123ff96cf Update INSTALL-email.md (#24481)
added a gdpr compliant smtp provider
2023-11-30 16:19:01 -05:00
ca296c4926 Fix typos (#24656)
@discourse-translator-bot keep_translations
2023-11-30 22:13:28 +01:00
d2b53ccac2 DEV: Port discourse-table-builder theme component to core (#24441) 2023-11-30 10:54:29 -08:00
bcca1692c6 FIX: disables tooltip on desktop message menu’s reaction (#24650) 2023-11-30 19:41:28 +01:00
a7a7d8e41e DEV: correctly uses link to message endpoint in spec (#24652)
- correctly uses link to message endpoint in spec
- correctly uses "chat with"
2023-11-30 19:33:41 +01:00
4fa1b0e978 FIX: show leave channel notice only on group channels (#24653) 2023-11-30 19:24:14 +01:00
a1ae9f6ab0 FIX: correctly show "chat with" and not "chat in" for users (#24651)
Prior to this fix direct message would always show "Chat in ..." when hovering the channel even if you were hovering a direct message channel with another user (or yourself).

We will now correctly show:

- `Chat in ...` for group channels
- `Chat with ...` for direct message channels
2023-11-30 19:02:19 +01:00
9fb4175008 UX: make summary 100% height (#24649) 2023-11-30 12:29:26 +01:00
a1690e0401 DEV: removes dead code (message_link) (#24648)
Linking to a message ID is now handled by the frontend router: `chat.channel.near-message`
2023-11-30 11:13:37 +01:00
0b65aa8b77 DEV: ensures we have error message before message check (#24647)
Previously the spec could be flakey as the long message could show on the screen while we await for processing. Now we will first check to have the error message on screen, at this point the erroneous message should never be visible.
2023-11-30 10:55:05 +01:00
1b022457ad UX: chat leave info (#24645)
* UX: add info-warning to leave button

* Scope to groupchat

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-11-30 10:13:37 +01:00
91ab2766e9 UX: properly align close button icon on composer messages (#24632) 2023-11-30 13:21:50 +05:30
dc8a727b3f COPY: secure media -> secure uploads (#24643)
Fixing up the last few holdouts
2023-11-30 14:58:55 +10:00
b00dbaa6c9 DEV: Remove flaky spec (#24641) 2023-11-30 11:06:27 +08:00
7e013b2120 DEV: add recurrence rule parameter to downloadCalendar API (#24404)
Add option to create recurrent calendar events. Recurrence rule parameter follows rfc5545 specification: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
2023-11-30 13:56:22 +11:00
50bafd48cd FIX: Flaky spec due to incorrect Rack response body (#24640)
Why was the problem?

ActiveRecord's query cache for the connection pool wasn't disabled after the
`with a fake provider runs 'other_phase' for enabled auth methods` test
in `omniauth_callbacks_controller_spec.rb` was run. This was because the
Rack response body in `FakeAuthenticator::Strategy::other_phase` did not
adhere to the expected Rack body format which is "typically an Array of
String instances". Because this expectation was broken, it cascaded the
problem down where it resulted in the ActiveRecord's query cache for the
connection pool not being disabled as it normally should when the
response body is closed.

When the query cache is left enabled, common assertions pattern in RSpec
like `expect { something }.to change { Group.count }` will fail since
the query cache is enabled and the call first call to `Group.count` will
cache the result to be reused later on.

To see the bug in action, one can run the following command:

`bundle exec rspec --seed 44747
spec/requests/omniauth_callbacks_controller_spec.rb:1150
spec/models/group_spec.rb:283`
2023-11-30 10:49:55 +08:00
c58cd697d2 FIX: Further improvements for plugin list (#24622)
Followup e37fb3042d6f56a27a01614e57bc7029f472b0c9

* Automatically remove the prefix `Discourse ` from all the plugin titles to avoid repetition
* Remove the :discourse_dev: icon from the author. Consider a "By Discourse" with no labels as official
* We add a `label` metadata to plugin.rb
  * Only plugins made by us in `discourse` and `discourse-org` GitHub organizations will show these in the list
* Make the plugin author font size a little smaller
* Make the commit sha look like a link so it's more obvious it goes to the code

Also I added some validation and truncation for plugin metadata
parsing since currently you can put absolutely anything in there
and it will show on the plugin list.
2023-11-30 10:53:17 +10:00
bcb7e86c24 DEV: Update stale-pr-closer configuration (#24626) 2023-11-30 00:08:36 +00:00
e30678ae14 Build(deps): Bump net-imap from 0.4.6 to 0.4.7 (#24638)
Bumps [net-imap](https://github.com/ruby/net-imap) from 0.4.6 to 0.4.7.
- [Release notes](https://github.com/ruby/net-imap/releases)
- [Commits](https://github.com/ruby/net-imap/compare/v0.4.6...v0.4.7)

---
updated-dependencies:
- dependency-name: net-imap
  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-11-29 23:26:55 +01:00
f90fab3628 Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#24637)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.23.3 to 7.23.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.5/packages/babel-core)

Updates `@babel/standalone` from 7.23.4 to 7.23.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.5/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-11-29 22:29:41 +01:00
434ae5bbe7 FIX: Allow setting an array custom field to a singleton value (#24636)
Also, validation happens per item in an array field.
2023-11-29 14:18:47 -06:00
eef93ac926 DEV: Allow setting max_length for field types using the plugin API (#24635) 2023-11-29 14:17:12 -06:00
384a8b17a1 FIX: leaving a group channel should destroy membership (#24631)
In other kind of channels we will only unfollow but for group channels we don't want people to keep appearing in members list.

This commit also creates appropriate services:
- `Chat::LeaveChannel`
- `Chat::UnfollowChannel`

And dedicated endpoint for unfollow: `DELETE /chat/api/channels/:id/memberships/me/follows`
2023-11-29 17:48:14 +01:00
11636f8736 DEV: Add missing html-safe on search result blurb (#24633) 2023-11-29 09:05:10 -07:00
c4767158df DEV: Move desktop notifications logic to service (#24466) 2023-11-29 08:20:48 -06:00
8cf13977a1 DEV: Fix or disable various lint rules (#24630)
A grab bag of smaller issues (constructor-super, no-fallthrough, ember/no-private-routing-service, no-unreachable, no-async-promise-executor)
2023-11-29 15:14:53 +01:00
7cac167928 DEV: Fix "ember/no-empty-glimmer-component-classes" lint (#24629) 2023-11-29 15:14:30 +01:00
0f7e4d2eaa DEV: Convert input-tip to gjs (#24624) 2023-11-29 13:00:36 +01:00
265a8cd2b2 DEV: Fixup plugin initialization guard (#24628)
In development, I sometimes get `nil` `location.absolute_path` values. It looks like this is sometimes expected (https://bugs.ruby-lang.org/issues/10561) so we should fallback to `.path` and add a nil check.
2023-11-29 11:44:09 +00:00
1881ae50be FIX: category-selector for top level categories (#24627)
The filter for top-level categories by using parent_category_id = -1 is
only implemented by the new search API.

Follow up to commit dbb8b66a378ec84a794510fcdcdc2ff9131c6aa3.
2023-11-29 13:29:18 +02:00
d38360b23f DEV: Fix ember/no-private-routing-service (#24009) 2023-11-29 12:26:52 +01:00
cbe772f6fa DEV: Fix router linting errors (#24012)
`ember/no-unnecessary-route-path-option`
`ember/routes-segments-snake-case`
2023-11-29 12:26:31 +01:00