Commit Graph

48124 Commits

Author SHA1 Message Date
dependabot[bot] 6c9f84b302
Build(deps): Bump redis from 4.8.0 to 4.8.1 (#20251)
Bumps [redis](https://github.com/redis/redis-rb) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/redis/redis-rb/releases)
- [Changelog](https://github.com/redis/redis-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/redis-rb/compare/v4.8.0...v4.8.1)

---
updated-dependencies:
- dependency-name: redis
  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-02-13 01:14:19 +01:00
Gerhard Schlager 71658e63f7 DEV: Fix typo
@discourse-translator-bot keep_translations_and_approvals
2023-02-13 00:46:33 +01:00
Gerhard Schlager 57e3d2268a UX: Fix confusing error message 2023-02-13 00:46:33 +01:00
Gerhard Schlager 1ef38054ab UX: Add missing backtick to string 2023-02-13 00:46:33 +01:00
Gerhard Schlager 32c014647d
Remove unused string (#20256)
"block" was renamed to "silence" in 1f14350220, but we missed removing that string
2023-02-13 00:46:10 +01:00
Gerhard Schlager 1d7e21a338
DEV: Replace concatenated string (#20254) 2023-02-13 00:45:55 +01:00
dependabot[bot] 0525e2fb98
Build(deps-dev): Bump syntax_tree from 5.3.0 to 6.0.0 (#20247)
Bumps [syntax_tree](https://github.com/kddnewton/syntax_tree) from 5.3.0 to 6.0.0.
- [Release notes](https://github.com/kddnewton/syntax_tree/releases)
- [Changelog](https://github.com/ruby-syntax-tree/syntax_tree/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kddnewton/syntax_tree/compare/v5.3.0...v6.0.0)

---
updated-dependencies:
- dependency-name: syntax_tree
  dependency-type: direct:development
  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-02-13 00:20:06 +01:00
dependabot[bot] 2eb74d1f07
Build(deps): Bump zeitwerk from 2.6.6 to 2.6.7 (#20253)
Bumps [zeitwerk](https://github.com/fxn/zeitwerk) from 2.6.6 to 2.6.7.
- [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.6...v2.6.7)

---
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-02-13 00:18:16 +01:00
dependabot[bot] 7f6559a038
Build(deps): Bump eslint in /app/assets/javascripts (#20249)
Bumps [eslint](https://github.com/eslint/eslint) from 8.33.0 to 8.34.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.33.0...v8.34.0)

---
updated-dependencies:
- dependency-name: eslint
  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-02-13 00:17:33 +01:00
dependabot[bot] 3e94903203
Build(deps): Bump parser from 3.2.0.0 to 3.2.1.0 (#20248)
Bumps [parser](https://github.com/whitequark/parser) from 3.2.0.0 to 3.2.1.0.
- [Release notes](https://github.com/whitequark/parser/releases)
- [Changelog](https://github.com/whitequark/parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/whitequark/parser/compare/v3.2.0.0...v3.2.1.0)

---
updated-dependencies:
- dependency-name: parser
  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-02-13 00:17:12 +01:00
Joffrey JAFFEUX e4738cb1bc
FIX: correctly listens to chat notifications (#20246)
This change will ensure we enter and subscribe to presence channels on start and will use the correct "change" events from presence channel to update state.
2023-02-12 23:26:11 +01:00
Sam 5fb6dd9bfa
FIX: account for cursor drift when completing terms (#19660)
Previously after uploads completed post raw would drift.
If you autocompleted text after the upload stub got replaced it would
insert in the wrong position.
2023-02-13 09:25:12 +11:00
Krzysztof Kotlarek 85fbe3f628
FIX: IconPicker option to display only available icons (#20235)
Not all icons are shipped by default. Sidebar section icon picker should only display available icons.
2023-02-13 09:24:47 +11:00
Gerhard Schlager d84d38cbe7
FIX: Replace hard-coded string with translation (#20245) 2023-02-11 14:50:53 +01:00
Kris 8bc9acc414
A11Y: Header icons should be buttons, not links (#20242) 2023-02-10 13:55:51 -05:00
Kris 3e826a67d1
A11Y: add aria-label to header notification counts (#20231) 2023-02-10 13:11:20 -05:00
Penar Musaraj 827df072a6
DEV: Fix a flakey test (#20241)
The `Composer - current time` test would sometimes fail due to a
1-second difference. We don't really need per-second fidelity here, the
key thing this needs to test is that the shortcut works and adds today's
date. I have updated the test to reflect that.
2023-02-10 11:37:11 -05:00
chapoi 47abe61994
UX: add flex alignment for form actions (#20240) 2023-02-10 07:35:18 -06:00
dependabot[bot] ae03d25cdd
Build(deps): Bump regexp_parser from 2.6.2 to 2.7.0 (#20233)
Bumps [regexp_parser](https://github.com/ammar/regexp_parser) from 2.6.2 to 2.7.0.
- [Release notes](https://github.com/ammar/regexp_parser/releases)
- [Changelog](https://github.com/ammar/regexp_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ammar/regexp_parser/compare/v2.6.2...v2.7.0)

---
updated-dependencies:
- dependency-name: regexp_parser
  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>
2023-02-10 13:04:53 +01:00
Jan Cernik 8121565631
FIX: Chat's user autocomplete threw errors (#20236) 2023-02-10 11:41:46 +01:00
Martin Brennan c9776fe84d
DEV: Change setActiveChannel to get/set in services/chat (#20237)
Per PR comment in #20209, we don't need to do setActiveChannel,
we can just use native get/set instead.
2023-02-10 11:41:29 +01:00
Krzysztof Kotlarek cbd021db15
FIX: add index to sidebar_section_link (#20234)
Index on linkable_type and linkable_id should increase performance of this subquery https://github.com/discourse/discourse/blob/main/app/services/sidebar_site_settings_backfiller.rb#L86

Also, distinct is removing duplicates which are unnecessary.
2023-02-10 11:14:22 +11:00
Keegan George 6338287e89
UX: Easily toggle badges in admin badge list (#20225) 2023-02-09 11:36:27 -08:00
Penar Musaraj 58123e8089
Revert "UX: flex horizontal form controls (#20098)" (#20228)
This reverts commit 15b546978f.
2023-02-09 12:35:15 -05:00
David Taylor 25fabccd59
DEV: Enable parallel babel processing in ember-cli (#20215)
Ember CLI will automatically run babel transformations in parallel when the config is 'serializable', and can therefore be applied in multiple processes automatically. If any plugin is defined in an unserializable way, parallelisation will be disabled.

Our discourse-widget-hbs transformer was causing parallelisation to be disabled. This commit fixes that, and also enables the throwUnlessParallelizable flag so that we catch this kind of issue more easily in future.

This commit also refactors our deprecation silencing system into its own file, and uses a fake babel plugin to ensure deprecations are silenced in babel worker processes.

In our GitHub CI jobs, this doubles the speed of ember builds (1m30s -> 45s). It should also improve production deploy times, and cold-start dev builds.
2023-02-09 16:24:24 +00:00
David Taylor db42917563
DEV: Resolve user_option deprecations (#20192) 2023-02-09 16:05:42 +00:00
dependabot[bot] a8b145547e
Build(deps): Bump @babel/standalone in /app/assets/javascripts (#20153)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.20.14 to 7.20.15.
- [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.20.15/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  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-02-09 14:51:03 +00:00
Andrei Prigorshnev 0dcfd7ddec
DEV: correct a relationship – a chat message may have several mentions (#20219)
This change only makes the model reflect correctly what's 
already happening in the database. Note that there are no calls 
to chat_message.chat_mention in Core and plugins so this 
change should be safe.

Also note, that at the moment we use the chat_mentions db 
table only to support notifications about mentions, but 
we're going to start using it for other cases. This commit is 
the first step in that direction.
2023-02-09 17:44:04 +04:00
David Taylor 45412206f7 DEV: Apply updated syntax_tree 2023-02-09 13:19:56 +00:00
dependabot[bot] f0322e991f Build(deps-dev): Bump syntax_tree from 5.2.0 to 5.3.0
Bumps [syntax_tree](https://github.com/kddnewton/syntax_tree) from 5.2.0 to 5.3.0.
- [Release notes](https://github.com/kddnewton/syntax_tree/releases)
- [Changelog](https://github.com/ruby-syntax-tree/syntax_tree/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kddnewton/syntax_tree/compare/v5.2.0...v5.3.0)

---
updated-dependencies:
- dependency-name: syntax_tree
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 13:19:56 +00:00
dependabot[bot] 5dc28ceb1b
Build(deps-dev): Bump test-prof from 1.1.0 to 1.2.0 (#20223)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.1.0 to 1.2.0.
- [Release notes](https://github.com/test-prof/test-prof/releases)
- [Changelog](https://github.com/test-prof/test-prof/blob/master/CHANGELOG.md)
- [Commits](https://github.com/test-prof/test-prof/compare/v1.1.0...v1.2.0)

---
updated-dependencies:
- dependency-name: test-prof
  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-02-09 12:24:04 +01:00
Aleksey Bogdanov e216a98f74
FIX: stop youtube autoplay on scrollups (#19951)
When a user pauses a youtube video and scrolls up high enough to load
new posts, the video either rewinds or restarts depending on the browser.
The problem is solved by patching virtual-dom to handle element prepends
without reordering old elements.

Long-term, Discourse intends to move away from the vdom/widget implementation, so this is intended as a short-term solution. More context at https://meta.discourse.org/t/57692

Co-authored-by: David Taylor <david@taylorhq.com>
2023-02-09 10:46:10 +00:00
Krzysztof Kotlarek f1a52db0a0
Revert "FIX: IconPicker option to display only available icons (#20226)" (#20227)
This reverts commit fc166258d3.
2023-02-09 15:20:34 +11:00
GeckoLinux d1e844841d
Fix occasional bug in order of imported comments (#20204)
This bug is actually a Drupal issue where some edited posts have their `created` and `changed` timestamps set to the same value. But even when that happens in Drupal it still maintains the correct post order in an affected thread. This PR makes the Discourse importer also maintain the original Drupal comment order by sorting comments in the source DB by their `cid`, which is sequential and never changes. More details from this post onward:
https://meta.discourse.org/t/large-drupal-forum-migration-importer-errors-and-limitations/246939/24?u=rahim123
2023-02-08 22:20:46 -05:00
Krzysztof Kotlarek fc166258d3
FIX: IconPicker option to display only available icons (#20226)
Not all icons are shipped by default. Sidebar section icon picker should only display available icons.
2023-02-09 14:20:04 +11:00
Penar Musaraj a0ea17faea
FEATURE: Add shortcut to insert current time in composer (#20216)
Hitting `Ctrl+Shift+.` on Windows and `Command+Shift+.` on Mac will insert the current time in the composer.
2023-02-08 21:38:23 -05:00
Keegan George 5a94b33b3f
DEV: Assign `TODO` to `@keegan` (#20224) 2023-02-08 17:01:52 -08:00
Kris beee9623ec
UX: improve layout of keyboard shortcut modal (#20220) 2023-02-08 16:39:32 -05:00
Gerhard Schlager 58875b818b
FEATURE: Create SQL-only backup if there are no uploads (#20221)
It doesn't make sense to double-compress the backup when there are no uploads even when the admin requested a backup with uploads.
2023-02-08 21:40:15 +01:00
Keegan George 871607a420
DEV: Create form templates (#20189) 2023-02-08 11:21:39 -08:00
Isaac Janzen 7622dbcebf
DEV: Add global glimmer-topic-timeline site setting (#20203)
Remove the per user groups based site setting in favor of a global site setting as we want to roll the glimmer topic timeline out to anon users as well as site users.

- Add `enable_experimental_topic_timeline` site setting
- Remove `enable_experimental_topic_timeline_groups` site setting
2023-02-08 12:02:24 -06:00
Isaac Janzen 96c1fad2fe
UX: Fix `timeline-handle` positioning (#20217)
Positioning of the timeline handle was slightly off on the glimmer-topic-timeline

# Before
<img width="451" alt="Screenshot 2023-02-08 at 11 30 18 AM" src="https://user-images.githubusercontent.com/50783505/217606919-2f07b69f-4820-4b72-805b-ed28b34c79dc.png">


# After
<img width="447" alt="Screenshot 2023-02-08 at 11 29 53 AM" src="https://user-images.githubusercontent.com/50783505/217606811-977f52df-6070-4127-80c1-27c97174a9a7.png">
2023-02-08 12:01:14 -06:00
Régis Hanol 7eb6223b04
FIX: return valid JSON when a post in enqueued (#20214)
When a post is created using the API and goes into the review queue, we
would return a 'null' string in the response which isn't valid JSON.

Internal ref: /t/92419

Co-authored-by: Leonardo Mosquera <ldmosquera@gmail.com>
2023-02-08 14:27:26 +01:00
dependabot[bot] dc43de6f03
Build(deps-dev): Bump ruby-prof from 1.4.5 to 1.5.0 (#20200)
Bumps [ruby-prof](https://github.com/ruby-prof/ruby-prof) from 1.4.5 to 1.5.0.
- [Release notes](https://github.com/ruby-prof/ruby-prof/releases)
- [Changelog](https://github.com/ruby-prof/ruby-prof/blob/master/CHANGES)
- [Commits](https://github.com/ruby-prof/ruby-prof/compare/1.4.5...1.5.0)

---
updated-dependencies:
- dependency-name: ruby-prof
  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-02-08 12:46:38 +01:00
dependabot[bot] b19749cf30
Build(deps-dev): Bump parallel_tests from 4.1.0 to 4.2.0 (#20201)
Bumps [parallel_tests](https://github.com/grosser/parallel_tests) from 4.1.0 to 4.2.0.
- [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/v4.1.0...v4.2.0)

---
updated-dependencies:
- dependency-name: parallel_tests
  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-02-08 12:46:22 +01:00
chapoi d33d98f9c1
FIX: changed classname for YT images (#20212) 2023-02-08 05:57:36 +01:00
Krzysztof Kotlarek 7332873051
FIX: hide add section button (#20208)
Custom section feature is currently hidden behind feature flag - https://github.com/discourse/discourse/blob/main/app/assets/javascripts/discourse/app/components/sidebar/user/sections.hbs#L3

In last PR, add section button was moved to footer. It should be hidden as well.
2023-02-08 13:08:05 +11:00
Krzysztof Kotlarek 6e1f3e0023
FIX: improvements for user custom sections (#20190)
Improvements for this PR: https://github.com/discourse/discourse/pull/20057

What was fixed:
- [x] Use ember transitions instead of full reload
- [x] Link was inaccurately kept active
- [x] "+ save" renamed to just "save"
- [x] Render emojis in link name
- [x] UI to set icon
- [x] Delete link is trash icon instead of "x"
- [x] Add another link to on the left and rewording
- [x] Raname "link name" -> "name", "points to" ->  link
- [x] Add limits to fields
- [x] Move add section button to the bottom
2023-02-08 11:45:34 +11:00
Martin Brennan 9a45b59fb5
FEATURE: Automatically create chat threads in background (#20206)
Whenever we create a chat message that is `in_reply_to` another
message, we want to lazily populate the thread record for the
message chain.

If there is no thread yet for the root message in the reply chain,
we create a new thread with the appropriate details, and use that
thread ID for every message in the chain that does not yet have
a thread ID.

* Root message (ID 1) - no thread ID
    * Message (ID 2, in_reply_to 1) - no thread ID
    * When I as a user create a message in reply to ID 2, we create a thread and apply it to ID 1, ID 2, and the new message

If there is a thread for the root message in the reply chain, we
do not create one, and use the thread ID for the newly created chat
message.

* Root message (ID 1) - thread ID 700
    * Message (ID 2, in_reply_to 1) - thread ID 700
    * When I as a user create a message in reply to ID 2, we use the existing thread ID 700 for the new message

We also support passing in the `thread_id` to `ChatMessageCreator`,
which will be used when replying to a message that is already part of
a thread, and we validate whether that `thread_id` is okay in the context
of the channel and also the reply chain.

This work is always done, regardless of channel `thread_enabled` settings
or the `enable_experimental_chat_threaded_discussions` site setting.

This commit does not include a large data migration to backfill threads for
all existing reply chains, its unnecessary to do this so early in the project,
we can do this later if necessary.

This commit also includes thread considerations in the `MessageMover` class:

* If the original message and N other messages of a thread is moved,
   the remaining messages in the thread have a new thread created in
   the old channel and are moved to it.
* The reply chain is not preserved for moved messages, so new threads are
   not created in the destination channel.

In addition to this, I added a fix to also clear the `in_reply_to_id` of messages
in the old channel which are moved out of that channel for data cleanliness.
2023-02-08 10:22:07 +10:00
Martin Brennan 1a6f6d1dc4
Revert "FEATURE: Automatically create chat threads in background (#20132)" (#20205)
This reverts commit 37e6e3be7f.
2023-02-08 09:59:18 +10:00