Commit Graph

49923 Commits

Author SHA1 Message Date
Jarek Radosz 507d705fb5
DEV: Add diffhtml composer preview specs (#22333)
(both fail with the updated diffhtml)
2023-06-29 09:37:44 +02:00
Joffrey JAFFEUX ea0b8ca38c
FEATURE: allows to enable/disable threading in UI (#22307)
Enabling/Disabling threading has been possible through command line until now. This commit introduces two new UIs:

- When creating a channel, it will be available once the category has been selected
- On the settings page of a channel for admins
2023-06-29 07:19:12 +02:00
Krzysztof Kotlarek de2febcc0c
FIX: error when CategoryList tried to find relevant topics (#22339)
Recently, we added the option for watched tag/categories to take precedence over muted tag/categories. Therefore, `remove_muted_tags` is using `category_users` to check if categories are not watched. There was missing join in CategoryList which was causing an error.
2023-06-29 11:25:58 +10:00
Martin Brennan 1194ed10e1
FEATURE: Track last_viewed_at datetime for channel members (#22294)
Whenever a user opens a channel or marks it read, we now
update the last_viewed_at datetime for that channel membership
record. This is so we will be able to show thread unread indicators
in the channel sidebar that clear independently of the main thread
unread indicators. This unread functionality will follow in another
PR.
2023-06-29 09:22:17 +10:00
Martin Brennan 58c14ba0f9
DEV: Remove AJAX usage in chat-channel model (#22320)
Addressing TODO about using chatApi in the ChatChannel model,
but since it's a model we cannot easily use the chatApi service.
The model function is only called in one place so we may as well
just move the call there since the component can use chatApi
2023-06-29 09:21:28 +10:00
Martin Brennan 58c8f91d9a
DEV: Use same excerpt everywhere in chat (#22319)
Followup to c6b43ce68b

We can just use the rich excerpt everywhere since we know
we don't need text_entities -- that introduced security issues
just to fix a spec.
2023-06-29 09:20:20 +10:00
dependabot[bot] 4c95f786c0
Build(deps-dev): Bump eslint-plugin-qunit in /app/assets/javascripts (#22337)
Bumps [eslint-plugin-qunit](https://github.com/platinumazure/eslint-plugin-qunit) from 7.3.4 to 8.0.0.
- [Release notes](https://github.com/platinumazure/eslint-plugin-qunit/releases)
- [Changelog](https://github.com/platinumazure/eslint-plugin-qunit/blob/master/CHANGELOG.md)
- [Commits](https://github.com/platinumazure/eslint-plugin-qunit/compare/v7.3.4...v8.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-qunit
  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-06-29 01:09:34 +02:00
dependabot[bot] 09feb03056
Build(deps): Bump message-bus-client in /app/assets/javascripts (#22335)
Bumps [message-bus-client](https://github.com/discourse/message_bus) from 4.3.2 to 4.3.7.
- [Changelog](https://github.com/discourse/message_bus/blob/main/CHANGELOG)
- [Commits](https://github.com/discourse/message_bus/compare/v4.3.2...v4.3.7)

---
updated-dependencies:
- dependency-name: message-bus-client
  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-06-29 01:00:36 +02:00
dependabot[bot] c5b4168d3a
Build(deps): Bump webpack in /app/assets/javascripts (#22336)
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.0 to 5.88.1.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.0...v5.88.1)

---
updated-dependencies:
- dependency-name: webpack
  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-06-29 01:00:12 +02:00
Kris 9cc2b5cc20
DEV: add before-header-panel plugin outlet (#22285) 2023-06-28 17:26:30 -04:00
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