Commit Graph

30087 Commits

Author SHA1 Message Date
Jarek Radosz
999aaa35a7
FIX: A select-kit+modal regression (#22961)
Regressed in https://github.com/discourse/discourse/pull/22642

`inModal` var is `.modal-body` itself now, so the changing the modal height failed.
2023-08-03 20:00:07 +02:00
Penar Musaraj
35ff57ba69
UX: Fix hover color for header icons in WCAG (#22959) 2023-08-03 12:38:08 -04:00
Isaac Janzen
a820be117c
DEV: Convert install-theme modal to component-based API (#22939) 2023-08-03 10:52:04 -05:00
Jarek Radosz
38d3208027
FIX: Poll breakdown regressions (#22955)
Some related to the modal api change, some due to chart.js updates
2023-08-03 16:58:52 +02:00
David Taylor
1f15870d0d
DEV: Fix theme error message (#22956)
Since the refactoring in f822a933fa, the text of theme-related errors has been missing in the UI.
2023-08-03 15:58:04 +01:00
David Taylor
45ae9d9bab
UX: Introduce toggle-switch UI for plugins (#22910)
This commit makes some visual tweaks to the admin panel plugin list, and introduces functional 'toggle switches' for admins to enable/disable plugins more easily.

Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2023-08-03 15:19:33 +01:00
David Taylor
c23a82554b DEV: Convert AbstractCategoryRoute to native class syntax 2023-08-03 08:51:07 +01:00
David Taylor
d5107d1aba DEV: Refactor build-category-route to define abstract controller
This makes more sense (and is likely faster) than redefining the entire route for every call to `buildCategoryRoute`
2023-08-03 08:51:07 +01:00
David Taylor
5aaf5cbaf4 DEV: Run implicit-injections shim earlier in boot
We need these Ember framework class overrides to be applied before anything attempts to extend them. An initializer is too late, because initializer files may `import` a module which defines classes which extend the framework classes.

In the past this rarely mattered because Ember's legacy `SomeObject.extend` is quite forgiving - it will respect changes made to `SomeObject` right up until the first `.create()` call. However, the native class syntax (`class extends SomeObject`) will 'freeze' `SomeObject` as soon as the class is defined.
2023-08-03 08:51:07 +01:00
Krzysztof Kotlarek
fbabea5c76
FIX: display customised community section button when no secondary links (#22948)
Edit community section button is hidden in secondary/more section. However, when there are no secondary links, then more section is not shown. In that case, we should still display an edit button for admins, so they can edit the section.
2023-08-03 12:53:34 +10:00
Krzysztof Kotlarek
db4e2f41c2
DEV: experimental outlet for navigation filter (#22897)
Temporary outlet for navigation filter for /filter page. In addition, copy button and reset button were added to core.
2023-08-03 09:22:16 +10:00
Sérgio Saquetim
03690ccccf
DEV: Add :push_notification event and deprecate :post_notification_alert (#22917)
This commit introduces the :push_notification event and deprecates :post_notification_alert.

The old :post_notification_alert event was not triggered when pushing chat notifications and did not respect when the user was in "do not disturb" mode.

The new event fixes these issues.
2023-08-02 18:44:19 -03:00
Faizaan Gagan
47593a9922
DEV: added a plugin outlet to reviewable-item (#22934)
* DEV: added a plugin outlet to reviewable-item

* fix linting
2023-08-02 23:18:18 +05:30
Jarek Radosz
c5c786b4ac
DEV: Fix array-related linting issues in templates (#22935)
and remove more linting exemptions
2023-08-02 19:43:37 +02:00
David Taylor
089dead654
DEV: Convert discovery controllers to native class syntax (#22938) 2023-08-02 17:46:27 +01:00
Penar Musaraj
5dc3a276c8
FIX: Compact tag picker input not focused in iOS (#22922)
Should fix an iOS regression in f5e8e73. iOS does not pull up the keyboard if the `.focus()` call is delayed by a rendering timeout or an asynchronous ajax call. This PR adds earlier `.focus()` calls if the input element is present.
2023-08-02 09:59:50 -04:00
David Taylor
17d5e3ec23
DEV: Update composer service to inherit from Service, not Controller (#22929)
This was forgotten during the work in 22991bba44

This revealed two differences we were depending on: the merged `actions` hash (re-implemented on the service), and a couple of calls to `composer.send` (now removed)
2023-08-02 12:44:18 +01:00
TheJammiestDodger
e680437030
FIX: Add 'Ignored' flags to Moderator Activity report (#22041)
* FIX Add 'Ignored' flags to Moderator Activity report

The Moderator Activity query didn’t include the number of deferred flags in the Flags Reviewed totals. As this number is designed to reflect how many flags a moderator has seen, reviewed, and made a judgement on, the Ignored ones should also be included.

* Apply suggestions from code review

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-08-02 12:27:31 +01:00
Jarek Radosz
407ff39fdf
FIX: Poll builder UI issues (#22931)
1. recent css regression related to modal upgrade
2. autofocus and on-enter regressions
3. array related linting issue (reliance on Ember's firstObject/lastObject)
2023-08-02 12:55:25 +02:00
David Battersby
906bfdebea
FIX: prevent event bubbling when closing modals with escape key (#22928)
This change prevents event bubbling for the Escape key on all modals. Currently when we close the modal using the Escape key, all other event listeners attached will also be triggered (such as closing the chat drawer if it's open).
2023-08-02 17:15:08 +08:00
Jarek Radosz
5ae0220638
DEV: De-jQ selectedText() (#22802)
And touch up `initializeDefaultHomepage()` while at it.
2023-08-02 10:57:58 +02:00
Rishabh
eebe3210bb
UX: Add tooltip about multiple emails to admin.groups.incoming_email field (#22926)
* UX: Add tooltip about multiple emails to admin.groups.incoming_email field
* prettier (linting)
2023-08-02 14:25:37 +05:30
David Battersby
d8bf926d2d
FIX: prevent event propagation when pressing escape key on lightbox (#22924)
When we use the escape key to exit lightbox for images within a chat channel, it also closes the chat drawer due to event bubbling (since both lightbox and chat use an event listener on the escape key).

This change prevents event bubbling when using the escape key within lightbox, which means that it will close the lightbox but won't close the chat drawer.
2023-08-02 13:59:10 +08:00
David Battersby
db7581ce49
FIX: intercept escape in lightbox and prevent default (#22923)
The escape key is used as a shortcut to escape the Discourse Lightbox. However, some browsers also use the escape key to exit fullscreen mode.

This change is to allow escaping the lightbox when browser is in fullscreen mode, while preventing any behavior associated with the Escape key (such as exiting fullscreen). This has to be done on the keydown event, as this means we can handle our logic and then preventDefault before the browser tries to exit fullscreen.
2023-08-02 12:48:47 +08:00
dependabot[bot]
e88452a247
Build(deps): Bump handlebars in /app/assets/javascripts (#22919)
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.7 to 4.7.8.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.8/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...v4.7.8)

---
updated-dependencies:
- dependency-name: handlebars
  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-02 01:07:36 +02:00
dependabot[bot]
cd90deb4bd
Build(deps-dev): Bump sass in /app/assets/javascripts (#22918)
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.1 to 1.64.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.1...1.64.2)

---
updated-dependencies:
- dependency-name: sass
  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-02 01:06:41 +02:00
Isaac Janzen
ecd9e6d4b7
DEV: Convert watched-word-test modal to component-based API (#22911) 2023-08-01 16:08:56 -05:00
Isaac Janzen
7c8b0b9869
DEV: Convert delete-user-posts-progress modal to component-based API (#22916)
https://github.com/discourse/discourse/assets/50783505/414ffcc5-06e9-470f-b160-83b4c12bbb96
2023-08-01 15:49:26 -05:00
Roman Rizzi
514f5d25e6
FIX: Default to the first list if the preferred one is empty (#22915) 2023-08-01 17:01:00 -03:00
Isaac Janzen
da6ddb638f
DEV: Convert api-key-urls modal to component-based API (#22913)
<img width="474" alt="Screenshot 2023-08-01 at 1 29 26 PM" src="https://github.com/discourse/discourse/assets/50783505/1a46901f-8231-46fb-8c36-cb441b7fd883">
2023-08-01 14:51:18 -05:00
Daniel Waterworth
50d527b80c
DEV: Remove db_timeout setting (#22912)
It doesn't actually do anything.
2023-08-01 14:17:43 -05:00
David Taylor
945bb9161f
UX: Do not scroll-top for aborted transitions (#22744)
We only want to scroll to the top for successful transitions. If a transition is aborted (e.g. when clicking a chat link when chat is in drawer mode) then we should maintain the existing scroll location.
2023-08-01 18:44:25 +01:00
David Taylor
2c4faf48f9
DEV: Fix ember-cli proxy assets (#22674)
We were proxying all `/assets/*` requests through to the origin. In local development that was fine, because Rails was able to serve files from the `dist/` directory. But when proxying to a remote origin, we want the local ember-cli to serve its own JS assets
2023-08-01 18:43:33 +01:00
Roman Rizzi
a418dce1aa
FIX: Display similar topics for anons on mobile. (#22907)
We never propagated the preference change because of the early return, meaning lists listening to it never got to decide if they had to remain hidden.

Also, we don't want to track the preference when there's a single list, as the user didn't choose to see it.
2023-08-01 13:34:02 -03:00
Isaac Janzen
ed000be722
DEV: Convert merge-users modals to component-based API (#22727) 2023-08-01 10:35:36 -05:00
Rafael dos Santos Silva
5be658849b
UX: Fixes for new related topic styles (#22906) 2023-08-01 11:57:29 -03:00
Isaac Janzen
542b3ffc32
DEV: Convert change-timestamp modal to component-based API (#22832) 2023-08-01 08:52:03 -05:00
Isaac Janzen
6b9e208612
DEV: Convert download-calendar modal to component-based API (#22837) 2023-08-01 08:50:52 -05:00
Isaac Janzen
6c8af90f5d
DEV: Convert start-backup modal to component-based API (#22812) 2023-08-01 08:40:25 -05:00
Isaac Janzen
106a0498f1
DEV: Convert convert-to-public-topic modal to component-based API (#22835) 2023-08-01 08:18:03 -05:00
Isaac Janzen
99e05b1280
DEV: Convert edit-slow-mode modal to component-based API (#22840)
<img width="772" alt="Screenshot 2023-07-28 at 1 41 18 PM" src="https://github.com/discourse/discourse/assets/50783505/9e97c4c8-af29-4e56-80dc-4f0244e2c4db">
2023-08-01 08:17:49 -05:00
Martin Brennan
6286e790b2
DEV: Remove unread_private_messages and deprecation (#22893)
This was added all the way back in 2020 in b79ea986ac,
enough time has passed, we can delete this now.
2023-08-01 14:44:39 +10:00
Roman Rizzi
dd8d89d9c8
UX: Use full width when displaying a single recommendations list. (#22896) 2023-08-01 13:49:24 +10:00
Kris
6bf0c0a52e
UX: fix long image titles in experimental lightbox (#22883) 2023-07-31 18:36:33 -04:00
Roman Rizzi
e7fb4be23e
UX: Topic recommendations tweaks. (#22880)
This PR updates how we display related and suggested topics on mobile and desktop. It adds a new `PluginOutlet` specifically designed for adding new topic lists, which automatically work if following the same conventions as the ones inside `<MoreTopics />`.

While we display lists side by side on desktop, we only display one in mobile. You can switch to another one by clicking on the nav pills, and we'll automatically save your preference for next time.
2023-07-31 18:33:21 -03:00
David Taylor
7ecaf6295d
DEV: Correctly strip sourcemap URL from splash-screen js (#22879)
In e1d27400f5 we started running the splash-screen JS through terser, which removed the trailing newline from the `sourceMappingURL` line.

Adding a reliable end-to-end test for this isn't possible because our testing environment doesn't use terser.
2023-07-31 16:49:27 +01:00
Bianca Nenciu
a68752df25
UX: Move Admin Guide link to URL (#22789)
Co-authored-by: David Taylor <david@taylorhq.com>
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-07-31 15:30:27 +01:00
David Taylor
6e8e3c3151
FIX: Validate page/limit params for directory, user-badges and groups (#22877)
We'll now return a 400 error instead of 500. 400 is a better description of the issue, and also avoids creating unnecessary noise in the logs.
2023-07-31 15:00:05 +01:00
chapoi
984dd89cb4
Revert "UX: fix alignment extra buttons in post controls" (#22876)
This reverts commit 507551ea73.
2023-07-31 14:46:36 +02:00
Gerhard Schlager
1af33fdb71 REFACTOR: Use pluralized string for js.badges.awarded 2023-07-31 13:28:42 +02:00