Commit Graph

49319 Commits

Author SHA1 Message Date
Kris 4cca7de22d
UX: two column dropdown sidebar layout (#21288) 2023-05-01 10:41:28 -04:00
dependabot[bot] 96a3830c48
Build(deps): Bump mini_portile2 from 2.8.1 to 2.8.2 (#21312)
Bumps [mini_portile2](https://github.com/flavorjones/mini_portile) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/flavorjones/mini_portile/releases)
- [Changelog](https://github.com/flavorjones/mini_portile/blob/main/CHANGELOG.md)
- [Commits](https://github.com/flavorjones/mini_portile/compare/v2.8.1...v2.8.2)

---
updated-dependencies:
- dependency-name: mini_portile2
  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-05-01 08:09:59 +08:00
dependabot[bot] 2e92c0bb29
Build(deps-dev): Bump better_errors from 2.9.1 to 2.10.0 (#21315)
Bumps [better_errors](https://github.com/BetterErrors/better_errors) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/BetterErrors/better_errors/releases)
- [Commits](https://github.com/BetterErrors/better_errors/compare/v2.9.1...v2.10.0)

---
updated-dependencies:
- dependency-name: better_errors
  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-05-01 08:09:43 +08:00
dependabot[bot] c262f937ef
Build(deps): Bump zeitwerk from 2.6.7 to 2.6.8 (#21314)
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.6.7 to 2.6.8.
- [Release notes](https://github.com/fxn/zeitwerk/releases)
- [Changelog](https://github.com/fxn/zeitwerk/blob/main/CHANGELOG.md)
- [Commits](https://github.com/fxn/zeitwerk/compare/v2.6.7...v2.6.8)

---
updated-dependencies:
- dependency-name: zeitwerk
  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-05-01 08:09:30 +08:00
Alan Guo Xiang Tan b06a154bb1
DEV: Use `\A` and `\z` instead of `^` and `$` in `TopicsFilter` (#21316)
`^` and `$` matches per line which is technically not what we want.
2023-05-01 08:09:08 +08:00
Joffrey JAFFEUX 3e50a81d96
DEV: potential flakey fixes (#21309) 2023-04-29 00:15:51 +02:00
Blake Erickson e2fbf4865a
DEV: Check if video thumbnails site setting is enabled (#21306) 2023-04-28 14:08:20 -06:00
Joffrey JAFFEUX cd24656570
DEV: potential flakey specs fixes (#21307) 2023-04-28 22:06:27 +02:00
Blake Erickson 0dea991156
FIX: Empty video thumbnails (#21290)
* FIX: Empty video thumbnails

This fix ensures that topic video thumbnail generation is completed
before the composer is allowed to submit which should prevent some bugs
around missing thumbnails on video topics.

* move callback to on upload-success
2023-04-28 12:14:36 -06:00
Joffrey JAFFEUX 0239e88809
UX: cook message before sending edit (#21303)
This allows for instant feedback in the UI.
2023-04-28 20:11:57 +02:00
Mark VanLandingham 7f0682f4f2
DEV: Wrap remote theme update in transaction (#21302) 2023-04-28 12:11:53 -05:00
Joffrey JAFFEUX 290bd975c5
FIX: correctly differentiates channel/thread upload inputs (#21301)
Prior to this fix uploads event could end up in the wrong textarea. This will most importantly allow pasting an image in the thread composer.

Also fixes a minor padding issue on thread when uploads are associated to it.
2023-04-28 19:08:55 +02:00
Jarek Radosz 4a08c23965
DEV: Show select-kit deprecations in non-dev envs (#21297)
We should have them in CI ;) (silenced for now, fixing them is not a priority)
2023-04-28 17:58:41 +02:00
Penar Musaraj a67c96438c
UX: Fix user onebox layout (#21284) 2023-04-28 09:50:49 -04:00
Joffrey JAFFEUX 69696843c6
FIX: allows youtube embeds to respect the `t` param (#21295) 2023-04-28 15:46:27 +02:00
Mark VanLandingham 36d388b57f
Revert "FEATURE: Reimplement offline indicator (#21285)" (#21296)
This reverts commit de1066abcd.
2023-04-28 06:59:10 -05:00
Mark VanLandingham de1066abcd
FEATURE: Reimplement offline indicator (#21285) 2023-04-28 06:32:35 -05:00
Joffrey JAFFEUX 1403064835
FIX: correctly homogenizes panels min width (#21294)
`.chat-channel` had `300px` min width, when `.chat-drawer` was `250px`, resulting in overflowing channel when in drawer. This commits ensures the limits are always set at `250px`.
2023-04-28 13:05:00 +02:00
Joffrey JAFFEUX e4029bfab8
FIX: chat height was incorrect on ipad (#21289) 2023-04-28 10:51:23 +02:00
chapoi f29f131387
UX: composer use BEM + small tweaks to enabled/disabled styling (#21246)
- using BEM notation
- making animation linear instead of default ease
- small tweaks to composer state (disabled/send-disabled/send-enabled)
- fixing bug with disabled composer on mobile
2023-04-28 10:24:49 +02:00
Natalie Tay eb0836e133
UX: Add a warning that updating min_trust_level_for_user_api_key will disable users from using DiscourseHub (#21291) 2023-04-28 14:29:13 +08:00
dependabot[bot] 4f3749f0b8
Build(deps): Bump async from 2.6.3 to 2.6.4 (#21183)
Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](https://github.com/caolan/async/compare/v2.6.3...v2.6.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 21:29:21 +02:00
dependabot[bot] fe3944f188
Build(deps): Bump webpack in /app/assets/javascripts (#21272)
Bumps [webpack](https://github.com/webpack/webpack) from 5.79.0 to 5.81.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.79.0...v5.81.0)

---
updated-dependencies:
- dependency-name: webpack
  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-04-27 20:45:49 +02:00
Daniel Waterworth ae63d9ea09
PERF: Remove unnecessary queries from Theme#set_field (#21281) 2023-04-27 13:04:58 -05:00
Mark VanLandingham 3527fbcd8e
Revert "FEATURE: Service to track message bus connectivity + offline indicator(#21259)" (#21282)
This reverts commit 6bba514b64.
2023-04-27 12:55:41 -05:00
Mark VanLandingham 6bba514b64
FEATURE: Service to track message bus connectivity + offline indicator(#21259) 2023-04-27 11:04:56 -05:00
David Taylor f5fa1ef771
UX: Use dvh for sidebar height (#21278)
This will automatically adjust when browser UI is shown/hidden (e.g. when scrolling up/down on mobile Safari).

Similar approach to c82094cd9d, which targeted the 'slide-in' version of menus.
2023-04-27 16:31:09 +01:00
Loïc Guitaut c4c2da83b4 DEV: Set limits for text fields in badges 2023-04-27 17:22:32 +02:00
Selase Krakani 552697e194
DEV: Add deprecation warning for user_badge_removed event (#21255)
`user_badge_removed` event has been replaced with `user_badge_revoked`
2023-04-27 13:07:02 +00:00
Andrei Prigorshnev e49d338c21
DEV: extract updating status on mentions into a lib function (#21265)
We'll be using this lib function for adding status to mentions in chat.
It's covered with tests in post-inline-mentions-test.js.
2023-04-27 16:02:21 +04:00
Loïc Guitaut a89b3c27aa DEV: set limits for text fields on groups 2023-04-27 13:58:46 +02:00
Sam 2ccc5fc66e
FEATURE: add support for figure and figcaption tags in embeddings (#21276)
Many blog posts use these to illustrate and images were previously omitted

Additionally strip superfluous HTML and BODY tags from embed HTML.

This was incorrectly returned from server.
2023-04-27 19:57:06 +10:00
dependabot[bot] 0b479d0137
Build(deps): Bump sass-embedded from 1.62.0 to 1.62.1 (#21270)
Bumps [sass-embedded](https://github.com/ntkme/sass-embedded-host-ruby) from 1.62.0 to 1.62.1.
- [Release notes](https://github.com/ntkme/sass-embedded-host-ruby/releases)
- [Commits](https://github.com/ntkme/sass-embedded-host-ruby/compare/v1.62.0...v1.62.1)

---
updated-dependencies:
- dependency-name: sass-embedded
  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-04-27 11:02:51 +02:00
Alan Guo Xiang Tan 6e5e607072
DEV: Support ordering filters on `/filter` route (#21275)
This commit adds support for the following ordering filters:

1. `order:activity` which orders the topics by `Topic#bumped_at` in descending order
2. `order:activity-asc` which orders the topics by `Topic#bumped_at` in ascending order
3. `order:latest-post` which orders the topics by `Topic#last_posted_at` in descending order
4. `order:latest-post-asc` which orders the topics by `Topic#last_posted_at` in ascending order
5. `order:created` which orders the topics by `Topic#created_at` in descending order
6. `order:created-asc` which orders the topics by `Topic#created_at` in ascending order
7. `order:views` which orders the topics by `Topic#views` in descending order
8. `order:views-asc` which orders the topics by `Topic#views` in ascending order
9. `order:likes` which orders the topics by `Topic#likes` in descending order
10. `order:likes-asc` which orders the topics by `Topic#likes` in ascending order
11. `order:likes-op` which orders the topics by `Post#like_count` of the first post in the topic in descending order
12. `order:likes-op-asc` which orders the topics by `Post#like_count` of the first post in the topic in ascending order
13. `order:posters` which orders the topics by `Topic#participant_count` in descending order
14. `order:posters-asc` which orders the topics by `Topic#participant_count` in ascending order
15. `order:category` which orders the topics by `Category#name` of the topic's category in descending order
16. `order:category-asc` which orders the topics by `Category#name` of the topic's category in ascending order

Multiple order filters can be composed together and the order of ordering is applied based on the position of the filter
in the query string. For example, `order:views order:created` will order the topics by `Topic#views` in descending order
and then order the topics by `Topics#created_at` in descending order.
2023-04-27 15:44:58 +08:00
Alan Guo Xiang Tan 141555136a
DEV: Support filtering by date columns on /filter route (#21233)
This commit adds support for the following date filters:

1. `activity-before:<YYYY-MM-DD>` which filters for topics that have been bumped at or before given date
2. `activity-after:<YYYY-MM-DD>` which filters for topics that have been bumped at or after given date
3. `created-before:<YYYY-MM-DD>` which filters for topics that have been created at or before given date
4. `created-after:<YYYY-MM-DD>` which filters for topics that have been created at or after given date
5. `latest-post-before:<YYYY-MM-DD>` which filters for topics with the
latest post posted at or before given date
6. `latest-post-after:<YYYY-MM-DD>` which filters for topics with the
latest post posted at or after given date

If the filter has an invalid value, i.e string that cannot be converted
into a proper date in the `YYYY-MM-DD` format, the filter will be ignored.

If either of each filter is specify multiple times, only the last
occurrence of each filter will be taken into consideration.
2023-04-27 15:43:47 +08:00
Joffrey JAFFEUX e5ec0b84a9
DEV: fix a spec and skips another one (#21277)
- It seems that `window_opened_by/within_window` it not reliable in our current setup/test
- System specs should avoid at all cost to rely on backend state, any change should be visible one way or another on the front to be properly tested
2023-04-27 09:43:26 +02:00
Penar Musaraj 3abc542e63
FIX: Include group flair in homepage category topic lists (#21268)
Followup to c03f83bbea.

The `flair_group_id` parameter is now required to show the flair, and this serializer was missing that detail. 

This also fixes a typo in the `include_flair_group_name?` method.
2023-04-27 10:18:16 +08:00
dependabot[bot] b988f13817
Build(deps): Bump sass from 1.62.0 to 1.62.1 in /app/assets/javascripts (#21273)
Bumps [sass](https://github.com/sass/dart-sass) from 1.62.0 to 1.62.1.
- [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.62.0...1.62.1)

---
updated-dependencies:
- dependency-name: sass
  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-04-27 09:03:12 +08:00
Selase Krakani 37cc056c1b
FIX: Ensure group-filtered group user event webhooks fire (#21254)
Group user event webhooks filtered by group fail silently
because the `group_ids` job arg wasn't being passed into the job.

This change add's `group_ids` to the `EmitWebHookEvent` jobs queued for
`user_added_to_group` and `user_removed_from_group` events.
2023-04-26 22:38:28 +00:00
Penar Musaraj 3c4241c0b6
A11Y: Use correct structure for badge headings (#21267) 2023-04-26 17:40:00 -04:00
Blake Erickson 67a8c13197
DEV: Create a site setting for video thumbnails (#21266)
Creating a way to disable the auto generation of video thumbnails.
2023-04-26 14:18:59 -06:00
Isaac Janzen c6d44e504f
DEV: Remove legacy resolver (#21263) 2023-04-26 13:39:15 -05:00
Joffrey JAFFEUX 7f803a0335
FIX: ensures thread is cleared when closing it (#21264) 2023-04-26 20:37:58 +02:00
Joffrey JAFFEUX 36db953bc6
FIX: cancels saving draft when composer is destroyed (#21260) 2023-04-26 19:42:57 +02:00
Joffrey JAFFEUX d381629655
FIX: correct border color of message actions (#21261)
This is a followup of 1372c5c435
2023-04-26 19:42:04 +02:00
Joffrey JAFFEUX fcbb753378
DEV: skips flakey spec (#21262) 2023-04-26 19:41:34 +02:00
Bianca Nenciu 024b8b2640
FIX: Show large image placeholder for image onebox (#21237)
Large or broken images are removed from oneboxes, but sometimes images
were removed when they were oneboxed too. The reason is that images can
be oneboxed by the AllowlistedGenericOnebox or ImageOnebox and only
AllowlistedGenericOnebox was handled correctly.
2023-04-26 20:05:22 +03:00
Jarek Radosz a1b35601fc
FIX: Improve chat route cleanup (#20557)
1. `this.chat.activeChannel = null` was being done in twice
2. using `willTransition()` and checking transition.to.name prefix for route cleanup rather than using `deactivate()` was unnecessarily verbose and could be premature (if something aborted the transition you'd end up in a broken state)
3. `activeChannel` on Chat service can be null, check for that before accessing
2023-04-26 18:18:23 +02:00
Joffrey JAFFEUX 6487c8ef24
FIX: properly respects chat_minimum_message_length (#21256)
Before this fix we were only considering `>` and not `>=`, this also adds two tests.
2023-04-26 17:35:35 +02:00
Joffrey JAFFEUX 731282c2ec
FIX: attempts to make cooking less order dependent (#21253)
It's very hard to repro but under specific circumstances I suspect it was possible for this sequence to happen:

- set message TEXT
- cooking starts
- set message COOKED through another mean (like a message bus)
- the cooking started sooner finished and erases the cooked set at the step before causing the message to have the incorrect cooked
2023-04-26 16:50:38 +02:00