Commit Graph

17524 Commits

Author SHA1 Message Date
dependabot[bot]
f97aef4b27
Build(deps-dev): Bump terser in /app/assets/javascripts (#23319)
Bumps [terser](https://github.com/terser/terser) from 5.19.2 to 5.19.3.
- [Changelog](https://github.com/terser/terser/blob/v5.19.3/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.2...v5.19.3)

---
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-08-30 00:35:57 +02:00
Renato Atilio
58b49bce41
FEATURE: support to initial values for form templates through /new-topic (#23313)
* FEATURE: adds support for initial values through /new-topic to form templates
2023-08-29 18:41:33 -03:00
Renato Atilio
f49389309a
FIX: no form template logic when editing posts (#23317) 2023-08-29 16:07:33 -03:00
Isaac Janzen
6650aa18f5
DEV: Convert move-to-topic modal to component-based API (#23293)
<img width="654" alt="Screenshot 2023-08-28 at 2 49 04 PM" src="https://github.com/discourse/discourse/assets/50783505/5fc4dfb5-a7da-4a2b-a524-e81b5039efe6">
<img width="745" alt="Screenshot 2023-08-28 at 2 48 47 PM" src="https://github.com/discourse/discourse/assets/50783505/4432338e-ba05-4206-8553-eb69f8b31b4f">
<img width="448" alt="Screenshot 2023-08-28 at 2 48 44 PM" src="https://github.com/discourse/discourse/assets/50783505/6d6c305d-396b-488a-9ee9-bc41773dd98b">
<img width="747" alt="Screenshot 2023-08-28 at 2 48 42 PM" src="https://github.com/discourse/discourse/assets/50783505/9279f591-ca4a-4152-81c5-71d79dbcbc10">
<img width="671" alt="Screenshot 2023-08-28 at 2 40 42 PM" src="https://github.com/discourse/discourse/assets/50783505/dea02b8b-cf87-45bb-8466-449367b5609a">
<img width="643" alt="Screenshot 2023-08-28 at 2 40 37 PM" src="https://github.com/discourse/discourse/assets/50783505/e422b9b0-89b5-4681-91db-89b8eee05872">
2023-08-29 13:50:13 -05:00
Keegan George
f753918cf5
DEV: Add after-composer-title-input outlet (#23303) 2023-08-29 09:14:05 -07:00
Isaac Janzen
2671de3f86
DEV: Convert post-enqueued modal to component-based API (#23295) 2023-08-29 11:09:57 -05:00
Penar Musaraj
76f4142d3f
Revert "A11Y: Improve setting focus to post" (#23311)
This reverts commit 9b3fc8081a.
2023-08-29 09:24:16 -04:00
Meghna
d47a3e053a
UX: settings are misaligned when translations are too long (#23308) 2023-08-29 18:17:12 +05:30
Ted Johansson
7a4119846c
FIX: Include 'notify staff' separator in chat message flag modal (#23301)
When flagging a chat message, and options included both notifying user and notifying staff, the modal was missing the separating text. This was happening because the #staffFlagsAvailable method was based on post flags, and the model for chat flags is slightly different. This fixes that by delegating to the relevant flag target object.
2023-08-29 15:26:14 +08:00
Martin Brennan
e562bb1f43
DEV: Remove reviewable action custom_modal and use new action-based modal API (#23258)
This removes the custom_modal implementation for the
reviewable items and uses the new modal patterns defined at
https://meta.discourse.org/t/converting-modals-from-legacy-controllers-to-new-dmodal-component-api/268057

Only one plugin (discourse category experts) was using this API,
that has been fixed up here https://github.com/discourse/discourse-category-experts/pull/117

Also adds `registerReviewableActionModal` to allow for plugins and
core to map a reviewable action ID to an actual
JS class for the modal and improves docs for plugin API functions
used by reviewable-item.
2023-08-29 14:36:20 +10:00
dependabot[bot]
27ebbd2f8d
Build(deps-dev): Bump @babel/standalone from 7.22.12 to 7.22.13 in /app/assets/javascripts (#23299)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.22.12 to 7.22.13.
- [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.13/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-29 08:21:48 +08:00
Isaac Janzen
026cd3e532
DEV: Convert flag modal to component-based API (#23279)
# Topic Flag
<img width="587" alt="Screenshot 2023-08-28 at 10 53 12 AM" src="https://github.com/discourse/discourse/assets/50783505/6ffe4e47-05a6-406c-9d1b-899ff4d5c2c9">

# Post Flag
<img width="620" alt="Screenshot 2023-08-28 at 10 52 44 AM" src="https://github.com/discourse/discourse/assets/50783505/1f893916-b62f-4825-a337-4c0e0e4ce3af">

# Chat Flag
<img width="648" alt="Screenshot 2023-08-28 at 10 52 31 AM" src="https://github.com/discourse/discourse/assets/50783505/e79444e8-a8b1-4f05-9b47-03d425bc9085">
2023-08-28 16:51:58 -05:00
Roman Rizzi
cf71f8358e
FIX: Typo in summary URL (#23298) 2023-08-28 18:06:36 -03:00
Roman Rizzi
e20de81de3
FIX: Display summaries for anonymous users. (#23294)
Streaming doesn't work for anonymous users because we scope updates to the current user. Since they can only see cached summaries, we can skip the streaming parameter and update it directly with the ajax response.
2023-08-28 17:29:48 -03:00
Isaac Janzen
6870f38e87
DEV: Convert feature-topic modal to component-based API (#23277)
Updated styles with some sign off from @jordanvidrine 



<img width="655" alt="Screenshot 2023-08-28 at 9 07 47 AM" src="https://github.com/discourse/discourse/assets/50783505/31b453ef-a787-436f-9fd9-48c9cd3a2e81">
2023-08-28 09:41:14 -05:00
David Taylor
81d8c6ba6c
UX: Prevent initial jump when dragging topic timeline scroller (#23291)
Previously, when dragging the timeline scroller, we would position it purely based on the current cursor position. That means that if you started dragging it from anywhere other than the centre, the scroller will 'jump' suddenly to centre itself on the cursor.

This commit measures the offset of your cursor when the drag starts, and maintains it throughout the drag. So for example, if you start dragging at the bottom of the scroller and drag one pixel up, the scroller will only move by 1px.

This should make the UX much smoother, especially on large topics.
2023-08-28 15:00:32 +01:00
Jarek Radosz
6f1d666323
DEV: Make index.html a valid html (#23289)
Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-08-28 14:44:38 +02:00
David Taylor
33d5845991
FIX: Avoid scroll jumping for topics on slow connections (#23290)
When the 'loading slider' navigation indicator is enabled, and a connection is very slow, we `display: none` most of the page and display a spinner. The `still-loading` body class for this was being added in the `afterRender` step in the Ember runloop. This meant that, depending on the order they were scheduled, other `afterRender` jobs may run before it. This caused an issue with topic scroll locations because we would attempt to scroll to an element which was `display: none` at the point its position was calculated.

This commit moves the `still-loading` class manipulations to the `render` step of the runloop, which is technically more correct, and means that anything scheduled in the `afterRender` step is guaranteed to run without the `display: none` CSS.

https://meta.discourse.org/t/276305/29
2023-08-28 12:23:02 +01:00
Sam
997c839626
FEATURE: display count of topics being dismissed in dialog (#23288)
Previous to this change it was unclear if all new would be dismissed or just
some of them

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2023-08-28 11:46:38 +02:00
dependabot[bot]
09acba17de
Build(deps-dev): Bump eslint from 8.47.0 to 8.48.0 in /app/assets/javascripts (#23281)
Bumps [eslint](https://github.com/eslint/eslint) from 8.47.0 to 8.48.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.47.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  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-08-28 12:58:31 +08:00
Martin Brennan
5fc93b95cc
FIX: Improve admin plugin list and modernize code (#23256)
This commit contains a few improvements:

* Use LinkTo instead of a button with a weird action referencing the
  controller to navigate to the filtered settings for a plugin
* Add an AdminPlugin model with tracked properties and use that when
  toggling the setting on/off and in the templates
* Make it so the Settings button for a plugin navigates to the correct
  site setting category instead of always just going to the generic
  "plugins" one if possible
2023-08-28 10:48:59 +10:00
Ted Johansson
4b52269827
DEV: Move option to delete user under reviewable reject menu (#23257)
Follow-up to #23199 in which we moved the "delete user" options under the relevant action menu for flagged post. This change does the same, but to queued posts.
2023-08-27 10:05:05 +08:00
Isaac Janzen
aaf0b0f1cc
DEV: Convert feature-topic-on-profile modal to component-based API (#23275)
# Before
<img width="738" alt="Screenshot 2023-08-25 at 2 04 31 PM" src="https://github.com/discourse/discourse/assets/50783505/c0778da2-d062-48d9-93e8-4b481190fadc">


# After
<img width="750" alt="Screenshot 2023-08-25 at 2 04 34 PM" src="https://github.com/discourse/discourse/assets/50783505/07aa2bec-e282-424e-b87d-48f5104eb534">
2023-08-26 09:52:19 -05:00
Penar Musaraj
a94834abd5
A11Y: Improve setting focus to post (#23243) 2023-08-25 14:45:56 -04:00
Isaac Janzen
058c8496f0
DEV: Convert explain-reviewable modal to component-based API (#23274)
# Before
<img width="826" alt="Screenshot 2023-08-25 at 12 49 10 PM" src="https://github.com/discourse/discourse/assets/50783505/25c2bf52-33f3-4b18-89c1-9826ed605519">

# After
<img width="632" alt="Screenshot 2023-08-25 at 12 52 37 PM" src="https://github.com/discourse/discourse/assets/50783505/0d6697f2-6226-4acc-8aac-031f4645db93">
2023-08-25 13:09:21 -05:00
Isaac Janzen
dcbfb8c54b
DEV: Convert edit-topic-timer modal to component-based API (#23252)
# Before
<img width="479" alt="Screenshot 2023-08-25 at 10 52 04 AM" src="https://github.com/discourse/discourse/assets/50783505/65ec8f94-d3e3-4520-a3f0-b265af069e83">

# After
<img width="569" alt="Screenshot 2023-08-25 at 10 53 44 AM" src="https://github.com/discourse/discourse/assets/50783505/35d12af7-c287-42f8-bf9c-d0ae1b5a08db">
2023-08-25 12:17:34 -05:00
Isaac Janzen
34f502f68d
DEV: Convert uploaded-image-list modal to component-based API (#23245)
<img width="660" alt="Screenshot 2023-08-24 at 4 55 01 PM" src="https://github.com/discourse/discourse/assets/50783505/3fb8360d-c8cd-4ff4-acb2-15843eb4f868">
2023-08-25 09:20:14 -05:00
Isaac Janzen
0496199090
FIX: Badge preview not displaying grant count (#23269)
<img width="510" alt="Screenshot 2023-08-25 at 8 19 38 AM" src="https://github.com/discourse/discourse/assets/50783505/9ebf467e-7b3b-49e2-91d9-43e37b838431">
2023-08-25 09:19:01 -05:00
Isaac Janzen
e7cb417aaf
DEV: Convert auth-token modal to component-based API (#23251)
<img width="744" alt="Screenshot 2023-08-24 at 6 41 15 PM" src="https://github.com/discourse/discourse/assets/50783505/a5df1a15-fbb0-43a9-acce-742ef484d70a">
2023-08-25 08:56:29 -05:00
Isaac Janzen
98f2e6ab12
DEV: Convert edit-user-directory-columns modal to component-based API (#23250) 2023-08-25 07:22:09 -05:00
Isaac Janzen
5c652dd7a1
DEV: Convert reseed modal to component-based API (#23232)
<img width="728" alt="Screenshot 2023-08-24 at 1 35 53 PM" src="https://github.com/discourse/discourse/assets/50783505/5532eea4-1238-43dc-b2b7-a511e78d1f97">
2023-08-25 07:21:38 -05:00
Isaac Janzen
c22e2de2d8
DEV: Convert form-template-validation-options modal to component-based API (#23236)
<img width="794" alt="Screenshot 2023-08-25 at 6 38 21 AM" src="https://github.com/discourse/discourse/assets/50783505/f5cf6fa0-7a2f-4e38-93e2-657fb01f6703">
2023-08-25 07:02:54 -05:00
Jarek Radosz
0b74ba7c66
DEV: Add color to testem output (#23266) 2023-08-25 13:44:26 +02:00
Isaac Janzen
3052779ea6
DEV: Convert staff-action-log-details modal to component-based API (#23240)
<img width="800" alt="Screenshot 2023-08-24 at 3 08 38 PM" src="https://github.com/discourse/discourse/assets/50783505/c498c49c-88ca-4b34-90a0-194f177b5856">
2023-08-25 06:43:52 -05:00
Isaac Janzen
0c26d8b375
DEV: Convert color-scheme-select-base modal to component-based API (#23234)
<img width="560" alt="Screenshot 2023-08-24 at 2 12 38 PM" src="https://github.com/discourse/discourse/assets/50783505/9180f090-2142-4818-bb40-78cf7c25e9fe">
2023-08-25 06:26:39 -05:00
David Taylor
3081d83ac5
DEV: Update user-topics-list to native class syntax (#23263) 2023-08-25 10:57:44 +01:00
Jarek Radosz
90ef8d3041
DEV: Add missing pluginId to a modifyClass test (#23265) 2023-08-25 11:44:42 +02:00
dependabot[bot]
f4afa2c5cc
Build(deps-dev): Bump @babel/standalone in /app/assets/javascripts (#23262)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.22.10 to 7.22.12.
- [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.12/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-25 11:14:43 +02:00
dependabot[bot]
556fc05506
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23224)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.10 to 7.22.11.
- [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.11/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-25 10:51:49 +02:00
David Taylor
b26fd03692
DEV: Introduce ember-router-service-refresh-polyfill (#23261)
This provides a `refresh()` function on Ember's public router service. The feature was added to Ember in v4.1.0, but this polyfill will allow us to start using it straight away under 3.28
2023-08-25 09:32:54 +01:00
Blake Erickson
9238a9cf42
DEV: Display fuzzy site setting search results below direct matches (#23197)
DEV: Display fuzzy site setting search results below direct matches

When searching for site settings, in the results under the ALL category
all the fuzzy search results were showing first followed by any direct
matches. This change adjusts that so that fuzzy searches show below
direct matches.

Fuzzy results are now also sorted based on their gap calculation in
ascending order.
2023-08-24 17:47:40 -06:00
Isaac Janzen
eab3bfc8d0
DEV: Allow ForgotPassword emailOrUsername arg to be null (#23246) 2023-08-24 17:36:02 -05:00
Isaac Janzen
d7538d7c99
DEV: Remove updated modals from KNOWN_LEGACY_MODALS (#23239)
`KNOWN_LEGACY_MODALS` now correctly reflects the remaining modals to be upgraded to the component based Modal API
2023-08-24 15:12:18 -05:00
Isaac Janzen
59569a6e64
DEV: Remove unused admin-theme-item modal (#23233) 2023-08-24 14:14:51 -05:00
Andrei Prigorshnev
c519d60d50
DEV: Don't print warning about attempt to track status of a user without id in tests (#23228)
It is hard to catch and debug potential bugs related to live updates of 
user status (though, we haven't seen many such bugs so far). We have 
this `console.warn` statement that should help us to catch one class of 
such bugs:

70f1cc5552/app/assets/javascripts/discourse/app/models/user.js (L1384-L1389)

But in tests, we quite often operate with stubs of users that don't have ID, 
and this warning create unnecessary noise. This PR disable the warning in 
the testing environment.
2023-08-24 21:32:13 +04:00
Joffrey JAFFEUX
46c7e47f50
FIX: prevents setPanel to also set separated mode (#23227)
This could happen after you had already change the separation mode and would cause unexpected bugs.

This PR also adds more tests around using switch buttons with chat.
2023-08-24 18:21:28 +02:00
Jarek Radosz
70f1cc5552
DEV: Use esbuild to make DiscourseJsProcessor (#23223)
Reverts e2705df and re-lands #23187 and #23219.

The issue was incorrect order of execution of Rails' `assets:precompile` task in our own precompilation stack.

Co-authored-by: David Taylor <david@taylorhq.com>
2023-08-24 16:36:22 +02:00
Penar Musaraj
fdc2080bd8
DEV: Use ellipsis instead of three dots (#23193)
Also adds a note for translators for the `type_to_filter` string.

@discourse-translator-bot keep_translations_and_approvals
2023-08-24 10:10:41 -04:00
David Taylor
e2705df0f4
Revert "DEV: Use esbuild to make DiscourseJsProcessor (#23187)" (#23221)
This reverts commit 4dfe25d062 and 4fdeb6281e. We are investigating an issue related to asset compilation and S3 assets
2023-08-24 13:25:44 +01:00
Jarek Radosz
4dfe25d062
DEV: Use esbuild to make DiscourseJsProcessor (#23187)
Co-authored-by: David Taylor <david@taylorhq.com>
2023-08-24 12:43:59 +02:00