Commit Graph

50708 Commits

Author SHA1 Message Date
Godfrey Chan 923b51ad25
DEV: add loader.js shims for packages used across bundles (#22703)
This adds a new `loaderShim()` function to ensure certain modules
are present in the `loader.js` registry and therefore runtime
`require()`-able.

Currently, the classic build pipeline puts a lot of things in the
runtime `loader.js` registry automatically. For example, all of
the ember-auto-import packages are in there.

Going forward, and especially as we switch to the Embroider build
pipeline, this will not be guarenteed. We need to keep an eye on
what modules (packages) our "external" bundles (admin, wizard,
markdown-it, plugins, etc) are expecting to be present and put
them into the registry proactively.
2023-08-09 12:04:41 +01:00
chapoi a846226e92
UX: micro animations chat input (#23030) 2023-08-09 12:58:36 +02:00
David Taylor ac85520813
DEV: Only reveal capybara finder timeouts if the spec otherwise passes (#23026)
Followup to edb276b9a9
2023-08-09 11:56:09 +01:00
Joffrey JAFFEUX 3a3346c95a
FIX: correctly applies aria-expanded/aria-controls (#23029) 2023-08-09 11:51:28 +02:00
dependabot[bot] 048796e678
Build(deps): Bump a11y-dialog in /app/assets/javascripts (#23028)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.0...8.0.1)

---
updated-dependencies:
- dependency-name: a11y-dialog
  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-08-09 11:47:43 +02:00
dependabot[bot] fcc69b497a
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23004)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [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.10/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-09 11:47:12 +02:00
dependabot[bot] f90445682e
Build(deps): Bump ember-cli-htmlbars in /app/assets/javascripts (#23021)
Bumps [ember-cli-htmlbars](https://github.com/ember-cli/ember-cli-htmlbars) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/ember-cli/ember-cli-htmlbars/releases)
- [Changelog](https://github.com/ember-cli/ember-cli-htmlbars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli-htmlbars/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: ember-cli-htmlbars
  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-09 11:26:42 +02:00
chapoi a1899996d0
UX: Add bookmark-delete icon (#23025) 2023-08-09 10:51:09 +02:00
dependabot[bot] 23f3ff2185
Build(deps): Bump google-protobuf from 3.23.4 to 3.24.0 (#23019)
Bumps [google-protobuf](https://github.com/protocolbuffers/protobuf) from 3.23.4 to 3.24.0.
- [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.23.4...v3.24.0)

---
updated-dependencies:
- dependency-name: google-protobuf
  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-08-09 16:03:52 +10:00
dependabot[bot] 000c094055
Build(deps): Bump mini_mime from 1.1.2 to 1.1.5 (#23020)
Bumps [mini_mime](https://github.com/discourse/mini_mime) from 1.1.2 to 1.1.5.
- [Changelog](https://github.com/discourse/mini_mime/blob/main/CHANGELOG)
- [Commits](https://github.com/discourse/mini_mime/compare/v1.1.2...v1.1.5)

---
updated-dependencies:
- dependency-name: mini_mime
  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-08-09 10:02:00 +10:00
Sérgio Saquetim 64c9cded17
DEV: Added visible/hidden methods on the SelectKit page component (#23018) 2023-08-08 18:45:04 -03:00
Sérgio Saquetim 3fcb9a6481
DEV: Added page object for the login modal (#23017) 2023-08-08 18:44:52 -03:00
Joffrey JAFFEUX 5de86ad7ed
FIX: removes useless model reload (#23016)
I suspect it was moreover possibly related to a flaky spec:

```
  1) Chat::AutoJoinChannelBatch.call when arguments are valid when channel is found when more than one membership is created publishes an event
     Failure/Error: subject(:result) { described_class.call(params) }

     Mocha::ExpectationError:
       unexpected invocation: Chat::Publisher.publish_new_channel(#<Chat::CategoryChannel:0x401f28>, #<User::ActiveRecord_Relation:0x401f50>)
       unsatisfied expectations:
       - expected exactly once, invoked never: Chat::Publisher.publish_new_channel(#<Chat::CategoryChannel:0x401f78>, [#<User:0x401fa0>, #<User:0x401fc8>])
       satisfied expectations:
       - allowed any number of times, invoked once: Chat::Action::CreateMembershipsForAutoJoin.call(has_entries({:channel => #<Chat::CategoryChannel:0x401f78>, :contract => instance_of(Chat::AutoJoinChannelBatch::Contract)}))
       - allowed any number of times, invoked never: Chat::ChannelMembershipManager.new(#<Chat::CategoryChannel:0x401f78>)
       - allowed any number of times, invoked never: #<Mock:0x402018>.recalculate_user_count(any_parameters)
     # ./plugins/chat/app/services/chat/auto_join_channel_batch.rb:65:in `publish_new_channel'
     # ./plugins/chat/app/services/service/base.rb:118:in `instance_exec'
     # ./plugins/chat/app/services/service/base.rb:118:in `call'
     # ./plugins/chat/app/services/service/base.rb:368:in `block in run!'
     # ./plugins/chat/app/services/service/base.rb:368:in `each'
     # ./plugins/chat/app/services/service/base.rb:368:in `run!'
     # ./plugins/chat/app/services/service/base.rb:361:in `run'
     # ./plugins/chat/app/services/service/base.rb:229:in `call'
     # ./plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rb:50:in `block (3 levels) in <main>'
     # ./plugins/chat/spec/services/chat/auto_join_channel_batch_spec.rb:110:in `block (6 levels) in <main>'
     # ./spec/rails_helper.rb:393:in `block (2 levels) in <top (required)>'
```
2023-08-08 22:44:30 +02:00
Penar Musaraj cb5ae4dcfa
FIX: Search by tag context was broken (#23006) 2023-08-08 15:15:34 -04:00
Mark VanLandingham 1b63e046af
DEV: Plugin API method to replace post-menu buttons (#22995) 2023-08-08 14:00:45 -05:00
Discourse Translator Bot 5b6493ff4b
Update translations (#23013) 2023-08-08 15:42:28 +02:00
Jordan Vidrine 4d2d31e68a
Revert "UX: Simplify and redesign summary skeleton (#22965)" (#23012)
This reverts commit bd19f0c9f1.
2023-08-08 07:55:37 -05:00
David Taylor 655e99491a
DEV: Convert discovery routes to native class syntax (#23010) 2023-08-08 13:52:34 +01:00
Renato Atilio 904ab8deaa
FIX: avoid eager rewrite of /my* routes (#23011) 2023-08-08 09:43:41 -03:00
Jan Cernik b7953b2562
FIX: Don't create a reviewable when sending PM to user in chat (#22914)
The change is mainly to improve the consistency between flagging a chat message and flagging a post. This, in particular skips creating a reviewable when sending a PM to the user using the option "Send @user a message" from the flag menu.

Context: https://meta.discourse.org/t/send-message-to-user-flags-create-review-item-in-chat/272362
2023-08-08 13:18:34 +02:00
David Taylor edb276b9a9
DEV: Raise exception when capybara finder times out (#22686)
If a selenium finder takes the full wait duration to resolve, that means it has been written inefficiently. Most likely a matcher has been negated incorrectly.

This commit introduces a patch which will raise an error in this situation so that we can catch the issues while developing specs.

This commit also fixes chat's visit_thread helper. It was spinning on `has_css?(".chat-skeleton")` for the full selenium wait duration, and then returns false. That's because the thread is often already fully loaded before `has_css?` is even called. It's now updated to only look for the final expected state.
2023-08-08 10:16:09 +01:00
Roman Agilov 3eac47443f
FEATURE: Add audio.com onebox provider (#22936)
* Audio.com provider added to onebox
* added specs for audio.com onebox provider
2023-08-08 16:55:04 +10:00
Martin Brennan 9a3f18f9bc
FIX: Cook hashtags in small action posts (#23008)
There is no decorateCooked equivalent for small action posts,
so we need to manually call decorateHashtags when there is a custom
message for small action posts in order for the hashtags to get
their coloured icon/square.
2023-08-08 15:38:37 +10:00
Krzysztof Kotlarek 3a0212d720
FIX: disable switch sidebar panel button after click (#23007)
Bug when you click fast on the switch panel button. It is happening because we are not waiting for the transition to finish before update state.

In addition, unused currentPanel property was removed.
2023-08-08 14:58:27 +10:00
David Battersby 175f6f6a14
FIX: allow lightbox cleanup on navigation changes (#22954)
Use dom:clean event to trigger lightbox clean up on navigation changes
2023-08-08 11:48:20 +08:00
Martin Brennan 09223e5ae7
DEV: Remove enable_experimental_hashtag_autocomplete logic (#22820)
This commit removes any logic in the app and in specs around
enable_experimental_hashtag_autocomplete and deletes some
old category hashtag code that is no longer necessary.

It also adds a `slug_ref` category instance method, which
will generate a reference like `parent:child` for a category,
with an optional depth, which hashtags use. Also refactors
PostRevisor which was using CategoryHashtagDataSource directly
which is a no-no.

Deletes the old hashtag markdown rule as well.
2023-08-08 11:18:55 +10:00
dependabot[bot] 0c88bf341a
Build(deps): Bump rack-protection from 3.0.6 to 3.1.0 (#23002)
Bumps [rack-protection](https://github.com/sinatra/sinatra) from 3.0.6 to 3.1.0.
- [Changelog](https://github.com/sinatra/sinatra/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sinatra/sinatra/compare/v3.0.6...v3.1.0)

---
updated-dependencies:
- dependency-name: rack-protection
  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-08 07:26:45 +08:00
dependabot[bot] 2644b05e28
Build(deps-dev): Bump @babel/standalone from 7.22.9 to 7.22.10 in /app/assets/javascripts (#23003)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.22.9 to 7.22.10.
- [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.10/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-08 07:26:15 +08:00
dependabot[bot] 71123c64e4
Build(deps-dev): Bump rubocop-rspec from 2.23.0 to 2.23.1 (#23001)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.23.0 to 2.23.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.23.0...v2.23.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  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-08 07:26:00 +08:00
Penar Musaraj 161d3d190a
A11Y: Fix selecting topic when navigation via keyboard (#22996)
This fixes:
- a regression from 30c152c, where navigating to a topic's last reply
  via keyboard would lose track of the topic when returning to the topic
  list
- an issue where if a topic's last post is a small post, navigating to it
   via keyboard would not focus the post

Co-authored-by: David Taylor <david@taylorhq.com>
2023-08-07 17:05:16 -04:00
Jordan Vidrine 976219ed5c
DEV: Add class when replies above exists (#23000) 2023-08-07 15:50:17 -05:00
Penar Musaraj 9e9aa8f653
UX: Differentiate focus state from hover state (#22985)
When a button gets a focused state via keyboard, it is highlighted a bit more than the hover or selected state.
2023-08-07 16:46:10 -04:00
Roman Rizzi 2485f5d5f6
FIX: Don't cut browse more message on the mobile app. (#22998)
Adds a padding-bottom to the wrapper to avoid cutting the message on the mobile app and sets a max-width to align with the timeline on the desktop.

Fixes a bug on mobile where we updated the preference, but the user had a single list.
2023-08-07 17:19:21 -03:00
David Taylor a38830c009
DEV: Avoid site-header error when rendering fails (#22993)
When Ember rendering fails for some reason, `this.header` will be undefined. This causes site-header to raise an error, which often gets printed to the console more obviously than the actual root cause.

This commit makes site-header fail more gracefully in this situation, to avoid it being a red-herring during development/debugging.
2023-08-07 17:03:13 +01:00
Joffrey JAFFEUX c996b7fe4b
FIX: prevents readonly mode to crash channel_messages#index (#22987)
Prior to this fix `context.membership&.update!(last_viewed_at: Time.zone.now)` would generate an update statement from a GET request which is not permitted by default when in readonly mode.

The usual fix in this case is to check for readonly or rescue an error, however, this common pattern of updating "last seen" or similar can be better handled in a `Schedule::Defer` block, which won't raise the `ActiveRecord::ReadOnlyError` when in readonly and will also prevent the controller to wait for this operation.
2023-08-07 16:34:22 +02:00
David Taylor b8d6c9bd45
DEV: Make `navigateToTopic` more robust for themes/plugins (#22992)
This function was previously expecting multiple services to be injected on any class that uses it. This kind of hidden requirement leads to some very difficult-to-debug situations, so this commit updates the function to lookup all its required services inline.
2023-08-07 15:28:17 +01:00
David Taylor a0e45a1e0c
DEV: Replace filter-mode mixin with lib functions (#22986)
The filter-mode mixin was previously serving two distinct purposes via a complex arrangement of getters/setters:

1. To calculate a filterMode, given values for category, filterType and noSubcategories

2. To calculate a filterType, given a filterMode

This commit splits the mixin into two functions, and updates all call sites to use them instead of the mixin.
2023-08-07 15:11:54 +01:00
David Taylor 7f2e42c826
DEV: Introduce dynamic wrapper attributes in RenderGlimmer (#22991) 2023-08-07 13:27:26 +01:00
Martin Brennan 3e44f04ff5
DEV: Unskip chat delete message spec (#22951)
Skipped in https://github.com/discourse/discourse/pull/22862 but
it seems like that may have been a sidebar error, unskipping to
see if it's ok now
2023-08-07 11:04:10 +10:00
Keegan George 1ded0a1429
UX: Add disabled styling to `<DToggleSwitch/>` (#22988) 2023-08-04 15:20:56 -07:00
Keegan George 282e43d806
DEV: Pluralize support for form template error strings (#22983) 2023-08-04 14:26:27 -07:00
David Taylor f9361b9eda
DEV: Modernise navigation controllers (#22982)
Converts to native class syntax, native getters, and removes unused properties
2023-08-04 16:48:31 +01:00
David Taylor ae95260645 DEV: Convert AbstractTopicRoute to native class syntax 2023-08-04 15:50:28 +01:00
David Taylor a502eb1097 DEV: Refactor build-topic-route to define abstract controller
This makes more sense (and is likely faster) than redefining the entire route for every call to `buildTopicRoute`. Also moves the top-specific logic into the route rather than injecting it via an initializer.

Similar to d5107d1aba
2023-08-04 15:50:28 +01:00
Mark VanLandingham 14348fc2f5
FIX: Attempt to connect with navigator.onLine is initially false (#22981) 2023-08-04 09:43:45 -05:00
Bianca Nenciu 1d58dcac1f
FIX: Use only first character when looking up emoji (#22977)
The other characters may be variation selectors and result in a
false-negative.
2023-08-04 15:28:58 +02:00
Ted Johansson 207d983809
FIX: Account for empty string setting values when migrating category settings (#22979)
This migration that populates category setting data from custom fields did not account for the fact that custom fields that expect an integer can still be an empty string. An empty string can't be inserted into the new integer type column.

If the setting is an empty string, cast it to NULL.
2023-08-04 20:57:48 +08:00
David Taylor b7e642d99d
DEV: Introduce decorator-position lint rule (#22937) 2023-08-04 12:26:06 +01:00
David Taylor e76e0ad592
DEV: In development, refresh client when theme changes are made (#22978)
This brings the theme development experience (via the discourse_theme cli) closer to the experience of making javascript changes in Discourse core/plugins via Ember CLI. Whenever a change is made to a non-css theme field, all clients will be instructed to immediately refresh via message-bus.
2023-08-04 11:02:26 +01:00
Jarek Radosz 28dc222e2f
FIX: Quoting text selection across elements (#22974)
Regressed in https://github.com/discourse/discourse/pull/22802

Tests to follow next week
2023-08-04 08:30:56 +02:00