Commit Graph

50798 Commits

Author SHA1 Message Date
Jordan Vidrine d8b62c2275
FIX: Update search-menu.scss (#23292)
Remove overflow hidden, which is causing issues on windows
2023-08-28 11:04:41 -05:00
Isaac Janzen 6870f38e87
DEV: Convert `feature-topic` modal to component-based API (#23277)
Updated styles with some sign off from @jordanvidrine 



<img width="655" alt="Screenshot 2023-08-28 at 9 07 47 AM" src="https://github.com/discourse/discourse/assets/50783505/31b453ef-a787-436f-9fd9-48c9cd3a2e81">
2023-08-28 09:41:14 -05:00
David Taylor 81d8c6ba6c
UX: Prevent initial jump when dragging topic timeline scroller (#23291)
Previously, when dragging the timeline scroller, we would position it purely based on the current cursor position. That means that if you started dragging it from anywhere other than the centre, the scroller will 'jump' suddenly to centre itself on the cursor.

This commit measures the offset of your cursor when the drag starts, and maintains it throughout the drag. So for example, if you start dragging at the bottom of the scroller and drag one pixel up, the scroller will only move by 1px.

This should make the UX much smoother, especially on large topics.
2023-08-28 15:00:32 +01:00
Jarek Radosz 6f1d666323
DEV: Make index.html a valid html (#23289)
Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-08-28 14:44:38 +02:00
David Taylor 33d5845991
FIX: Avoid scroll jumping for topics on slow connections (#23290)
When the 'loading slider' navigation indicator is enabled, and a connection is very slow, we `display: none` most of the page and display a spinner. The `still-loading` body class for this was being added in the `afterRender` step in the Ember runloop. This meant that, depending on the order they were scheduled, other `afterRender` jobs may run before it. This caused an issue with topic scroll locations because we would attempt to scroll to an element which was `display: none` at the point its position was calculated.

This commit moves the `still-loading` class manipulations to the `render` step of the runloop, which is technically more correct, and means that anything scheduled in the `afterRender` step is guaranteed to run without the `display: none` CSS.

https://meta.discourse.org/t/276305/29
2023-08-28 12:23:02 +01:00
Sam 997c839626
FEATURE: display count of topics being dismissed in dialog (#23288)
Previous to this change it was unclear if all new would be dismissed or just
some of them

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-08-28 11:46:38 +02:00
Sion Kang c9ebc75a1d
DOCS: Update wrong link address (#23285) 2023-08-28 13:00:17 +08:00
Martin Brennan 64a4390e17
DEV: Fix flaky network-based upload spec (#23286)
Tries to fix the composer upload spec by making the upload
slow enough to allow clicking the Cancel button, and improves
generally the API for CDP network changes.
2023-08-28 12:59:22 +08:00
Jarek Radosz 09446baf10
DEV: Fix `redis.sadd` warnings (#23244)
```
Redis#sadd will always return an Integer in Redis 5.0.0. Use Redis#sadd? instead
```
2023-08-28 12:58:47 +08:00
dependabot[bot] 09acba17de
Build(deps-dev): Bump eslint from 8.47.0 to 8.48.0 in /app/assets/javascripts (#23281)
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  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-28 12:58:31 +08:00
dependabot[bot] 5d2d1ed9a2
Build(deps-dev): Bump webmock from 3.18.1 to 3.19.0 (#23282)
Bumps [webmock](https://github.com/bblimke/webmock) from 3.18.1 to 3.19.0.
- [Changelog](https://github.com/bblimke/webmock/blob/master/CHANGELOG.md)
- [Commits](https://github.com/bblimke/webmock/compare/v3.18.1...v3.19.0)

---
updated-dependencies:
- dependency-name: webmock
  dependency-type: direct:development
  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-28 12:58:17 +08:00
dependabot[bot] d2d74c9c3c
Build(deps): Bump google-protobuf from 3.24.1 to 3.24.2 (#23283)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.24.1 to 3.24.2.
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](https://github.com/protocolbuffers/protobuf/compare/v3.24.1...v3.24.2)

---
updated-dependencies:
- dependency-name: google-protobuf
  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-28 12:57:53 +08:00
Martin Brennan 5fc93b95cc
FIX: Improve admin plugin list and modernize code (#23256)
This commit contains a few improvements:

* Use LinkTo instead of a button with a weird action referencing the
  controller to navigate to the filtered settings for a plugin
* Add an AdminPlugin model with tracked properties and use that when
  toggling the setting on/off and in the templates
* Make it so the Settings button for a plugin navigates to the correct
  site setting category instead of always just going to the generic
  "plugins" one if possible
2023-08-28 10:48:59 +10:00
Ted Johansson 4b52269827
DEV: Move option to delete user under reviewable reject menu (#23257)
Follow-up to #23199 in which we moved the "delete user" options under the relevant action menu for flagged post. This change does the same, but to queued posts.
2023-08-27 10:05:05 +08:00
Isaac Janzen aaf0b0f1cc
DEV: Convert `feature-topic-on-profile` modal to component-based API (#23275)
# Before
<img width="738" alt="Screenshot 2023-08-25 at 2 04 31 PM" src="https://github.com/discourse/discourse/assets/50783505/c0778da2-d062-48d9-93e8-4b481190fadc">


# After
<img width="750" alt="Screenshot 2023-08-25 at 2 04 34 PM" src="https://github.com/discourse/discourse/assets/50783505/07aa2bec-e282-424e-b87d-48f5104eb534">
2023-08-26 09:52:19 -05:00
Jordan Vidrine 1209efb63c
FIX: Adjust border-radius in multiple locations (#23278) 2023-08-25 16:09:18 -05:00
David Taylor 887772db6b
DEV: Auto `yarn install` root package in development (#23276)
We were already running `yarn install` for the app directory before booting ember-cli via `bin/ember-cli`. This commit extends that so that it also runs `yarn install` for the root of the repository. In the long-term we hope to combine these packages, but for now they are separate.

The post-install hook for the root package is also updated to pass through the `-s` flag. Previously, we only passed through the `--frozen-lockfile` flag.
2023-08-25 20:53:24 +01:00
Jordan Vidrine 8ec1f6f404
Revert "UX: chat composer (#23267)" (#23273)
This reverts commit 3bcbb2444a.
2023-08-25 13:49:41 -05:00
Penar Musaraj a94834abd5
A11Y: Improve setting focus to post (#23243) 2023-08-25 14:45:56 -04:00
Isaac Janzen 058c8496f0
DEV: Convert explain-reviewable modal to component-based API (#23274)
# Before
<img width="826" alt="Screenshot 2023-08-25 at 12 49 10 PM" src="https://github.com/discourse/discourse/assets/50783505/25c2bf52-33f3-4b18-89c1-9826ed605519">

# After
<img width="632" alt="Screenshot 2023-08-25 at 12 52 37 PM" src="https://github.com/discourse/discourse/assets/50783505/0d6697f2-6226-4acc-8aac-031f4645db93">
2023-08-25 13:09:21 -05:00
Joffrey JAFFEUX 4ee0f4e5ba
FIX: ensures we update cached model last message bus id (#23271)
Channels and threads are cached as much as possible, as a result the `last_message_bus_id` can become stalled.

It was for example exhibited with the following actions:
- open a channel (A)
- send a message
- navigate to another channel (B)
- come back to channel (A), and you would actually get all the messages replayed since you opened (A) for the first time as the `last_message_bus_id` would only refresh on a full page reload

This was technically not causing known bugs ATM, but was probably the source of few hard to repro bugs and would for sure cause issues in the future.

Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2023-08-25 19:17:48 +02:00
Isaac Janzen dcbfb8c54b
DEV: Convert `edit-topic-timer` modal to component-based API (#23252)
# Before
<img width="479" alt="Screenshot 2023-08-25 at 10 52 04 AM" src="https://github.com/discourse/discourse/assets/50783505/65ec8f94-d3e3-4520-a3f0-b265af069e83">

# After
<img width="569" alt="Screenshot 2023-08-25 at 10 53 44 AM" src="https://github.com/discourse/discourse/assets/50783505/35d12af7-c287-42f8-bf9c-d0ae1b5a08db">
2023-08-25 12:17:34 -05:00
David Taylor 92bc61b4be
FIX: Respect default category sort order when navigating within app (#23270)
When navigating around, we make ajax requests with a parameter like `?filter=latest`. This results in the TopicQuery being set up with `filter: "latest"` as a string. The logic introduced in fd9a5bc0 checks for equality with `:latest` and `:unseen` symbols, which didn't work correctly in this situation

This commit makes the logic detect both strings and symbols, and adds a spec for the behaviour.
2023-08-25 16:49:49 +01:00
Isaac Janzen 34f502f68d
DEV: Convert `uploaded-image-list` modal to component-based API (#23245)
<img width="660" alt="Screenshot 2023-08-24 at 4 55 01 PM" src="https://github.com/discourse/discourse/assets/50783505/3fb8360d-c8cd-4ff4-acb2-15843eb4f868">
2023-08-25 09:20:14 -05:00
Isaac Janzen 0496199090
FIX: Badge preview not displaying grant count (#23269)
<img width="510" alt="Screenshot 2023-08-25 at 8 19 38 AM" src="https://github.com/discourse/discourse/assets/50783505/9ebf467e-7b3b-49e2-91d9-43e37b838431">
2023-08-25 09:19:01 -05:00
Isaac Janzen e7cb417aaf
DEV: Convert `auth-token` modal to component-based API (#23251)
<img width="744" alt="Screenshot 2023-08-24 at 6 41 15 PM" src="https://github.com/discourse/discourse/assets/50783505/a5df1a15-fbb0-43a9-acce-742ef484d70a">
2023-08-25 08:56:29 -05:00
Joffrey JAFFEUX 311b28d485
FIX: incorrect chat message reaction text (#23260)
Prior to this fix the text would be incorrect when the current user reacted and number of reactions was above 2.

This commit fixes the bug and also makes the following changes:
- separates text computation in a standalone lib to make it easier to test
- increases the number of displayed usernames in reaction text (from 5 to 15)
- adds a full test suite for this new `getReactionText` function
- fixes a bug in reaction fabricator which would prevent to change the count to zero
2023-08-25 15:20:56 +02:00
Isaac Janzen 98f2e6ab12
DEV: Convert `edit-user-directory-columns` modal to component-based API (#23250) 2023-08-25 07:22:09 -05:00
Isaac Janzen 5c652dd7a1
DEV: Convert `reseed` modal to component-based API (#23232)
<img width="728" alt="Screenshot 2023-08-24 at 1 35 53 PM" src="https://github.com/discourse/discourse/assets/50783505/5532eea4-1238-43dc-b2b7-a511e78d1f97">
2023-08-25 07:21:38 -05:00
Isaac Janzen c22e2de2d8
DEV: Convert `form-template-validation-options` modal to component-based API (#23236)
<img width="794" alt="Screenshot 2023-08-25 at 6 38 21 AM" src="https://github.com/discourse/discourse/assets/50783505/f5cf6fa0-7a2f-4e38-93e2-657fb01f6703">
2023-08-25 07:02:54 -05:00
Jarek Radosz 0b74ba7c66
DEV: Add color to testem output (#23266) 2023-08-25 13:44:26 +02:00
Isaac Janzen 3052779ea6
DEV: Convert `staff-action-log-details` modal to component-based API (#23240)
<img width="800" alt="Screenshot 2023-08-24 at 3 08 38 PM" src="https://github.com/discourse/discourse/assets/50783505/c498c49c-88ca-4b34-90a0-194f177b5856">
2023-08-25 06:43:52 -05:00
Isaac Janzen 0c26d8b375
DEV: Convert `color-scheme-select-base` modal to component-based API (#23234)
<img width="560" alt="Screenshot 2023-08-24 at 2 12 38 PM" src="https://github.com/discourse/discourse/assets/50783505/9180f090-2142-4818-bb40-78cf7c25e9fe">
2023-08-25 06:26:39 -05:00
chapoi 3bcbb2444a
UX: chat composer (#23267)
* UX: make composer buttons less wide

* UX: fix disappearing separator
2023-08-25 13:16:58 +02:00
David Taylor 3081d83ac5
DEV: Update user-topics-list to native class syntax (#23263) 2023-08-25 10:57:44 +01:00
Jarek Radosz 90ef8d3041
DEV: Add missing `pluginId` to a `modifyClass` test (#23265) 2023-08-25 11:44:42 +02:00
Jarek Radosz 3ce3c2ff81
DEV: Add a spec for `assets:precompile:js_processor` (#23220) 2023-08-25 11:44:30 +02:00
Ted Johansson 5d5e919530
FIX: Create a reviewable when flagging a chat message for 'something else' (#23264)
In #22914 we added a fix to stop creating reviewables in the review queue when flagging a chat message and choosing the "notify user" option. By mistake we also stopped creating it when selecting the "something else" option.

This change makes it so a "something else" flag once again creates a reviewable. (Same behaviour as posts.)
2023-08-25 17:38:27 +08:00
Joffrey JAFFEUX c5ac500181
UX: minor tweaks to thread list item (#23259)
- drop @
- prevents +X  (participants) to show on next line
- few spacing/fonts adjustments

Note that this commit is also stripping links from chat excerpts.
2023-08-25 11:20:03 +02:00
dependabot[bot] 1fd006bc94
Build(deps): Bump actionview_precompiler from 0.2.3 to 0.3.0 (#23249)
Bumps [actionview_precompiler](https://github.com/jhawthorn/actionview_precompiler) from 0.2.3 to 0.3.0.
- [Commits](https://github.com/jhawthorn/actionview_precompiler/compare/v0.2.3...v0.3.0)

---
updated-dependencies:
- dependency-name: actionview_precompiler
  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-25 11:14:54 +02:00
dependabot[bot] f4afa2c5cc
Build(deps-dev): Bump @babel/standalone in /app/assets/javascripts (#23262)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.22.10 to 7.22.12.
- [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.22.12/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  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-25 11:14:43 +02:00
dependabot[bot] ae0c169f70
Build(deps): Bump sshkey from 2.0.0 to 3.0.0 (#23248)
Bumps [sshkey](https://github.com/bensie/sshkey) from 2.0.0 to 3.0.0.
- [Release notes](https://github.com/bensie/sshkey/releases)
- [Commits](https://github.com/bensie/sshkey/compare/2.0.0...3.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 10:54:43 +02:00
dependabot[bot] 556fc05506
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23224)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.10 to 7.22.11.
- [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.22.11/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  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-25 10:51:49 +02:00
David Taylor b26fd03692
DEV: Introduce ember-router-service-refresh-polyfill (#23261)
This provides a `refresh()` function on Ember's public router service. The feature was added to Ember in v4.1.0, but this polyfill will allow us to start using it straight away under 3.28
2023-08-25 09:32:54 +01:00
Kelv 93c2de3ba5
DEV: add geoblocking and tag-by-group plugins (#23255) 2023-08-25 16:22:54 +08:00
Ted Johansson 63ca7bc6bc
DEV: Add basic bin/dev script for launching in development (#23254)
We have been discussing potentially adding a Procfile to help launch the application. As part of the discussions, @tgxworld also mentioned it'd be nice to have a command to launch the app in development.

This allows us to encode how to start the app in code and ship that in the repo, rather than having to rely on external documentation.

Newer installs of Rails come with a bin/dev script for exactly this purpose. This change adds one in retroactively for us.

The script currently runs bin/ember-cli -u, which is the canonical way of starting the app for development according to documentation. I know not everyone uses this, but the point of this PR is to add the script first, then we can iterate on the means of running the app. 🙂
2023-08-25 12:07:16 +08:00
Ted Johansson 12cdd7db1a
DEV: Move option to delete user under reviewable agree menu (#23199)
As per discussion, we want to move the options to delete the user under the "Yes" menu of the review queue, since these options are often the most recommended, but also frequently missed because they are tucked away under their own menu.

In addition to the move, I removed the title case of the options so that it matches the other options in the "Yes" menu.
2023-08-25 10:53:56 +08:00
Blake Erickson 9238a9cf42
DEV: Display fuzzy site setting search results below direct matches (#23197)
DEV: Display fuzzy site setting search results below direct matches

When searching for site settings, in the results under the ALL category
all the fuzzy search results were showing first followed by any direct
matches. This change adjusts that so that fuzzy searches show below
direct matches.

Fuzzy results are now also sorted based on their gap calculation in
ascending order.
2023-08-24 17:47:40 -06:00
dependabot[bot] c8a5ce9302
Build(deps): Bump colored2 from 3.1.2 to 4.0.0 (#23247)
Bumps [colored2](https://github.com/kigster/colored2) from 3.1.2 to 4.0.0.
- [Release notes](https://github.com/kigster/colored2/releases)
- [Commits](https://github.com/kigster/colored2/compare/v3.1.2...v4.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-08-25 00:37:46 +02:00
Isaac Janzen eab3bfc8d0
DEV: Allow `ForgotPassword` `emailOrUsername` arg to be null (#23246) 2023-08-24 17:36:02 -05:00