Commit Graph

49913 Commits

Author SHA1 Message Date
Keegan George
c3fa85c450
UX: Make template fields fill the container width (#22334) 2023-06-28 13:29:36 -07:00
Keegan George
c0707897ef
DEV: Make max length of template and name admin configurable (#22332) 2023-06-28 12:49:19 -07:00
Keegan George
b6f03fcecd
DEV: Add support for uploads to form templates (#22232) 2023-06-28 12:49:05 -07:00
Mark VanLandingham
acaea2b5c5
DEV: Add plugin_modifier for groups in users_controller#search_users (#22329) 2023-06-28 14:04:22 -05:00
David Taylor
ed70b16db6
DEV: Resolve poll plugin deprecation (#22330)
When using native class syntax, `observes` must be imported from `@ember-decorators/object`
2023-06-28 17:53:45 +01:00
Neil Lalonde
d6a82f1034
DEV: Don't print plugin changes in details blocks (#22328) 2023-06-28 11:28:08 -04:00
Jarek Radosz
d40da76c8e
Revert "DEV: Update diffhtml from 1.0.0-beta.20 to 1.0.0-beta.29 (#22311)" (#22327) 2023-06-28 14:49:20 +02:00
Jarek Radosz
b74d0633d8
DEV: Fix default pretenders (#22326)
Prevent state leakage and update `/tags` to match the server
2023-06-28 13:59:17 +02:00
Ted Johansson
6fc62586a2
FEATURE: Show available interpolation keys when overriding translations (#22220)
This is the first of a number of PRs aimed at helping admins manage their translation overrides. It simply adds a list of available interpolation keys below the input field when editing an override.

It also includes custom interpolation key.
2023-06-28 19:03:04 +08:00
Jarek Radosz
7791bb1276
DEV: Update moment-timezone-with-data (#22313)
`Africa/Cairo` timezone introduced DST so I replaced it in tests with `America/Lima`
2023-06-28 11:33:55 +02:00
Jarek Radosz
80bd7d7509
DEV: Update diffhtml from 1.0.0-beta.20 to 1.0.0-beta.29 (#22311)
It was already up to date in package.json but wasn't plugged in.
2023-06-28 10:27:42 +02:00
Jarek Radosz
3ceed88854
DEV: Update chartjs-plugin-datalabels from 2.0.0 to 2.2.0 (#22310)
It was already up to date in the package.json but it wasn't "plugged in"
2023-06-28 10:12:12 +02:00
Jarek Radosz
6efc4bb065
DEV: Update highlightjs from 11.6.0 to 11.8.0 (#22312) 2023-06-28 09:40:30 +02:00
Martin Brennan
ccdc0822a8
DEV: Fix flaky thread navigation spec (#22323)
Introduced in cec68b3e2c,
this is flaky because if you click the back button before
the route is fully transitioned to the loaded thread,
we end up going to the history _before_ the thread list,
which ends up being the channel.

We need to make sure that everything is loaded for the
thread first, meaning the skeleton is not there.

Also exclude some noise from the capybara logs (image load failures)
2023-06-28 17:20:05 +10:00
Martin Brennan
c4c566846d
DEV: Get rid of old chat TODOs (#22324)
These are all well-known things we need to deal with
(e.g. scrolling and granular read in thread panel) or just
unnecessary to keep around.
2023-06-28 17:16:03 +10:00
Martin Brennan
41ebbab4ff
FIX: Chat threads N1 (#22322)
Followup to 1526d1f97d

This commit fixes an N1 for mentions/user status
when querying chat threads. This only happened if
any of the thread OMs had mentions.
2023-06-28 15:41:51 +10:00
Alan Guo Xiang Tan
0d1d707213
FIX: Set Jobs::BackfillSidebarSiteSettings cluster concurrency to 1 (#22316)
What is the problem?

When an admin changes the default_sidebar_categories or default_sidebar_tags site settings and opts to backfill the setting,
we currently enqueue a sidekiq job to run the backfilling operation. When an admin changes those settings multiple times
within a short time frame, multiple sidekiq jobs with different backfilling parameters will be enqueued.
This is problematic if multiple jobs are executed concurrently as it may lead to situations where a job
with “outdated” site setting values is completed after a job with the “latest” site setting values.

What is the fix?

By setting `cluster_concurrency` to `1`, we ensure that only one of such
backfilling job will execute across all the sidekiq processes that are
deployed at any point in time. Since Sidekiq pops off job in the order
in which they are pushed, limiting the cluster concurrency here will
allow us to execute the enqueued `Jobs::BackfillSidebarSiteSettings`
jobs serially.
2023-06-28 13:07:46 +08:00
Martin Brennan
1526d1f97d
FEATURE: Sort thread list by unread threads first (#22272)
* FEATURE: Sort thread list by unread threads first

This commit changes the thread list to show the threads that
have unread messages at the top of the list sorted by the
last reply date + time, then all other threads sorted by
last reply date + time.

This also fixes some issues by removing the last_reply
relationship on the thread, which did not work for complex
querying scenarios because its order would be discarded.

* FIX: Various fixes for thread list loading

* Use the channel.threadsManager and find the channel first rather
  than use activeChannel in the threads manager, otherwise we may
  be looking at differenct channels.
* Look at threadsManager directly instead of storing result for threads
  list otherwise it can get out of sync because of replace: true in
  other places we are loading threads into the store.
* Fix sorting for thread.last_reply, needed a resort.
2023-06-28 13:14:01 +10:00
dependabot[bot]
78bc42be2e
Build(deps-dev): Bump test-prof from 1.2.1 to 1.2.2 (#22314)
Bumps [test-prof](https://github.com/test-prof/test-prof) from 1.2.1 to 1.2.2.
- [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.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: test-prof
  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-06-28 09:42:37 +08:00
dependabot[bot]
51657bee8d
Build(deps-dev): Bump terser from 5.18.1 to 5.18.2 in /app/assets/javascripts (#22315)
Bumps [terser](https://github.com/terser/terser) from 5.18.1 to 5.18.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.18.1...v5.18.2)

---
updated-dependencies:
- dependency-name: terser
  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-06-28 09:42:23 +08:00
Alan Guo Xiang Tan
68bb53a196
DEV: Fix failing spec after Rails upgrade to 7.0.5.1 (#22317)
Follow up to 4d3999de10
2023-06-28 08:17:11 +08:00
Martin Brennan
cec68b3e2c
FEATURE: Conditionally change back button route for thread (#22129)
When clicking back from a thread, we want to either go back to the
channel if the thread was opened from an indicator, or to the thread
list if we opened it from there. Since ember doesn't give a nice way
to get the previous route, we need to store this ourselves. We only
do this on mobile, on desktop we just follow existing behaviour.

Also implements a chat router history.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-06-28 09:58:47 +10:00
Alan Guo Xiang Tan
aef7c2fe8f
UX: Use modals to edit categories and tags that appear in sidebar (#22295)
Why this change?

We are currently not fully satisfied with the current way to edit the
categories and tags that appears in the sidebar where the user is
redirected to the tracking preferences tab in the user's profile causing
the user to lose context of the current page. In addition, the dropdown
to select categories or tags limits the amount of information we can
display.

Since editing or adding a custom categories section is already using a
modal, we have decided to switch editing the categories and tags that
appear in the sidebar to use a modal as well.

This commit removes the `new_edit_sidebar_categories_tags_interface_groups` site setting and
make the modals the default for all users.
2023-06-28 07:20:31 +08:00
Greg Molnar
4d3999de10
DEV: Upgrade Rails to 7.0.5.1 (#22305)
See discuss.rubyonrails.org/t/cve-2023-28362-possible-xss-via-user-supplied-values-to/83132

Impact of this vulnerability has been assess to be very low for Discourse since XSS attacks are mitigated by Discourse's default CSP.
2023-06-28 07:18:49 +08:00
Alan Guo Xiang Tan
6c838c73e5
DEV: Add order:title filter to experimental /filter route (#22293)
This has been requested multiple times by users so it makes sense for us
to support this as well.

See https://meta.discourse.org/t/sort-display-of-topics-alphabetically/53911
2023-06-28 06:21:56 +08:00
Jarek Radosz
d3facec7d0
DEV: Update @json-editor/json-editor (#22308)
Manually tried it out by editing a json_schema setting of a theme component
2023-06-27 23:01:58 +02:00
Jarek Radosz
1027a8a2d7
DEV: Move migration to the correct directory (#22309)
db/migrate/db/migrate ain't it :P
2023-06-27 23:01:39 +02:00
Kris
b30ef5d6a0
FIX: nest theme translation data so it saves (#22306) 2023-06-27 14:27:32 -04:00
Jarek Radosz
a6bd3994f3
UX: Align chat separators, increase mobile chat width (#22298) 2023-06-27 18:49:45 +02:00
Roman Rizzi
71ff38bab6
DEV: Fix lint and flaky summarization spec (#22303) 2023-06-27 13:18:10 -03:00
Vinoth Kannan
ca016c1655
DEV: add group-messages css class to user private messages group page. (#22302)
It adds `group-messages` and `group-NAME` css classes to the PM topic list.
2023-06-27 21:34:07 +05:30
Roman Rizzi
f4e7a80600
DEV: Cache summarization strategy results. (#22230)
Updates the interface for implementing summarization strategies and adds a cache layer to summarize topics once.

The cache stores the final summary and each chunk used to build it, which will be useful when we have to extend or rebuild it.
2023-06-27 11:44:34 -03:00
Discourse Translator Bot
a909dffe8f
Update translations (#22300) 2023-06-27 16:39:27 +02:00
Natalie Tay
1384ba5a4e
FIX: Cater for polls that can have multiple votes per user (#22297)
Cater for polls that can have multiple votes per user.

This fixes an older UserMerge and migration which was intended to
de-duplicate poll votes but did not account for "multiple" type polls.
2023-06-27 18:58:16 +08:00
Vinoth Kannan
78d8bd7c81
FIX: hide "Save Draft" button when editing post on same topic. (#22266)
When the composer is open with a draft for a topic and the user clicks the edit button of a post on the same topic, we shouldn't display the "Save Draft" button. Because the edited post's draft will override the existing draft of the same topic even if we saved it.
2023-06-27 14:07:23 +05:30
Jarek Radosz
4880b30bc4
DEV: Force update of unset-value (#22287)
…to close automated upgrade warnings. the api didn't have any breaking changes between 1.x and 2.x
2023-06-27 10:26:59 +02:00
Vinoth Kannan
d261e0aee0
DEV: add raw plugin outlet to create new topic list item columns. (#22296)
This commit will introduce a new plugin outlet in the raw topic list item handlebar. We can add a new column at the end using this plugin outlet.
2023-06-27 13:48:54 +05:30
chapoi
2548b819be
UX: add max-width to thread indicator (#22282) 2023-06-27 09:30:15 +02:00
Jarek Radosz
11da996304
DEV: Remove ember-rfc176-data (#22290) 2023-06-27 07:55:51 +02:00
Alan Guo Xiang Tan
75b402f07c
UX: Fix position of filters in edit categories/tags nav menu modals (#22292)
Why this change?

We want the position of the filters to remain fixed when scrolling
through the list of categories or tags. Otherwise, the user has to
scroll all the way back to othe top in order to access the filters when
the list of categories or tags is large.
2023-06-27 12:52:42 +08:00
Krzysztof Kotlarek
9cf981f1f1
FEATURE: new watched_precedence_over_muted setting (#22252)
New setting which allow admin to define behavior when topic is in watched category and muted topic and vice versa.

If watched_precedence_over_muted setting is true, that topic is still visible in list of topics and notification is created.

If watched_precedence_over_muted setting is false, that topic is not still visible in list of topics and notification is skipped as well.
2023-06-27 14:49:34 +10:00
Alan Guo Xiang Tan
4f7f9ef87c
UX: Order categories in edit navigation menu modal by name (#22291)
Why does this change do?

If the `fixed_category_positions` is `false`, we want to order the
categories in the edit navigation menu categories modal by name. This
makes it easier to filter through a large list of categories.

This commit also fixes a bug where we were unintentionally mutating the
`this.site.categories` array.
2023-06-27 10:31:48 +08:00
Loïc Guitaut
885ab9a015
DEV: Introduce an array type for Chat contracts (#22278)
This small patch registers a new `ActiveModel` type: `array`.
It will split a string on `,` to create a new array. If the value is
already an array, nothing will happen and for all other types, it will
wrap the value in an array.

Here’s an example on an existing contract:
```ruby
  attribute :target_usernames

  before_validation do
    self.target_usernames =
      (
        if target_usernames.is_a?(String)
          target_usernames.split(",")
        else
          target_usernames
        end
      )
  end

  # can be rewritten as:

  attribute :target_usernames, :array
```
2023-06-27 10:51:58 +10:00
Jarek Radosz
6517e6d47a
DEV: Force upgrade of loader-utils (#22289) 2023-06-27 02:09:27 +02:00
Jarek Radosz
a318fb5be4
DEV: Update moment-timezone (#22284) 2023-06-27 02:09:13 +02:00
dependabot[bot]
6b9c497a58
Build(deps): Bump timeout from 0.3.2 to 0.4.0 (#22267)
Bumps [timeout](https://github.com/ruby/timeout) from 0.3.2 to 0.4.0.
- [Release notes](https://github.com/ruby/timeout/releases)
- [Commits](https://github.com/ruby/timeout/compare/v0.3.2...v0.4.0)

---
updated-dependencies:
- dependency-name: timeout
  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-06-27 08:05:30 +08:00
Alan Guo Xiang Tan
df04a99db9
FIX: Abort transition when transition.from present on new-topic route (#22253)
Why is this change required?

The `/new-topic` route is a special route which we use to open the
composer by loading a URL. By default, the `new-topic` route is replaced with the
`discovery.latest` route. On a fresh page load, this makes sense since
there is no template for the `new-topic` route to render. However, this
behavior does not make sense if we're transition from another route.
There is no need to replace the current route with the `discovery.latest` when all we want
is to open the composer.

What does this commit do?

This commit fixes the undesirable behaviour described above by aborting
the existing transition to the `new-topic` route if `transition.from` is
present. This indicates that we're navigating from an existing route and
we can just open the composer.
2023-06-27 08:03:51 +08:00
dependabot[bot]
343f09a152
Build(deps): Bump rspec-support from 3.12.0 to 3.12.1 (#22286)
Bumps [rspec-support](https://github.com/rspec/rspec-support) from 3.12.0 to 3.12.1.
- [Changelog](https://github.com/rspec/rspec-support/blob/main/Changelog.md)
- [Commits](https://github.com/rspec/rspec-support/compare/v3.12.0...v3.12.1)

---
updated-dependencies:
- dependency-name: rspec-support
  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-06-27 01:22:18 +02:00
dependabot[bot]
0cd7ec923e
Build(deps): Bump rubocop from 1.53.0 to 1.53.1 (#22288)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.53.0 to 1.53.1.
- [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.53.0...v1.53.1)

---
updated-dependencies:
- dependency-name: rubocop
  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-06-27 01:21:36 +02:00
Rafael dos Santos Silva
3f7105e7cd
FEATURE: Try to load plugin gems platform variants (#21643) 2023-06-26 15:11:35 -03:00