Commit Graph

30036 Commits

Author SHA1 Message Date
Krzysztof Kotlarek
85e2f67367
FEATURE: API to set combined/separated sidebar mode. (#22753)
New API to change sidebar mode. We defined two:
Separated - only sections belonging to specific panel are displayed, and buttons to switch the panel are available as well.
Combined - all sections are displayed together and switch panel buttons are not visible.

In addition, as a part of refactoring, a new service called SidebarState was introduced.
2023-07-26 10:15:56 +10:00
Jordan Vidrine
5d1c1e5f62
prettier (#22786) 2023-07-25 16:19:07 -05:00
Isaac Janzen
0db03b684d
DEV: Convert delete-posts-confirmation modal to component-based API (#22700) 2023-07-25 16:11:32 -05:00
Penar Musaraj
c6dca50ba4
UX: Remove ring from avatar for a new user (#22780) 2023-07-25 14:49:44 -04:00
Mark VanLandingham
b91228d6c2
FIX: Looping attempt to reconnect in network connectivity service (#22783) 2023-07-25 11:57:28 -05:00
Natalie Tay
1ab1116cda
FIX: Disable the previous revision button if it is the last revision (#22784)
We introduced a tiny bug #22522.

When viewing the last revision of a post, we need to disable the  button. This fixes the issue.
2023-07-26 00:44:57 +08:00
Penar Musaraj
f5e8e737ad
UX: Compact option for multi-selects (#22239)
Adds an alternative to the default multi select item, better suited for quickly adding/removing tags.
2023-07-25 11:00:02 -04:00
Penar Musaraj
4e5756e3ae
FIX: Handle empty directory columns in /u route (#22747)
The `/u` route was broken when there were no directory columns because
its order parameter relied on the first column's name. This commit adds
a `likes_received` as the default order when there are no columns, which
results in a list of users being output without any additional columns.

For this very edge case, that's better than a JS error.
2023-07-25 10:58:43 -04:00
David Taylor
42a78bb4ad
UX: Hide header in dismiss modal (#22777)
The header was accidentally introduced during the refactoring in d8a87792af
2023-07-25 13:51:38 +01:00
Jarek Radosz
49fc775fad
FIX: Fast-edit shortcuts got lost in bdd97ff (#22762) 2023-07-25 14:45:59 +02:00
David Battersby
d11f02c03a
FIX: make document overflow hidden on both axis when lightbox is open (#22775)
Fixes issue with scrolling background when lightbox is opened on mobile.

Since we rely on swiping for navigating lightbox galleries on mobile, we want to disable document scrolling.
2023-07-25 15:27:32 +08:00
Ted Johansson
f1a43f2319
DEV: Handle SSL errors in push notification pusher (#22771)
We're seeing unhandled errors in production when web push notifications are failing with an SSL error. This is happening for a few users, but generating a large amount of log noise due to the sheer number of notifications.

This adds handling of SSL errors in two places:

1. In FinalDestination::HTTP, this is handled the same as a timeout error, and gives a chance to recover.
2. In PushNotificationPusher. This will cause the notification to retry a number of times, and if it keeps failing, disable push notifications for the user. (Existing behaviour.)

I wanted to wrap the SSL error in e.g. WebPush::RequestError, but the gem doesn't have request error handling, so didn't want to have the freedom patch diverge from the gem as well. Instead just propagating the raw SSL error.
2023-07-25 15:01:02 +08:00
Alan Guo Xiang Tan
752bb29415
FIX: Managing sidebar custom sections not working on subfolder (#22773)
Why this change?

We were verifying that a url for a section link in a custom sidebar
section is valid by passing the url string to `Router#recognize`.
If a `rootURL` has been set on the router, the url string that is passed
to `Router#recognize` has to start with the `rootURL`.

This commit fixes the problem by ensuring that `RouteInfoHelper` adds
the application subfolder path before calling `Router#recognize` on the
url string.
2023-07-25 13:57:49 +08:00
Alan Guo Xiang Tan
fe1034e89c
FIX: Loading more tags in edit nav menu tags modal not working (#22770)
Why this change?

When setting up the `IntersectionObserver`, we did not account for the
top margin and padding causing no intersection event to fire when the
last tag is load into view. This commits fixes the problem by setting a
bottom margin using the `rootMargin` option when setting up the
`IntersectionObserver`.

This commit also improves the test coverage surrounding the loading of
more tags.
2023-07-25 13:44:25 +08:00
Ted Johansson
513a026cb2
DEV: Consolidate ignore user modals (#22754)
We recently replaced another ignore user modal with a Glimmer and DModal based component. This change makes use of that same component in the user card ignore modal by adding an enableSelection flag.
2023-07-25 09:04:28 +08:00
dependabot[bot]
832369942a
Build(deps): Bump a11y-dialog from 7.5.2 to 8.0.0 in /app/assets/javascripts (#22751)
* Build(deps): Bump a11y-dialog in /app/assets/javascripts

Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 7.5.2 to 8.0.0.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/7.5.2...8.0.0)

---
updated-dependencies:
- dependency-name: a11y-dialog
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix failing test after upgrade

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2023-07-25 06:43:02 +08:00
Kris
ba91309cb8
UX: fix bookmark modal footer layout (#22766) 2023-07-25 06:42:29 +08:00
Jarek Radosz
320f271d35
DEV: Convert d-tooltip to gjs (#22760)
* Fix the usage of component args (this.args and this.attrs in an ember component? :P)
* Don't use an internal Ember API
* Glimmer! And GJS!
2023-07-24 16:43:00 +02:00
Jarek Radosz
6725a1d7bd
FIX: Restore the unconditional yield in d-button (#22759)
Fixes bootstrap button tooltips
2023-07-24 15:15:03 +02:00
chapoi
5a36abd073
UX: category hashtag colors order fix (#22758)
* UX: revert gradient of category hashtag colours

* tests
2023-07-24 14:36:56 +02:00
David Battersby
d8a87792af
DEV: Migrate Discard Draft to new Modal API (#22755)
Migrate discard draft to new modal API.
2023-07-24 19:48:12 +08:00
David Taylor
21dad02503
FIX: Correct router service call from some admin controllers (#22757)
72edb727 updated these to point to the router service, but the method name also needed to be changed from replaceRoute -> replaceWith
2023-07-24 12:32:17 +01:00
David Taylor
a5fa24d876
DEV: Correct typo in d-modal-body (#22756)
Interestingly, this missing parenthesis was silently repaired under Chrome/Firefox, but seems to have caused some issues on other browsers.

https://meta.discourse.org/t/272496
2023-07-24 12:28:20 +01:00
Alan Guo Xiang Tan
7a790a5f4c
UX: Display tag's description as title in navigation menu (#22710)
Why this change?

We're already displaying a category's description as the title attribute
on the category section link. We should do the same for tags as well.
2023-07-24 08:07:37 +08:00
dependabot[bot]
e19316aebf
Build(deps-dev): Bump terser in /app/assets/javascripts (#22752)
Bumps [terser](https://github.com/terser/terser) from 5.19.1 to 5.19.2.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.1...v5.19.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-07-24 00:41:31 +02:00
dependabot[bot]
0c822c8c87
Build(deps-dev): Bump sass in /app/assets/javascripts (#22750)
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.0 to 1.64.1.
- [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.0...1.64.1)

---
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-07-24 00:32:43 +02:00
Emmett Ling
978d52841a
FEATURE: Implement SiteSetting to Allow Anonymous Likes (#22131)
Allow anonymous users (logged-in, but set to anonymous posting) to like posts

---------

Co-authored-by: Emmett Ling <eling@zendesk.com>
Co-authored-by: Nat <natalie.tay@discourse.org>
2023-07-21 21:21:07 +08:00
Jarek Radosz
8ffc274438
DEV: Remove bulk-actions-buttons template (#22742)
No longer used
2023-07-21 13:45:41 +02:00
Kelv
2968fb6a5c
FIX: Render user profile trust level name for TL0 (#22740)
* Why was this change necessary?
The current logic in the user.hbs template file does not render the
trust level element for the user's info panel when the user is TL0,
because 0 is treated as falsey in the `if` conditional block.

Ref: https://meta.discourse.org/t/tl0-not-displayed-on-users-profile-pages/271779/10

* How does it address the problem?

This PR adds a predicate helper method local to the user controller that
includes an additional check which returns true if the trust_level of
the user is 0 on top of the existing logic. This allows TL0 users to
have their trust level rendered correctly in their profile's info panel.
2023-07-21 15:16:34 +08:00
David Battersby
351e8e2359
FIX: capture click target in lightbox click handler (#22732)
In Safari, clicking any image in a lightbox gallery results in the first image loading (instead of the clicked image).

Previously we relied on document.activeElement to determine which lightbox image was clicked. However in Chrome the active element is the lightbox selector (a.lightbox), whereas in Safari the active element defaults to the body tag.

Currently the startingIndex that is calculated within processHTML() is used by lightbox to determine which image to load first. The starting index is currently achieved by checking each lightbox element within the gallery against the active element.

To fix this issue we can use the event.target to get the clicked image, then use the closest selector and pass that into the function to do the matching and return the correct startingIndex.
2023-07-21 12:28:37 +08:00
Ted Johansson
4ef8129bff
DEV: Remove deprecated whitelist methods (#22731)
These methods were deprecated and marked for removal in 2.6. This change deletes them.

These deprecations use raise_error: true, so the fallbacks are at this point unreachable and can't be used anyway.
2023-07-21 11:32:21 +08:00
Krzysztof Kotlarek
a5c0b87d25
FIX: wrong collapsible parameter in sidebar API (#22729)
Bug introduced here https://github.com/discourse/discourse/pull/22534/files#diff-a53b5ae4b732d8bd06143ca91d1b5e96ab8cc1d6283f223d53bd8dae0f536d3eR9

https://github.com/discourse/discourse/pull/22534/files#diff-b145895f327646d995f2231c305745bf0c61108087bfc001b598d9fcfdbd828fR15

We are passing @collapsable and not @collapsableSections
2023-07-21 12:45:18 +10:00
Jarek Radosz
b65b452330
DEV: Fix flakyness of keyboard navigation (#22721)
1. in the test, hiding is now done with css so if element gets rerendered it won't lose the styling
2. the skipping now allows for the `<article>` element itself being hidden
2023-07-21 09:07:48 +08:00
David Taylor
b426ac68ec
DEV: Enable broccoli memoization for faster incremental rebuilds (#22726)
This has been proposed as the new default, and is currently in-use on many large ember apps without issue. It is already the default under Embroider. Testing locally, this seems to make incremental builds in development at least 2x faster.

https://github.com/ember-cli/ember-cli/issues/8681
2023-07-20 23:24:21 +01:00
Isaac Janzen
37942cb8bb
DEV: Convert admin-incoming-email modal to component-based API (#22701)
- Convert `admin-incoming-email` modal to component-based API
- Testing that the modal was working in local development was extremely challenging due to the need for `rejected` and `bounced` emails. Something that is not easy to stub in a local dev environment. To make this process more smooth for future developers I have added a new rake task:

```
desc "Creates sample email logs"
task "email_logs:populate" => ["db:load_config"] do |_, args|
  DiscourseDev::EmailLog.populate!
end
```

That will generate fully functional email logs in development to be toyed with.

<img width="787" alt="Screenshot 2023-07-20 at 3 27 04 PM" src="https://github.com/discourse/discourse/assets/50783505/47b3fe34-cd7e-49a5-8fe6-768c0fbd1aa2">
2023-07-20 16:31:20 -05:00
dependabot[bot]
9ff56ef474
Build(deps-dev): Bump sass in /app/assets/javascripts (#22723)
Bumps [sass](https://github.com/sass/dart-sass) from 1.63.6 to 1.64.0.
- [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.63.6...1.64.0)

---
updated-dependencies:
- dependency-name: sass
  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-07-20 22:30:13 +02:00
David Taylor
eb94ec16da
DEV: introduce Ember <template> tag support (.gjs) (#22719)
The gjs/gts formats are a new pattern for authoring Ember components. This commit introduces support for these patterns to our build pipeline for core/plugins, and converts a handful of components to use the new format. It also introduces relevant updates to our linting config, and to our sample vscode configuration.

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
Co-authored-by: Krystan HuffMenne <kmenne+github@gmail.com>
2023-07-20 21:01:12 +01:00
Jarek Radosz
9bbd5efbec
DEV: Convert helpers into plain functions (#22385)
Since 0fa92529ed, helpers can now be implemented as plain JS functions. This makes them much easier to write/read, and also makes them usable in `<template>` gjs files.
2023-07-20 19:45:40 +01:00
Roman Rizzi
238d71bcad
FEATURE: Regenerate outdated summaries. (#22718)
Users unable to generate new summaries won't be able to regenerate them. They'll only see the warning saying it's outdated.
2023-07-20 15:25:46 -03:00
David Battersby
88dc6afe64
DEV: skip flaky lightbox loading state test (#22709)
Skips a flaky test for the new lightbox loading state.
2023-07-20 11:00:22 +08:00
Krzysztof Kotlarek
3355298f9f
FEATURE: ability to position switch panel buttons (#22707)
SiteSetting which allow to position switch panels buttons at the top or the bottom of the Sidebar.
2023-07-20 12:52:46 +10:00
Ted Johansson
9a6bbac5bd
DEV: migrate ignore duration to Glimmer and DModal (#22687)
This PR migrates the ignore modal to a Glimmer component and DModal. Most of the code is lift-and-shift.
2023-07-20 10:49:58 +08:00
Krzysztof Kotlarek
117f6d92a8
FEATURE: allow sidebar section api to create external links (#22609)
* FEATURE: allow sidebar section api to create external links

Right now, sidebar API allows creating sections with internal links. It should be extended to allow creating links to external URLs as well.

* FIX: after rebase
2023-07-20 09:07:18 +08:00
Jarek Radosz
b105c6c510
DEV: Remove the last/only use of inline-date helper (#22692)
See: https://github.com/discourse/discourse/pull/22385
2023-07-19 21:13:40 +02:00
Roman Rizzi
9650bf9d08
DEV: disambiguate system spec find to prevent flakyness (#22698) 2023-07-19 15:57:23 -03:00
Godfrey Chan
e1d27400f5
DEV: refactor ember-cli-build (#22694)
pass the extra public trees to `app.toTree()` to match:

0e00f2bf15/packages/test-setup/src/index.ts (L24-L27)

The ember-cli-terser addon now takes care of minifying all additional trees, so we can remove our custom terser-related logic
2023-07-19 17:48:20 +01:00
Roman Rizzi
132bd375f6
UX: Show the info icon outside the tooltip (#22696) 2023-07-19 13:33:17 -03:00
Godfrey Chan
a295298649
DEV: update index.html files (#22695)
This brings them more in line with an idiomatic ember app looks
like, in particular, embroider really expects the CSS file to be
there.

As far as I can tell this is fairly harmless, since in production
the actual HTML is generated and served by Rails anyway.

Down the road, this may also be a good alternative to hacking the
build pipeline to bring in styles for tests.
2023-07-19 17:31:08 +01:00
Isaac Janzen
1561e51a13
DEV: Revert "DEV: Update replaceWith on Route (#22645)" (#22693)
This reverts commit 33db93c9b2.
2023-07-19 10:47:31 -05:00
Ted Johansson
341acacba8
DEV: Add endpoint for dismissing outdated translations (#22509)
Recently we started giving admins a notice in the advice panel when their translations have become outdated due to changes in core. However, we didn't include any additional information.

This PR adds more information about the outdated translation inside the site text edit page, together with an option to dismiss the warning.
2023-07-19 23:06:13 +08:00
Roman Rizzi
3820fae041
UX: Disclose AI model used and add animation to placeholder (#22670)
* UX: Disclose AI model used and add animation to placeholder

* Move text into hbs template

DTooltip (weirdly) attaches to a sibling element, so we need something else to be rendered inside the RenderGlimmer wrapper div

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2023-07-19 12:03:36 -03:00
Jarek Radosz
00ab94bf53
DEV: Migrate topic-bulk-actions to the new modal API (#22690) 2023-07-19 15:27:51 +02:00
David Taylor
6fd06bc411
FIX: Ensure 'modern' modal is closed when opening legacy modal (#22689)
e.g. the modernised share-topic modal will attempt to open the `create-invite` modal. Prior to this commit, this mixing of modern/legacy would fail silently, and the create-invite modal was never shown.
2023-07-19 12:22:00 +01:00
Sam
e5bb4bbd59
FIX: banners not removing when unset (#22678)
Initializing an EmberObject with a null object leads to an exception. This commit stops that from happening, and introduces an acceptance test for adding/removing banner topics via message-bus.

Co-authored-by: David Taylor <david@taylorhq.com>
2023-07-19 11:57:52 +01:00
David Taylor
125903f682
FIX: Staff action log could not be accessed via link (#22688)
011ba5b9 slightly changed the way the staff-action-log route is activated. It's now possible for `deserializeQueryParam` to be called with a null value, so we need to deal with that case.

This route is currently untested - we'll follow-up with another commit to add some.
2023-07-19 11:40:48 +01:00
Jarek Radosz
bdd97ff931
DEV: Convert fast-edit on mobile to a modal (#22570)
Motivation: to fix an issue with fast-edit positioning on mobile (android) Trying to correctly position that textarea/popper element proved difficult

see: https://meta.discourse.org/t/fast-edit-input-container-position/263190
2023-07-19 11:43:00 +02:00
Jarek Radosz
70cebfb6ab
DEV: Skip hidden elements in J / K navigation (#22671) 2023-07-19 11:41:18 +02:00
Ted Johansson
c2e90f8c07
DEV: Migrate publish page modal to Glimmer and DModal (#22663)
This PR migrates the publish page modal to a Glimmer component and DModal.

Most of the code is lift-and-shift. However, the component state getters were implemented using meta-programming in the original controller. They have all been inlined here for clarity, searchability, etc.
2023-07-19 10:37:07 +08:00
Krzysztof Kotlarek
20ec7ac174
FEATURE: new API to add panels to sidebar (#22534)
Define new concept of panels in sidebar. Panels are wrappers around sidebar sections. In the future, it allows creating full focus mode by switching between panels.

A new API method called addSidebarPanel was added. Default main panel is already registered and by default all API sections are mounted to main.
2023-07-19 11:31:45 +10:00
Martin Brennan
54001060ea
FIX: Termless hashtag search when a type is disabled (#22660)
When a type was disabled, the hashtag search _without_ a
term was erroring. This was because we weren't filtering
out the disabled types from types_in_priority_order first
like we were if there was a term provided.

This commit fixes that issue, and also makes it so
contexts_with_ordered_types and ordered_types_for_context
will only return hashtag types which are enabled.
2023-07-19 10:10:33 +10:00
Isaac Janzen
bd88b7d6c4
DEV: Remove transition-methods deprecation (#22673)
All https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods deprecations have been resolved.
2023-07-18 16:09:28 -05:00
Isaac Janzen
72edb7270c
DEV: Upgrade replaceRoute on Controller (#22648)
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.replaceRoute` calls on controllers to directly call the router service (`this.router.replaceRoute`)
2023-07-18 15:16:41 -05:00
Isaac Janzen
33db93c9b2
DEV: Update replaceWith on Route (#22645)
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.replaceWith` calls on routes to directly call the router service (`this.router.replaceWith`)
2023-07-18 15:05:53 -05:00
Juan David Martínez Cubillos
7422fe7c3f
FIX: Embedding checkbox bug (#22672) 2023-07-18 15:02:07 -05:00
Isaac Janzen
a2ea9c5417
DEV: upgrade transitionToRoute on Controller (#22647)
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.transitionToRoute` calls on controllers to directly call the router service (`this.router.transitionTo`)
2023-07-18 14:53:23 -05:00
Isaac Janzen
011ba5b9f6
DEV: Update transitionTo on Route (#22644)
Per https://deprecations.emberjs.com/v3.x/#toc_routing-transition-methods

We are upgrading all `this.transitionTo` calls on routes to directly call the router service (`this.router.transitionTo`)
2023-07-18 14:52:55 -05:00
Penar Musaraj
bd7e5c15fb
UX: Fix focus state style for date button in composer (#22669) 2023-07-18 15:39:52 -04:00
Jean
defa8904b9
FEATURE: Add limit and group exclusion to the directory items endpoint (#22667)
* FEATURE: Add limit and group exclusion to the directory items endpoint
2023-07-18 15:09:32 -04:00
Jarek Radosz
2a96064e6b
DEV: Modernize topic-bulk-actions (#22186)
Introduces new plugin api for adding bulk topic actions:

Example:

```js
api.addBulkActionButton({
  label: "super_plugin.bulk.enhance",
  icon: "magic",
  class: "btn-default",
  visible: ({ currentUser, siteSettings }) => siteSettings.super_plugin_enabled && currentUser.staff,
  async action({ setComponent }) {
    await doSomething(this.model.topics);
    setComponent(MyBulkModal);
  },
});
```
2023-07-18 20:10:16 +02:00
Godfrey Chan
3c69570b75
DEV: move deprecation silencer to a shared package (#22668)
This babel plugin is intended to supress the deprecation warnings
from building plugins, however, discourse-plugins does not actually
consume this plugin at all. Currently this happens to work due to
how the babel worker processes are shared and the timing/ordering
of the build, but it will stop working with the embroider build.

This commit extracts the plugin the a shared package so that it
can be properly consumed by discourse-plugins as well as core.
2023-07-18 19:07:20 +01:00
Isaac Janzen
5fbce985a8
DEV: Convert create-invite-bulk modal to component-based API (#22549)
This PR converts the `create-invite-bulk` modal to make use of the new component-based API
2023-07-18 12:31:32 -05:00
Isaac Janzen
6ba8259918
DEV: Add loading spinner to history modal (#22666)
https://github.com/discourse/discourse/assets/50783505/b5f510a8-719c-461c-a02f-a8b3a8573466
2023-07-18 12:30:27 -05:00
Selase Krakani
3d554aa10e
FIX: Keep ReviewableQueuedPosts even with user delete reviewable actions (#22501)
Performing a `Delete User`/`Delete and Block User` reviewable actions for a
queued post reviewable from the `review.show` route results in an error
popup even if the action completes successfully.

This happens because unlike other reviewable types, a user delete action
on a queued post reviewable results in the deletion of the reviewable
itself. A subsequent attempt to reload the reviewable record results in
404. The deletion happens as part of the call to `UserDestroyer` which
includes a step for destroying reviewables created by the user being
destroyed. At the root of this is the creator of the queued post
being set as the creator of the reviewable as instead of the system
user.

This change assigns the creator of the reviewable to the system user and
uses the more approapriate `target_created_by` column for the creator of the
post being queued.
2023-07-18 11:50:31 +00:00
dependabot[bot]
3a1dc7ec6d
Build(deps-dev): Bump webpack in /app/assets/javascripts (#22662)
Bumps [webpack](https://github.com/webpack/webpack) from 5.88.1 to 5.88.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.88.1...v5.88.2)

---
updated-dependencies:
- dependency-name: webpack
  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-07-18 11:35:46 +02:00
David Taylor
8f17b85de6
DEV: Set ember edition to Octane (#22623)
- explicitly enables the jquery-integration. This was previously enabled by default, so no change in behavior for us

- enable template-only-glimmer-components. In core, we don't have any component templates under `templates/components`, so this flag has no effect. A shim, with associated tests, is introduced to preserve the old template-only 'classic component' behavior for themes and plugins.
2023-07-18 10:00:19 +01:00
David Taylor
be62c3e323
DEV: Unsilence legacy modal deprecation (#22634)
We'd like to get this deprecation unsilenced before the 3.1 release so that theme/plugin developers see the messages and can make the necessary changes during the 3.2 release cycle. To avoid the remaining legacy core modals from creating overwhelming noise in the logs, deprecation messages for them are skipped.
2023-07-18 09:58:35 +01:00
David Taylor
104baab557
FIX: Do not track first AJAX request as a pageview (#22661)
When the app boots, Ember fires a `routeWillChange` event. This was causing us to set the `_trackView` flag in our ajax library, which would cause the next request to have the `Discourse-Track-View` header, despite not being relevant to the page view. Depending on the plugins/themes installed, this could lead to 'double counting' of pageviews. (because the initial HTML request is also counted as a page view)

This commit updates the the logic to ignore the first transition (by checking `transition.from`), and also introduces an acceptance test for the behaviour.

Co-authored-by: Régis Hanol <regis@hanol.fr>
2023-07-18 09:58:01 +01:00
David Battersby
3c1dd4a62c
FIX: check if dominant color is set before updating site theme color (#22658)
Currently the dominant color attribute is only set for post images (not chat).
As a result, clicking lightbox images in chat will load the image within lightbox but also shows a JS error.
This change ensures that the dominant color is set before attempting to update the site theme color.
2023-07-18 12:14:58 +08:00
Ted Johansson
72ea73988c
DEV: Add missing report filter type in bookmarks report (#22616)
Adding a filter without a type parameter has been deprecated for the last three years, and was marked for removal in 2.9.0.

During this time we have had a few deprecation warnings in logs coming from Reports::Bookmarks.

The fallback was to set the type to the name of the filter. This change just passes the type (same as name) explicitly instead, and removes the deprecation fallback.
2023-07-18 11:07:01 +08:00
Ted Johansson
7c0534c292
DEV: Replace raw comments with deprecation warnings (#22617)
We have a number of raw comments indicating that certain methods and classes are deprecated and marked for removal. This change turn those comments into deprecation warnings so that we can 1) see them in the logs of our own hosting and 2) give some warning to self hosters.
2023-07-18 10:13:40 +08:00
Krzysztof Kotlarek
b719688887
FIX: sometimes stuck of sidebar reorder (#22654)
When the mouse was moved quickly, the browser stayed in drag and drop mode and an additional click was required to exit drag and drop mode.
2023-07-18 11:56:43 +10:00
Alan Guo Xiang Tan
3da6759860
FEATURE: Add admin dashboard warning for legacy navigation menu (#22655)
Why this change?

The `legacy` navigation menu option for the `navigation_menu` site
setting will be removed shortly after the release of Discourse 3.1 in
the first beta release of Discourse 3.2. Therefore, we're adding an
admin dashboard warning to give sites on the `legacy` navigation menu a
heads up.
2023-07-18 09:41:38 +08:00
Martin Brennan
b583872eed
DEV: Introduce enabled? API to hashtag data sources (#22632)
We need a nice way to only return some hashtag data
sources based on various site settings. This commit
adds an enabled? method that every hashtag data source
must implement. If this returns false the data source
will not be used at all for hashtag lookups or search.
2023-07-18 09:39:01 +10:00
Alan Guo Xiang Tan
d3a7d335b9
DEV: Bump plugin-api.js to 1.7.0 (#22629)
What does this change do?

This commit removes the experimental label for a bunch of APIs that have
been used in production for quite some time at Discourse so that the
APIs can be released as part of Discourse 3.1
2023-07-18 07:29:55 +08:00
dependabot[bot]
e30b7776e7
Build(deps-dev): Bump terser from 5.19.0 to 5.19.1 in /app/assets/javascripts (#22649)
Bumps [terser](https://github.com/terser/terser) from 5.19.0 to 5.19.1.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.19.0...v5.19.1)

---
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-07-18 06:32:09 +08:00
Roman Rizzi
77e5153350
UX: Point that topic summaries are generated by an AI (#22646) 2023-07-17 17:24:41 -03:00
Isaac Janzen
bdaecc90c4
DEV: Convert group-default-notifications modal to component-based API (#22521)
This PR converts the `group-default-notifications` modal to make use of the new component-based API
2023-07-17 15:06:30 -05:00
Isaac Janzen
80a1709965
DEV: Convert history modal to component-based API (#22522)
This PR converts the `history` modal to make use of the new component-based API
2023-07-17 13:16:40 -05:00
Joffrey JAFFEUX
e214fc38ed
FIX: in modal should check for body (#22642)
To decide to use flip behavior select-kit will check if it's located inside a modal as a modal will scroll if overflown, however, when locating the select-kit element in the footer or header this is not the case. This commit will deactivate `flip` modifier only when used inside modal body.
2023-07-17 17:39:01 +02:00
David Battersby
d44c9cf065
FIX: bind selector to event listener callback for lightbox (#22637)
Fixes an issue where this.selector value was not binded at the time of adding the event listener. Therefore when someone opens a chat channel that has images, the value of selector would change. I also moved the callback to a named function (rather than the default handleEvent).
2023-07-17 19:55:48 +08:00
chapoi
346ccfd7f5
UX: firefox fix for shorthand modal width (#22638) 2023-07-17 13:16:45 +02:00
Joffrey JAFFEUX
a610c86302
DEV: adds touchMove support for widgets (#22635)
No tests as widgets are in maintenance mode until we can remove it, and this is also hard to test.
2023-07-17 12:49:00 +02:00
Alan Guo Xiang Tan
37fd05af4e
FIX: Editing tags in sidebar should show all tags visible to user (#22628)
Why this change?

Prior to this change, we would only return tags that are used in at
least one public topic. However, this is confusing for users because the
tag could be used in a restricted category and that is not considered a
"public" topic. Instead, we will just display all the tags in the edit
tags navigation modal as long as it is visible to the user.
2023-07-17 11:47:52 +08:00
dependabot[bot]
edc837eaf5
Build(deps-dev): Bump babel-import-util from 1.3.0 to 1.4.1 in /app/assets/javascripts (#22626)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 1.3.0 to 1.4.1.
- [Commits](https://github.com/ef4/babel-import-util/compare/v1.3.0...v1.4.1)

---
updated-dependencies:
- dependency-name: babel-import-util
  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-07-17 08:58:46 +08:00
dependabot[bot]
9d8927c4f9
Build(deps-dev): Bump eslint from 8.44.0 to 8.45.0 in /app/assets/javascripts (#22625)
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.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.44.0...v8.45.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-07-17 08:58:32 +08:00
Martin Brennan
6459922993
DEV: Move Bookmark modal/component to use d-modal (#22532)
c.f. https://meta.discourse.org/t/converting-modals-from-legacy-controllers-to-new-dmodal-component-api/268057

This also converts the Bookmark component to a Glimmer
component.
2023-07-17 10:14:17 +10:00
Roman Rizzi
0a65b9f098
UX: Disable summarize button while generating summary (#22618) 2023-07-14 12:19:51 -03:00
marstall
3e6e33df35
redirect to /login after account delete to prevent recreation of sso account (#22575)
* redirect to /login after account delete to prevent recreation of sso account

* after delete, redirect to /login if siteSettings.login_required
2023-07-14 11:13:45 -04:00
Ted Johansson
7a53fb65da
FIX: Don't show admin warnings about deleted translation overrides (#22614)
We recently introduced this advice to admins when some translation overrides are outdated or using unknown interpolation keys:

However we missed the case where the original translation key has been renamed or altogether removed. When this happens they are no longer visible in the admin interface, leading to the confusing situation where we say there are outdated translations, but none are shown.

Because we don't explicitly handle this case, some deleted translations were incorrectly marked as having unknown interpolation keys. (This is because I18n.t will return a string like "Translation missing: foo", which obviously has no interpolation keys inside.)

This change adds an additional status, deprecated for TranslationOverride, and the job that checks them will check for this status first, taking precedence over invalid_interpolation_keys. Since the advice only checks for the outdated and invalid_interpolation_keys statuses, this fixes the problem.
2023-07-14 16:52:39 +08:00
David Battersby
ad365fad7a
FIX: lightbox setup blocked due to waiting for first image load (#22612)
The Problem
Clicking on a large image opens lightbox, however the new lightbox currently waits for the first image to finish loading before it finishes loading the lightbox UI correctly (ie. background color). This makes the visual experience feel broken.

Because open() is waiting for the image to load, it doesn't trigger the onOpen callback, which appends a .has-lightbox class to the html tag. The lightbox background color requires that css class to be set for the styles to be applied correctly.

The Solution
This PR prevents blocking when loading loading the first image (image that was clicked) within the lightbox, and therefore allows the css class to be appended to the html tag correctly and as a result fixing the styling issues.

The #setCurrentItem  function is async and awaits the loading of preloadItemImages already, so the image will load correctly when complete despite the rest of the UI loading in advance.
2023-07-14 14:02:06 +08:00