Commit Graph

46298 Commits

Author SHA1 Message Date
David Taylor 04e433d286
PERF: Skip image placeholders when secure_media is enabled (#18247)
Secure media requests go through the app. In topics with many images, this makes it very easy to hit rate limiters. Skipping the low-res placeholders reduces the chance of this problem occuring.
2022-09-14 12:42:59 +01:00
Joffrey JAFFEUX 09a434e2d8
DEV: emoji model should set the group of the emoji (#18237)
We do it for custom emojis but not for standard emojis which is quite unexpected and limit the use cases we can have for it.
2022-09-14 13:10:48 +02:00
communiteq 56555a0231
Disallow access to raw email for non-staff users (#17569) 2022-09-14 09:57:12 +08:00
Pixlz dee8a1db20
UX: Do not mark activity table heading as a cursor (#18244) 2022-09-13 18:26:41 -04:00
Osama Sayegh 2f428023da
DEV: ctrl+click on user menu items should open in new tab (#18243) 2022-09-13 18:25:40 -04:00
Jarek Radosz 5ee760dc2c
UX: Retry "left-align title with content for sidebar (#18202)" (#18242)
Reverts #18241 and fixes issues with the original PR:

1. Remove an extraneous `margin-left: auto` from a grid cell (this was causing the buggy behavior in webkit)
2. Add `grid-area` name to `.extra-info-wrapper`
3. Account for `.wrap` padding
4. Remove unused css (`.header-row` and inner styles)
2022-09-13 21:45:31 +02:00
Alan Guo Xiang Tan 2a3e138e12
DEV: Remove broken link from README (#18236) 2022-09-13 15:07:27 -04:00
Kris c69473128b
UX: improve composer toolbar flexibility (#18195) 2022-09-13 14:20:33 -04:00
Osama Sayegh 19909a74b0
DEV: Add a tab for watching notifications to the experimental user menu (#18240)
This commit adds a new tab to the experimental user menu for the `posted` and `watching_first_post` notification types.

Internal topic: t/72835.
2022-09-13 20:52:02 +03:00
Kris 6c1b6a98ff
Revert header sidebar change 0ef68f5 (#18241) 2022-09-13 13:20:08 -04:00
Penar Musaraj b8adb70973
DEV: Refactor composer and logout dialogs (#18156) 2022-09-13 12:30:52 -04:00
Roman Rizzi 08cb9ecca4
FIX: Don't delete previous messages when we're inside the `sent_recently` window. (#18239)
`delete_previous!` deletes existing topics even when we cannot send a new one due to the `limit_once_per` option. The dashboard problems PM gets deleted the next time the job runs (30 minutes), so the inbox could be empty when
admins click on the summary notification.
2022-09-13 12:43:24 -03:00
Kris 5865868c76
remove unused grid-area (#18238) 2022-09-13 10:49:43 -04:00
Osama Sayegh 12ebdf0ff0
DEV: Convert experimental user menu tabs to links when they're active (#18158)
This PR restores a small feature which was present in the old menu and allowed users to click on the active tab in the menu to navigate to some page that showed the same items in the menu but with more details.

For example, if you switch to the PMs tab and then click on it again, currently nothing happens. However, with this change, clicking on the tab again will take you to your messages page at `/my/messages`.

Note: plugins that register custom tabs in the menu can provide a `linkWhenActive` property for their tab if they wish to mimic core's tabs, but it's optional; if they don't provide one, the tab will do nothing if the user clicks on it again.

Internal topic: t/73349.
2022-09-13 17:12:27 +03:00
Discourse Translator Bot d00cd3295e
Update translations (#18183) 2022-09-13 16:04:18 +02:00
Osama Sayegh 8c2c96af25
DEV: Ensure experimental user menu is always closed after clicking on items (#18231)
Because Discourse is a single-page application, clicks on the majority of `<a>` elements in the app need to be intercepted by JavaScript to prevent browsers' default action (full page reload). Links in the user menu - which include notifications, reviewables, bookmarks etc. - are no exception to this rule and currently clicks on these items are handled by the global [click-interceptor](1fa21ed415/app/assets/javascripts/discourse/app/lib/intercept-click.js (L20)) which calls the `preventDefault` function on the click event object and uses the `DiscourseURL.routeTo` function to route the user to the page they request.

However, for links in the user menu, there's an extra step which is to let the header know that it should close the user menu after clicking an item in the menu, but the global interceptor doesn't know that because the step is specific to links in the user menu. This can cause a bug on mobile devices where the menu remains open after clicking on a notification which results in the user having to close the menu to see the page that the notification takes them to.

This commit adds a click handler to user menu items that ensures the menu is closed when an item is clicked and navigates the user to wherever the item links to. There's a small downside to this change which is that user menu items now have their own click interceptor instead of relying on the global interceptor, i.e. duplicated logic, but since it's only a couple of lines, I think we can live with it for a while.

I did try to make the click handler of the user menu items only close the menu (call the `closeUserMenu` function), but for some reasons it caused a full page reload to happen when clicking a notification item due to some weird interactions between the header widget and the user menu. I didn't debug this thoroughly because we have plans to change the header implementation from widgets/virtual-dom to Glimmer component, which will likely resolve that weird full page reload issue and we'll be able to make the click handler just close the menu and let the global interceptor prevents the default action and do the routing.

Internal topic: t/71911/118.
2022-09-13 15:44:45 +03:00
dependabot[bot] 008b958b28
Build(deps-dev): Bump parallel_tests from 3.12.0 to 3.12.1 (#18235)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 3.12.0 to 3.12.1.
- [Release notes](https://github.com/grosser/parallel_tests/releases)
- [Changelog](https://github.com/grosser/parallel_tests/blob/master/CHANGELOG.md)
- [Commits](https://github.com/grosser/parallel_tests/compare/v3.12.0...v3.12.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 10:24:49 +08:00
dependabot[bot] e0e115eb6d
Build(deps): Bump rubocop-rspec from 2.12.1 to 2.13.1 (#18232)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.12.1 to 2.13.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.12.1...v2.13.1)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 09:47:47 +08:00
dependabot[bot] 98b3f7f106
Build(deps): Bump rspec-expectations from 3.11.0 to 3.11.1 (#18233)
Bumps [rspec-expectations](https://github.com/rspec/rspec-expectations) from 3.11.0 to 3.11.1.
- [Release notes](https://github.com/rspec/rspec-expectations/releases)
- [Changelog](https://github.com/rspec/rspec-expectations/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-expectations/compare/v3.11.0...v3.11.1)

---
updated-dependencies:
- dependency-name: rspec-expectations
  dependency-type: indirect
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 09:47:34 +08:00
dependabot[bot] 971e9f7cf3
Build(deps): Bump rspec-support from 3.11.0 to 3.11.1 (#18234)
Bumps [rspec-support](https://github.com/rspec/rspec-support) from 3.11.0 to 3.11.1.
- [Release notes](https://github.com/rspec/rspec-support/releases)
- [Changelog](https://github.com/rspec/rspec-support/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-support/compare/v3.11.0...v3.11.1)

---
updated-dependencies:
- dependency-name: rspec-support
  dependency-type: indirect
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-13 09:47:19 +08:00
Kris 0ef68f52d8
UX: left-align title with content for sidebar (#18202) 2022-09-13 09:46:57 +08:00
Osama Sayegh 1fa21ed415
DEV: Prioritize unread notifications in the experimental user menu (#18216)
Right now the experimental user menu sorts notifications the same way that the old menu does: unread high-priority notifications are shown first in reverse-chronological order followed by everything else also in reverse-chronological order. However, since the experimental user menu has dedicated tabs for some notification types and each tab displays a badge with the count of unread notifications in the tab, we feel like it makes sense to change how notifications are sorted in the experimental user menu to this:

1. unread high-priority notifications
2. unread regular notifications
3. all read notifications (both high-priority and regular)
4. within each group, notifications are sorted in reverse-chronological order (i.e. newest is shown first).

This new sorting logic applies to all tabs in the experimental user menu, however it doesn't change anything in the old menu. With this change, if a tab in the experimental user menu shows an unread notification badge for a really old notification, it will be surfaced to the top and prevents confusing scenarios where a user sees an unread notification badge on a tab, but the tab doesn't show the unread notification because it's too old to make it to the list.

Internal topic: t72199.
2022-09-12 21:19:25 +03:00
Kris 321aa4b4b4
UX: sidebar more link for categories & tags (#18199) 2022-09-12 13:25:25 -04:00
Penar Musaraj 08009cd4d1
FIX: Correctly pass `invite_to_topic` param to invites (#18229)
Ensures the correct mailer template is used.
2022-09-12 13:16:53 -04:00
Kris 3f2c3d5360
UX: switch wizard SVG colors for dark mode (#18109) 2022-09-12 11:34:15 -04:00
Kris b0ac98b465
DEV: remove H1 from crawler view header (#18201) 2022-09-12 10:46:00 -04:00
Kris dacdec5acc
UX: trigger tooltips on click for touch devices (#18198) 2022-09-12 10:04:20 -04:00
Jarek Radosz 761864d4f4
DEV: Add favicon to dev ember proxy (#18228)
One less console warning in tests
2022-09-12 15:46:50 +02:00
Penar Musaraj 5c0f770f0f
DEV: Refactor self-delete dialog (#18180)
Also adds missing test
2022-09-12 09:45:53 -04:00
Jarek Radosz fa58eea64e
DEV: Minor code cleanup (#18225)
Various small changes made while debugging MessageBus-related tests.
2022-09-12 14:05:21 +02:00
Jarek Radosz ec32b61319
DEV: Add another missing `await` (#18226) 2022-09-12 14:03:39 +02:00
Jarek Radosz 08e63ddab2
DEV: Fix spec file name (#18227)
Match the impl file name
2022-09-12 14:03:23 +02:00
dependabot[bot] dfd0ce39f3
Build(deps): Bump mout from 1.2.2 to 1.2.3 in /app/assets/javascripts (#18224)
Bumps [mout](https://github.com/mout/mout) from 1.2.2 to 1.2.3.
- [Release notes](https://github.com/mout/mout/releases)
- [Changelog](https://github.com/mout/mout/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mout/mout/compare/v1.2.2...v1.2.3)

---
updated-dependencies:
- dependency-name: mout
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 11:40:29 +02:00
Jarek Radosz 584dbb7202
DEV: Update moment.js (#18207)
Closes #18176
2022-09-12 10:56:39 +02:00
dependabot[bot] 0a49db14a4
Build(deps): Bump ember-exam in /app/assets/javascripts (#18221)
Bumps [ember-exam](https://github.com/ember-cli/ember-exam) from 7.0.1 to 8.0.0.
- [Release notes](https://github.com/ember-cli/ember-exam/releases)
- [Changelog](https://github.com/ember-cli/ember-exam/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-exam/commits/v8.0.0)

---
updated-dependencies:
- dependency-name: ember-exam
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-12 10:22:42 +02:00
Jarek Radosz 494a6317d7
DEV: Update dependabot config (#18218) 2022-09-12 09:27:10 +02:00
dependabot[bot] 55ee0c8214
Build(deps): Bump oauth from 0.5.10 to 1.1.0 (#18143)
Bumps [oauth](https://github.com/oauth-xx/oauth-ruby) from 0.5.10 to 1.1.0.
- [Release notes](https://github.com/oauth-xx/oauth-ruby/releases)
- [Changelog](https://github.com/oauth-xx/oauth-ruby/blob/migrated/CHANGELOG.md)
- [Commits](https://github.com/oauth-xx/oauth-ruby/compare/v0.5.10...v1.1.0)

---
updated-dependencies:
- dependency-name: oauth
  dependency-type: indirect
  update-type: version-update:semver-major
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 23:25:39 +02:00
dependabot[bot] 327ca5b839
Build(deps): Bump webpack in /app/assets/javascripts (#18214)
Bumps [webpack](https://github.com/webpack/webpack) from 5.73.0 to 5.74.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.73.0...v5.74.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 22:35:55 +02:00
Osama Sayegh aeee7ed03d
UX: Change `posted` notification icon to `discourse-bell-exclamation` (#18217)
This PR changes the icon for `posted` notification types (these are the notifications that you receive when someone posts in a topic you're watching) from `reply` to `discourse-bell-exclamation`. We're doing this to visually distinguish between the `posted` notifications and `replied` notifications which are the notifications that you receive when someone replies to you directly.

Internal topic: t72835.
2022-09-11 22:57:14 +03:00
dependabot[bot] 725b585a43
Build(deps): Bump ember-cli-htmlbars in /app/assets/javascripts (#18212) 2022-09-11 14:53:34 +02:00
dependabot[bot] da963e88ba
Build(deps): Bump @babel/standalone in /app/assets/javascripts (#18213) 2022-09-11 14:53:10 +02:00
dependabot[bot] e4a79daf24
Build(deps): Bump follow-redirects in /app/assets/javascripts (#18205)
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.13.3 to 1.15.1.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.13.3...v1.15.1)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 13:04:45 +02:00
dependabot[bot] 38327ee9d2
Build(deps): Bump sass from 1.53.0 to 1.54.9 in /app/assets/javascripts (#18197)
Bumps [sass](https://github.com/sass/dart-sass) from 1.53.0 to 1.54.9.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.53.0...1.54.9)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 13:02:42 +02:00
dependabot[bot] efa2096155
Build(deps): Bump rubocop from 1.35.1 to 1.36.0 (#18160)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.35.1 to 1.36.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.35.1...v1.36.0)

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

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 12:13:34 +02:00
dependabot[bot] 0695ebbc72
Build(deps): Bump terser from 4.8.0 to 4.8.1 in /app/assets/javascripts (#18175)
Bumps [terser](https://github.com/terser/terser) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/terser/terser/releases)
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v4.8.0...v4.8.1)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: indirect
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 12:09:35 +02:00
dependabot[bot] f2857cb155
Build(deps): Bump a11y-dialog in /app/assets/javascripts (#18188)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 7.5.0 to 7.5.2.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.0...7.5.2)

---
updated-dependencies:
- dependency-name: a11y-dialog
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 11:59:51 +02:00
dependabot[bot] e348ca3ef6
Build(deps): Bump @babel/core in /app/assets/javascripts (#18189)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.18.6 to 7.19.0.
- [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.19.0/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 11:59:28 +02:00
dependabot[bot] 83b147aab2
Build(deps): Bump xss from 1.0.13 to 1.0.14 in /app/assets/javascripts (#18191)
Bumps [xss](https://github.com/leizongmin/js-xss) from 1.0.13 to 1.0.14.
- [Release notes](https://github.com/leizongmin/js-xss/releases)
- [Changelog](https://github.com/leizongmin/js-xss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/leizongmin/js-xss/compare/v1.0.13...v1.0.14)

---
updated-dependencies:
- dependency-name: xss
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 11:58:16 +02:00
dependabot[bot] 9112f91f57
Build(deps): Bump @popperjs/core in /app/assets/javascripts (#18196)
Bumps [@popperjs/core](https://github.com/popperjs/popper-core) from 2.11.5 to 2.11.6.
- [Release notes](https://github.com/popperjs/popper-core/releases)
- [Commits](https://github.com/popperjs/popper-core/compare/v2.11.5...v2.11.6)

---
updated-dependencies:
- dependency-name: "@popperjs/core"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 11:57:56 +02:00
dependabot[bot] c4892e70dd
Build(deps): Bump openssl from 3.0.0 to 3.0.1 (#18200)
Bumps [openssl](https://github.com/ruby/openssl) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/ruby/openssl/releases)
- [Changelog](https://github.com/ruby/openssl/blob/master/History.md)
- [Commits](https://github.com/ruby/openssl/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: openssl
  dependency-type: indirect
  update-type: version-update:semver-patch
...

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-11 11:57:17 +02:00