Commit Graph

45690 Commits

Author SHA1 Message Date
David Taylor
2a7fb4bf3a
FIX: Correct error in ip-lookup component definition (#17339)
7caaee2 introduced a duplicate definition of the component JS. This likely happened because we had the template defined under `javascripts/discourse`, and the component JS defined under `javascript/admin`. This commit removes the duplicate definition, and moves the template to the admin addon
2022-07-05 15:13:50 +01:00
Bianca Nenciu
a6c3369614
FIX: Posts can belong to hard-deleted topics (#17329)
* FIX: Posts can belong to hard-deleted topics

This was a problem when serializing deleted posts because they might
belong to a topic that was permanently deleted. This caused to DB
lookup to fail immediately and raise an exception. In this case, the
endpoint returned a 404.

* FIX: Remove N+1 queries

Deleted topics were not loaded because of the default scope that
filters out all deleted topics. It executed a query for each deleted
topic.
2022-07-05 10:51:21 +03:00
Alan Guo Xiang Tan
526e6e7a3b
UX: Hide user menu bookmark link when experimental sidebar is enabled (#17336)
Sidebar has a link to bookmarks by default
2022-07-05 15:50:25 +08:00
Alan Guo Xiang Tan
843907d1ac
UX: Update categories/tags in sidebar only after saving. (#17333)
Adding the category/tag into sidebar before the user has saved was
giving the impression that the user's record has already been updated.
2022-07-05 13:32:12 +08:00
Alan Guo Xiang Tan
4d51f9cad6
UX: Enforce bullet category style in sidebar (#17334)
The other category styles do not fit into how we want the sidebar to
look.
2022-07-05 13:28:51 +08:00
Kris
56c0d8cf92
UX: mobile experimental sidebar improvement (#17302)
First pass at the mobile experimental sidebar improvement.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2022-07-05 11:45:02 +08:00
Chapoi
408ce1312b
UX: remove hardcoded colour value (#17323) 2022-07-05 10:47:29 +08:00
David Taylor
78e03649ab
FIX: Replace onebox markdown when pulling hotlinked image (#17328)
If an image is oneboxed directly, then we should replace the onebox URL with a markdown image tag. This ensures that the wrapper link points to the downloaded version rather than the original.

This regressed in bf6f8299
2022-07-05 10:47:10 +08:00
Chapoi
4730858598
UX: missing specificity (#17324) 2022-07-05 10:46:54 +08:00
Alan Guo Xiang Tan
ef7a518159
UX: Retain category badge style on categories select kit. (#17332)
Category badge changes based on the `category style` site setting so we
do not want to forcing all category names to the same color.

Follow-up to 3266350e80
2022-07-05 10:05:44 +08:00
dependabot[bot]
2ea202b30a
Build(deps): Bump cose from 1.2.0 to 1.2.1 (#17330)
Bumps [cose](https://github.com/cedarcode/cose-ruby) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/cedarcode/cose-ruby/releases)
- [Changelog](https://github.com/cedarcode/cose-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/cedarcode/cose-ruby/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: cose
  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>
2022-07-05 09:47:09 +08:00
Joe
e3c71221e5
UX: Makes splash screen setting enabled by default (#17327)
We now want the splash screen to be enabled by default.
2022-07-05 02:06:28 +08:00
David Taylor
24413e5a11 DEV: Enable no-curly-component-invocation lint rule
This will ensure we invoke components consistently across our codebase
2022-07-04 17:25:42 +01:00
David Taylor
c011dd7b43 DEV: Remove last few curly-component invocations 2022-07-04 17:25:42 +01:00
Joe
cfde4419f5
DEV: Preload CSS in the <head> (#17322)
This commit adds preload links for core/plugin/theme CSS stylesheets in the head.

Preload links are non-blocking and run in parallel. This means that they should have already been downloaded by the time we use the actual stylesheets (in the <body> tag).

Google is currently complaining about this here and this PR will address that warning.

This commit will also fix an issue in the splash screen where it sometimes doesn't respect the theme colors - causing a slightly jarring experience on dark themes.

Note that I opted not to add new specs because the underlying work required already has a lot of coverage. The new methods only change the output HTML so we can chuck that in the document <head>

This change also means that we can make all the stylesheets non-render blocking, but that will follow in a separate commit.
2022-07-05 00:23:09 +08:00
Gerhard Schlager
8bdbefe0e0
FIX: Logout could fail due to cached user (#17325)
Logging out failed when the current user was cached by an instance of `Auth::DefaultCurrentUserProvider` and `#log_off_user` was called on a different instance of that class.

Co-authored-by: Sam <sam.saffron@gmail.com>
2022-07-04 17:01:19 +02:00
Jarek Radosz
a0a7b3f9c4
FIX: Correctly display /admin/emails errors (#17321)
Also removed unused codepath in `admin-badges-show`.
2022-07-04 16:03:53 +02:00
Jarek Radosz
c5f0aa2f32
DEV: Remove handlebars from the old package.json (#17319) 2022-07-04 15:05:03 +02:00
Jarek Radosz
999865401c
DEV: Remove most jQ from select-kit test helpers (#17305) 2022-07-04 11:37:11 +02:00
Jarek Radosz
aa7792cf93
DEV: Use npm bootstrap (#17315) 2022-07-04 11:36:51 +02:00
Alan Guo Xiang Tan
b42a9c3647
FIX: Experimental sidebar preferences link not shown for users (#17318)
Not writing any tests here because there is very little value to test
for an option that will eventually be removed
2022-07-04 15:18:39 +08:00
Jarek Radosz
e31002fc05
FIX: Move ember-cli-deprecation-workflow to runtime deps (#17317)
We have a weird setup where almost all deps need to be runtime…
2022-07-04 10:20:20 +08:00
Jarek Radosz
7b9e6bb303
DEV: Fix a flaky submodule/auth test (#17313) 2022-07-04 02:25:35 +02:00
Jarek Radosz
e1f16b4641
DEV: De-jQuerify get-url (#17314) 2022-07-04 02:25:15 +02:00
Jarek Radosz
9f83e8e33c
DEV: Use our ajax helper consistently (#17304)
Possibly fixes some flakes, but regardless - we need to avoid using `$.ajax` directly in most cases.
2022-07-04 02:24:55 +02:00
Peter Wagenet
7caaee27cc
DEV: Generate template backing classes for app (#17300)
```sh
npx ember-holy-futuristic-template-namespacing-batman-codemod ensure-template-only-has-backing-class
```

We would like to colocate templates but, when no backing class exists, colocated templates extend `templateOnly` instead of `Ember.Component`. Generating the backing class helps avoid any behavioral changes.

We can also run the `tagless-ember-components-codemod` to put the tags into the templates at which point we could convert these back to template-only components.
2022-07-04 01:27:29 +02:00
dependabot[bot]
4c69619334
Build(deps): Bump oj from 3.13.14 to 3.13.15 (#17309)
Bumps [oj](https://github.com/ohler55/oj) from 3.13.14 to 3.13.15.
- [Release notes](https://github.com/ohler55/oj/releases)
- [Changelog](https://github.com/ohler55/oj/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/ohler55/oj/compare/v3.13.14...v3.13.15)

---
updated-dependencies:
- dependency-name: oj
  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>
2022-07-04 01:20:38 +02:00
dependabot[bot]
c28adf7bf8
Build(deps-dev): Bump minitest from 5.16.1 to 5.16.2 (#17311)
Bumps [minitest](https://github.com/seattlerb/minitest) from 5.16.1 to 5.16.2.
- [Release notes](https://github.com/seattlerb/minitest/releases)
- [Changelog](https://github.com/minitest/minitest/blob/master/History.rdoc)
- [Commits](https://github.com/seattlerb/minitest/compare/v5.16.1...v5.16.2)

---
updated-dependencies:
- dependency-name: minitest
  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>
2022-07-04 01:20:28 +02:00
dependabot[bot]
81bd47ea48
Build(deps): Bump rubocop-rspec from 2.11.1 to 2.12.1 (#17312)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.11.1 to 2.12.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.11.1...v2.12.1)

---
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>
2022-07-04 01:20:16 +02:00
dependabot[bot]
48886a836e
Build(deps): Bump msgpack from 1.5.2 to 1.5.3 (#17306)
Bumps [msgpack](https://github.com/msgpack/msgpack-ruby) from 1.5.2 to 1.5.3.
- [Release notes](https://github.com/msgpack/msgpack-ruby/releases)
- [Changelog](https://github.com/msgpack/msgpack-ruby/blob/master/ChangeLog)
- [Commits](https://github.com/msgpack/msgpack-ruby/compare/v1.5.2...v1.5.3)

---
updated-dependencies:
- dependency-name: msgpack
  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>
2022-07-04 00:23:29 +02:00
dependabot[bot]
a643453e48
Build(deps): Bump rack from 2.2.3.1 to 2.2.4 (#17307)
Bumps [rack](https://github.com/rack/rack) from 2.2.3.1 to 2.2.4.
- [Release notes](https://github.com/rack/rack/releases)
- [Changelog](https://github.com/rack/rack/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rack/rack/compare/2.2.3.1...2.2.4)

---
updated-dependencies:
- dependency-name: rack
  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>
2022-07-04 00:20:28 +02:00
Peter Wagenet
82d7e76d52
Set up ember-cli-deprecation-workflow (#17268)
Let's get the ball rolling! 😃
2022-07-01 23:43:40 +02:00
Joe
adb7fa5e2f
UX: Use discourse-ready as a baseline for removing the splash (#17297)
We previously used the window load event as a target to remove the splash. The issue with that is that it means we wait for images to download before we remove the splash.

Ember has a better method that we can use ready(). This PR triggers a custom discourse-ready when that happens and uses that as the baseline for removing the splash.

This PR also adds three new performance marks. discourse-ready, discourse-splash-visible, and discourse-splash-removed

These will help us keep track of performance.

Internal topic /t/65378/81
2022-07-01 21:54:38 +08:00
Gerhard Schlager
caa0247f5c
FIX: Incorrect currentUser could be cached for requests with API key (#17279)
This happened when a middleware accessed the `currentUser` before a controller had a chance to populate the `action_dispatch.request.path_parameters` env variable. In that case Discourse would always cache `nil` as `currentUser`.
2022-07-01 10:18:24 +02:00
Vinoth Kannan
af3262d70a
UX: made "Dismiss New" button clickable by replacing float method. (#17288)
Since we removed the `row:after { clear: both }` CSS we no longer use `float` style here. Instead, we should use `flex` style to align the button in right side.
2022-07-01 09:12:16 +05:30
Kris
199d58461b
UX: hide sidebar li overflow, remove title margin (#17294) 2022-06-30 18:24:29 -04:00
Kris
321dc29583
UX: improve experimental sidebar scrollbar (#17293) 2022-06-30 16:14:29 -04:00
Kris
b1f7da4fe3
UX: minor experimental sidebar alignment changes (#17292) 2022-06-30 16:14:17 -04:00
Kris
4df683f88d
UX: Remove experimental sidebar notification text (#17290) 2022-06-30 14:15:39 -04:00
Ghassan Maslamani
d0a4bc636f
FIX: Vimeo regex pattern (#17277)
Vimeo has two url structure:

- Normal /video_id

- Private/Unlisted /video_id/hash_string

This changes change the regex pattern thus it would be able to

catch both. Also it tolerate trailing slash.

This shall fixes:

https://meta.discourse.org/t/vimeo-embed-urls-parsed-incorrectly-in-email/231042
2022-06-30 13:13:25 -03:00
Rafael dos Santos Silva
f130ec35d9
FEATURE: Use full post width for Vimeo embeds (#17289) 2022-06-30 13:08:24 -03:00
Joe
49905a4e6c
DEV: Use performance timings to as a baseline for the splash take 2 (#17284)
We previously relied on CSS animation-delay for the splash. This means that we can get inconsistent results based on device/network conditions.

This PR moves us to a more consistent timing based on {request time + 2 seconds}

Internal topic: /t/65378/65
2022-06-30 21:22:00 +08:00
Jarek Radosz
7343cb9f73
DEV: Convert {{cook-text}} to angle-brackets (#17287) 2022-06-30 14:03:27 +02:00
Jarek Radosz
16ea7ab248
DEV: Run angle-brackets codemod (#17286)
Co-authored-by: Peter Wagenet <peter.wagenet@gmail.com>
2022-06-30 12:30:50 +02:00
Natalie Tay
02e148cbde
Version bump to v2.9.0.beta6 (#17283)
Needed for https://meta.discourse.org/t/unable-to-find-discourse-version-2-9-0-beta6/231511
2022-06-30 12:25:44 +03:00
Joe
c86c709998
UX: Reduces splash animation delay (#17282)
This PR cuts down the delay before the splash screen is visible.
2022-06-30 17:19:39 +08:00
Alan Guo Xiang Tan
3a6e87ca4f
FEATURE: Store sidebar section display state in local storage (#17281)
Tests have been intentionally left out as it is hard to test interaction that relies on local storage.
It also isn't the end of the world if the feature regresses.
2022-06-30 15:56:46 +08:00
Alan Guo Xiang Tan
3266350e80
FEATURE: Decouple category/tag presence in sidebar from notifi level (#17273) 2022-06-30 14:54:20 +08:00
Gabe Pacuilla
db53c6650b
FIX: max value for SiteSetting.delete_removed_posts_after (#17270) 2022-06-30 12:46:48 +08:00
dependabot[bot]
1493cc447e
Build(deps): Bump rubocop from 1.31.0 to 1.31.1 (#17280)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.31.0 to 1.31.1.
- [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.31.0...v1.31.1)

---
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>
2022-06-30 12:45:32 +08:00