Commit Graph

30315 Commits

Author SHA1 Message Date
Roman Rizzi
7d0e2b9e7b
FIX: Keep track of suggestion updates during scrolling and navigation. (#23190)
This PR changes how we track which lists are available for a topic and how we decide which is the active one. The new approach centralizes everything in the service, and exposes functions for adding/removing a list, which each calls via `did-insert/will-destroy` modifiers.

It makes it much easier to track and update state when navigated to another topic or PM, ensuring things get updated correctly.
2023-08-22 14:10:15 -03:00
David Taylor
b5b4a3f233
UX: Fix positioning of mobile show-more following 71ff3417 (#23189)
71ff3417 removed the mobile-specific template for discovery/topics. It was noted that this would introduce an additional `<div class='show-more'>` wrapper around the new topic indicator on mobile, but I didn't realise that it would cause positioning problems on mobile.

This commit moves the desktop-specific CSS into the desktop SCSS file so that it does not apply to mobile.
2023-08-22 17:16:12 +01:00
Jarek Radosz
3a37ecfccd
DEV: Remove unused files (#23185)
I believe those were supposed to be deleted in fe294ab1a77c1026b6996550eb8c36b6f07e1b73?
2023-08-22 16:50:44 +02:00
David Taylor
71ff3417a6
DEV: Remove dedicated mobile template for discovery/topics (#23179)
Separate mobile templates are a pattern we're moving away from. They are not supported by Ember, and make things more difficult to develop/test. The differences between the mobile and desktop templates for `discovery/topics` are very minimal, so they can be easily integrated.

The only feature missing from the main template was the new 'list header controls' UI. This commit introduces that to the main template inside an `mobileView` conditional.

Key changes in behavior, many of which could be considered bug fixes, are:

- Mobile will now include 'redirected reason'
- Mobile will now include shared drafts
- Mobile will now include before-topic-list and after-topic-list Plugin Outlets
- Mobile will now have a `<div class="show-more">` wrapper around the 'new or updated' UI, to match desktop. This does not seem to cause any visual change.

Mobile-specific template overrides of `discovery/topics` will continue to function as before - this should not be a breaking change for any themes/plugins.

Mobile-specific templates for the topic list and topic-list-item remain in place.
2023-08-22 15:42:51 +01:00
Jarek Radosz
fd8fdb060f
DEV: Clean up extraneous helper parens (#23186) 2023-08-22 16:42:22 +02:00
Blake Erickson
26b3c63c74
DEV: Tighten up fuzzy search site setting results (#23176)
Sometimes the fuzzy search would return too many site setting results
making it hard to find what you are searching for. This change still
allows for fuzzy searching but tightens up the criteria for being a
fuzzy match.

One example is searching for 'cheer', a term associated with a plugin,
previously returned ~55 search results. With this change it will return
~13 (Actual numbers depend on how many plugins your instance has).

Another example is searching for 'digest'. Previously returned ~37
results and now will return ~14.

Follow up to: e63e193a0a

See also: https://meta.discourse.org/t/276013
2023-08-21 19:04:57 -06:00
Isaac Janzen
742d71e99c
DEV: Finalize glimmer search menu (#23174)
There was a few outstanding items that needed cleaning up.
### Make sure we don't clear the topic context prematurely
##### Before
https://github.com/discourse/discourse/assets/50783505/e92e4d6f-f42c-4357-8f13-8fa9f1024ade

_getting to zero search characters would automatically clear the search context_

##### After
https://github.com/discourse/discourse/assets/50783505/fd805dfd-576d-4e32-b6b5-5b93c25a5782

### Style fixes
##### Before
<img width="498" alt="Screenshot 2023-08-21 at 4 37 31 PM" src="https://github.com/discourse/discourse/assets/50783505/70847db1-43ec-477e-a21a-54ef2de0af42">

##### After
<img width="500" alt="Screenshot 2023-08-21 at 4 38 36 PM" src="https://github.com/discourse/discourse/assets/50783505/98cfb2e9-7c4d-44a6-bde2-53b85318fed3">

##### Before
<img width="450" alt="Screenshot 2023-08-21 at 4 33 45 PM" src="https://github.com/discourse/discourse/assets/50783505/3e057a52-5d1c-4776-93d0-a48133a722bc">

##### After
<img width="451" alt="Screenshot 2023-08-21 at 4 34 30 PM" src="https://github.com/discourse/discourse/assets/50783505/77548f6c-a9cf-4cf8-88d8-ee249736d684">

##### Before
<img width="460" alt="Screenshot 2023-08-21 at 4 31 01 PM" src="https://github.com/discourse/discourse/assets/50783505/9da57868-bc66-4d84-9108-4ae705a0562b">

##### After
<img width="456" alt="Screenshot 2023-08-21 at 4 30 52 PM" src="https://github.com/discourse/discourse/assets/50783505/f9444546-97f2-4d1a-9f78-7407f0f32ae7">
2023-08-21 17:51:11 -05:00
Isaac Janzen
3eb8046dde
DEV: Update replaceWith on Route (#23153)
# Context
This PR was originally implemented in https://github.com/discourse/discourse/pull/22645 then reverted in https://github.com/discourse/discourse/pull/22693. We protect from aborted transition when _awaiting_ on `replaceWith` by utilizing [followRedirects()](https://api.emberjs.com/ember/5.1/classes/Transition/methods/followRedirects?anchor=followRedirects)

# Description
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-08-21 16:53:54 -05:00
Joffrey JAFFEUX
3bb2f3a604
FIX: correctly recognizes URL with subfolder (#23173)
Prior to this fix minimizing a full page chat on a subfolder install would cause the drawer to not show.
2023-08-21 22:12:05 +02:00
David Taylor
201c39e68e
DEV: Ensure plugin raw connectors are transpiled to /raw-templates (#23170)
Transpiling to `/raw-templates` is important so that they are detected by the `eager-load-raw-templates` initializer. Prior to 16c6ab86 this wasn't a problem because all connector modules were being eager-loaded. Now that connectors are lazily loaded, it's critical that `eager-load-raw-templates` does the eager loading. This problem doesn't affect themes because they compile raw templates into an iife instead of a `define()` module.

Unfortunately we don't have any way to introduce automated testing for this part of our compilation pipeline. However, discourse-calendar will begin depending on this functionality imminently, so its tests will warn us of future regressions.
2023-08-21 19:24:49 +01:00
Mark VanLandingham
730f652255
DEV: Add plugin modifier locations for user search locations (#23169) 2023-08-21 12:23:42 -05:00
Joffrey JAFFEUX
932fd089c5
DEV: converts user-status modal to component (#23168) 2023-08-21 16:19:21 +02:00
David Taylor
121cd886a4
PERF: Improve rendering performance of empty PluginOutlets (#23165)
This commit introduces a 'shortcut' when rendering PluginOutlets which have no registered connectors. On my machine, this improves rendering performance of empty PluginOutlets by around 30-40% (tested by running tachometer on a `/latest` route with 600 plugin outlets).
2023-08-21 13:42:59 +01:00
Jarek Radosz
c48e29db02
DEV: Use object spread instead of Object.assign({}, …) (#23167)
Same behavior, more consistent and concise code.
2023-08-21 14:28:16 +02:00
Ted Johansson
928a6cd143
FIX: Delete fast typer reviewable when deleting user (#23162)
In most cases, deleting a user from outside the review UI will also delete any pending reviewables for that user. This was not working in some cases, e.g. for reviewables created due to "fast typer" violations.

This was happening because UserDestroyer only automatically resolves flagged posts.

After this change, in addition to existing checks, look for ReviewablePost where the post was created by the user and reject them if present.
2023-08-21 18:03:03 +08:00
dependabot[bot]
db40941deb
Build(deps): Bump ember-cli-babel in /app/assets/javascripts (#23157)
Bumps [ember-cli-babel](https://github.com/babel/ember-cli-babel) from 7.26.11 to 8.0.0.
- [Release notes](https://github.com/babel/ember-cli-babel/releases)
- [Changelog](https://github.com/babel/ember-cli-babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/ember-cli-babel/compare/v7.26.11...v8.0.0)

---
updated-dependencies:
- dependency-name: ember-cli-babel
  dependency-type: direct:production
  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-08-21 11:27:24 +02:00
dependabot[bot]
42bcec6c79
Build(deps-dev): Bump sass in /app/assets/javascripts (#23156)
Bumps [sass](https://github.com/sass/dart-sass) from 1.66.0 to 1.66.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.66.0...1.66.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-08-21 11:01:16 +02:00
Kris
2a49757f35
UX: update /new toggle styles, class names (#23154)
* Minor style adjustments
* Removes "all" count because it's redundant to the count on New
* Updates generic class names with -- modifier to follow BEM and help avoid class name collisions
* Hides the toggle when bulk select is enabled (the UI ends up being too busy)
2023-08-21 09:34:12 +08:00
Juan David Martínez Cubillos
477a5dd371
FEATURE: Digest suppression by tags (#23089)
* FEATURE: Digest suppression by tags

* fixed stree issues

* fixed code so untagged topics are not suppressed when suppressing certain tags
2023-08-18 14:28:20 -05:00
Joffrey JAFFEUX
b2b84cc957
FEATURE: implements user based sidebar mode (#23078) 2023-08-18 20:33:07 +02:00
David Taylor
82b16f4f47
DEV: Do not manipulate theme module paths at build-time (#23148)
Manipulating theme module paths means that the paths you author are not the ones used at runtime. This can lead to some very unexpected behavior and potential module name clashes. It also meant that the refactor in 16c6ab8661 was unable to correctly match up theme connector js/templates.

While this could technically be a breaking change, I think it is reasonably safe because:

1. Themes are already forced to use relative paths when referencing their own modules (since they're namespaced based on the site-specific id). The only time this might be problematic is when theme tests reference modules in the theme's main `javascripts` directory

2. For things like components/services/controllers/etc. our custom Ember resolver works backwards from the end of the path, so adding `discourse/` in the middle will not affect resolution.
2023-08-18 18:15:23 +01:00
Mark VanLandingham
291749e35b
DEV: Move PluginOutlet at bottom of TopicNavigation (#23149) 2023-08-18 11:41:09 -05:00
marstall
0dd1ee2e09
FIX: correct bulk invite expire time for DST (#23073)
This is a bug that happens only when the current date is less than 90 days from a date on which the time zone transitions into or out of Daylight Savings Time.

In these conditions, bulk invites show the time of day of their expiration as being 1 hour later than the current time.

Whereas it should match the time of day the invite was generated.

This is because the server has not been using the user's timezone in calculating the expiration time of day. This PR fixes issue by considering the user's timezone when doing the date math.

https://meta.discourse.org/t/bulk-invite-logic-to-generate-expire-date-bug/274689
2023-08-18 12:33:40 -04:00
Daniel Waterworth
91f560a521
DEV: Make every DistributedCache lazily instantiated (#23147) 2023-08-18 10:59:11 -05:00
Selase Krakani
87ebbec9b2
FIX: Pending post deletion by creator (#23130)
`ReviewableQueuedPost` got refactored a while back to use the more
appropriate `target_created_by` for the user of the post being queued
instead of `created_by`. The change was not extended to the `DELETE
/review/:id` endpoint leading to error responses for a user attempting
to deleting their own queued post.

This fix extends the `Reviewable` lookup implementation in
`ReviewablesController#destroy` and Guardian implementation to account
for this change.
2023-08-18 15:30:59 +00:00
Joffrey JAFFEUX
4661bcb5ea
FIX: correctly makes this accessible in the scope (#23146) 2023-08-18 17:20:59 +02:00
Kris
51e369a2c6
UX: update admin popular theme list (#23134) 2023-08-18 09:07:25 -04:00
Penar Musaraj
10c6b2a0c2
WIP: Rename Webauthn to DiscourseWebauthn (#23077) 2023-08-18 08:39:10 -04:00
David Taylor
16c6ab8661
DEV: Allow plugin outlets to be defined using gjs (#23142)
Previously we were discovering plugin outlets by checking first for dedicated template files, and then looking for classes to match them. This doesn't work for components which are entirely defined in JS (e.g. those authored with gjs, or those which are re-exports of a colocated component).

This commit refactors our detection logic to look for both class and template modules in a single pass. It also refactors things so that the modules themselves are required lazily when needd, rather than all being loaded during app boot.
2023-08-18 12:07:10 +01:00
dependabot[bot]
b99565450d
Build(deps-dev): Bump sass from 1.65.1 to 1.66.0 in /app/assets/javascripts (#23138)
Bumps [sass](https://github.com/sass/dart-sass) from 1.65.1 to 1.66.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.65.1...1.66.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-08-18 12:44:40 +08:00
Osama Sayegh
09d3709ec9
FEATURE: New topics vs replies toggle for the new new view (#22920)
This PR adds a new toggle to switch the (new) /new list between showing topics with new replies (a.k.a unread topics), new topics, or everything mixed together.
2023-08-18 12:44:04 +08:00
Ted Johansson
79e3d4e2bd
FIX: Don't run post validations when hiding post (#23139)
When hiding a post (essentially updating hidden, hidden_at, and hidden_reason_id) our callbacks are running the whole battery of post validations. This can cause the hiding to fail in a number of edge cases. The issue is similar to the one fixed in #11680, but applies to all post validations, none of which should apply when hiding a post.

After some code reading and discussion, none of the validations in PostValidator seem to be relevant when hiding posts, so instead of just skipping unique check, we skip all post validator checks.
2023-08-18 10:55:17 +08:00
Ella E
9d7254184c
UX: remove border radius on tippy (#23133)
* UX: remove border radius on tippy

* DEV: use border radius var
2023-08-17 20:53:28 -06:00
Ella E
49a54d4cee
UX: remove boostrap mode rounded corners (#23132) 2023-08-17 14:59:45 -06:00
Roman Rizzi
53407f956c
FIX: Inject currentUser service for related-messages (#23128) 2023-08-17 16:08:38 -03:00
Daniel Waterworth
80a0d88e4c
FIX: Ensure javascript caches are unique per theme/theme_field (#23126)
We were assuming that this was the case before, but not enforcing it.
2023-08-17 13:57:04 -05:00
Andrei Prigorshnev
54092833b9
DEV: there is no need anymore to wrap export methods into enumerators (#22567)
After fbe0e4c we always pass a block into these methods.
So yield inside the export methods works and there is no need 
anymore to wrap them into enumerators.
2023-08-17 22:09:58 +04:00
Roman Rizzi
af30f9945a
UX: Use pill design on both mobile and desktop (#23124) 2023-08-17 14:37:11 -03:00
Joffrey JAFFEUX
95c4d97db3
FIX: do not mutate this.attrs and this.actions (#23125)
Prior to this fix we would always re-set `this.attrs` with `this.attrs` when defined, which is both wasteful but also dangerous as `this.attrs` can possibly error when mutated.
2023-08-17 18:07:06 +02:00
David Taylor
712bbf9b88
DEV: Convert discovery-sortable and tag-show to native class syntax (#23123) 2023-08-17 15:32:51 +01:00
Andrei Prigorshnev
e3c6d3c1cb
DEV: we don't need a collection of entities (#22745) 2023-08-17 17:00:19 +04:00
David Taylor
5a99243629
DEV: Introduce declarative hide-application-footer helper (#23088)
Previously, we had a `showFooter` boolean on the application controller which would be set true/false in various routes by different routes/controllers. A global `routeWillChange` hook would set it `false` before every route transition, and the destination route/controller would have to set it `true` for the footer to show correctly.

This commit replaces that with a new 'declarative' system. Instead of having to set the value true/false manually, UIs which need the footer to be hidden can simply include the `{{hide-application-footer}}` helper in their template when needed. The helper/service will automatically keep track of all the current invocations of that helper, and only show the footer when there are 0 invocations.

This significantly simplifies things, and removes the need for many observers and controller injections, both of which are considered 'code smells' in modern Ember applications.
2023-08-17 12:47:08 +01:00
Krzysztof Kotlarek
f8cd1da92a
FIX: increase sidebar URL limit to 1000 (#23120)
Before this change, sidebar URL had a limit of 200 characters. In some cases it is not enough, therefore it was increased to 1000.
2023-08-17 14:46:24 +10:00
Andrei Prigorshnev
f4e424d7d4
DEV: find_each in CSV exports (#22573)
So we have to order by calling `find_each(order: :desc)`.
Note that that will order rows by Id, not by `last_match_at`
as we tried before (though that didn't work).
2023-08-17 12:33:52 +10:00
Alan Guo Xiang Tan
20840c341f
FIX: /filter route input field not updating on route change (#23119)
What is the problem here?

When transiting between `/filter` routes with different `q` query
params, the input field is not updating to include the values in the `q`
query param. This was because we were setting the value of the input
field in the constructor of the controller but controllers are actually
singletons in Ember so setting the value of the input field is only done
once when the controller is initialised.

What is the fix here?

Instead of setting the value of the input field in the controller, we
set the value in the `setupController` hook in the route file.
2023-08-17 09:04:48 +08:00
Andreas Klöckner
9e568df316
FIX: reference to non-existent groups#remove_members in API key scope (#23042) 2023-08-17 07:20:55 +10:00
marstall
77626c088e
UX: support links in tag descriptions (#22994)
* scrub non-a html tags from tag descriptions on create, strips all tags from tag description when displayed in tag hover

* test for tag description links

* UX: basic render-tag test

* UX: fix linting

* UX: fix linting

* fix broken tests

* Update spec/models/tag_spec.rb

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>

* UX: use has_sanitizable_fields instead of has_scrubbable_fields to ensafen tag.description

---------

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2023-08-16 11:43:54 -04:00
David Taylor
f3cc294470
FIX: Avoid double-counting pageviews when navigating with loading spinner (#23107)
104baab5 fixed double-counted pageviews for the initial page load. Under the default 'loading slider' implementation, that resolved all the known problems.

However, under the 'loading spinner', there is an additional problem. In 'spinner' mode, each navigation within the JS app involves transitioning to an intermediate 'loading' route. Previously, this intermediate state was being treated as a separate page by the app, and so any ajax requests fired during it would be counted as a distinct pageview. One known case of this is the `/presence/get` request which is made when logged-in users visit a topic.

This commit updates the logic to ignore 'intermediate' transitions, and introduces regression tests for both the 'spinner' and 'slider' modes.
2023-08-15 22:30:37 +01:00
Mark VanLandingham
51a976eab9
FIX: Display 'shown on X' user field flags (#23109)
In this commit 2.5 years ago, variables for showOnUserCard and showOnProfile were removed, but we still used them in the component. e29605b

This corrects the variable names and adds a test to confirm the text is now shown.
2023-08-15 15:59:04 -05:00
Renato Atilio
a33c878b55
DEV: allow to skip the configured form template via the composer service (#23108)
* DEV: allow `formTemplateIds` to be explicitly set via the composer service

* DEV: allow to skip the configured form template via the composer service
2023-08-15 17:03:38 -03:00
Roman Rizzi
7251d89919
DEV: Remove need for reloading cached summary thanks to Range#max (#23106) 2023-08-15 15:03:42 -03:00
Roman Rizzi
5683c90917
FIX: TopicSummarization workaround for Postgres' discrete range types (#23105)
Our code assumed the content_range interval was inclusive, but they are open-ended due to Postgres' [discrete range types](https://www.postgresql.org/docs/current/rangetypes.html#RANGETYPES-DISCRETE), meaning [1,2] will be represented as [1,3).

It also fixes some flaky tests due to test data not being correctly setup and the registry not being resetted after each test.
2023-08-15 14:16:06 -03:00
Godfrey Chan
eb4971cb06
DEV: move xss dependency into core (#23094)
This resolves the issue in #23064.

This issue arises because we need to produce the trees for the
auxilary bundles in `ember-cli-build.js` to pass these trees as
argument to `app.toTree()`. In order to produce these trees, the
code internally need to set up babel, which deep-clones the addons'
babel configs.

When using `@embroider/macros`, the addon's babel config includes a
`MacrosConfig` object which is not supposed to be touched until the
configs are "finalized". In a classic build, the finalization step
happens when `app.toTree()` is called. In Embroider, this happens
somewhere deeper inside `CompatApp`.

We need to produce these auxilary bundle trees before we call
`app.toTree()` or before constructing `CompatApp` because they
need to be passed as arguments to these functions. So this poses a
tricky chicken-and-egg timing issue. It was difficult to find a
workaround for this that works for both the classic and Embroider
build pipeline.

Of all the internal addons that uses the auxilary bundle pattern,
this only affets `pretty-text` as it is (for now, at least) the
only addon that uses `@embroider/macros`.

Taking a step back, the only reason (for now, at least) it was
introduced was for the loader shim for the `xss` package. This
package is actually used inside the lazily loaded markdown-it
bundle. However, we didn't have a better way to include the dep
into the lazy bundle directly, so it ends up going into the main
addon tree, and, inturns, the discourse core bundle.

In core's main loader shim manifest, we already have an entry for
`xss`. This was perhaps a mistake at the time, but it doesn't make
a difference – as mentioned above, `xss` needs to be included into
the main bundle anyway.

So, for now, the simpliest solution is to avoid `@embroider/macros`
in these internal addons for the time being. Ideally we would soon
absorb these back into core as lazily loaded (`import()`-ed) code
managed by Webpack when we fully switch over to Embroider.
2023-08-15 16:13:26 +01:00
David Taylor
e722a14700
FIX: Correct select-kit positioning strategy in modals (#23096)
The new modal API removed the `#discourse-modal` id from the wrapper element, which meant that select-kit couldn't properly detect when it was inside a modal. This commit updates the detection to use `.fixed-modal` which will match both legacy and modern modals.
2023-08-15 10:50:41 +01:00
dependabot[bot]
23ca3f7e8e
Build(deps-dev): Bump message-bus-client from 4.3.7 to 4.3.8 in /app/assets/javascripts (#23091)
Bumps [message-bus-client](https://github.com/discourse/message_bus) from 4.3.7 to 4.3.8.
- [Changelog](https://github.com/discourse/message_bus/blob/main/CHANGELOG)
- [Commits](https://github.com/discourse/message_bus/compare/v4.3.7...v4.3.8)

---
updated-dependencies:
- dependency-name: message-bus-client
  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-15 10:20:55 +08:00
Sérgio Saquetim
91e5fa506d
DEV: Add @model/@models support in d-navigation-item (#23074) 2023-08-14 17:03:19 -03:00
Isaac Janzen
a5542eeab0
DEV: Convert penalize-user modal to component-based API (#22960)
<img width="681" alt="Screenshot 2023-08-03 at 12 55 08 PM" src="https://github.com/discourse/discourse/assets/50783505/79cc045a-523d-45a2-8c33-04b556331358">

<img width="763" alt="Screenshot 2023-08-03 at 12 55 05 PM" src="https://github.com/discourse/discourse/assets/50783505/7196a97f-e4f4-4870-b8ac-77255d604c27">

<img width="711" alt="Screenshot 2023-08-03 at 12 55 11 PM" src="https://github.com/discourse/discourse/assets/50783505/a916a85d-8bdb-41fb-8210-1e0c06cf7cf1">
2023-08-14 13:02:54 -05:00
Isaac Janzen
ba46b34581
DEV: Convert badge-preview modal to component-based API (#22969)
<img width="801" alt="Screenshot 2023-08-03 at 4 00 27 PM" src="https://github.com/discourse/discourse/assets/50783505/f4abc35d-4f3f-47b1-af8d-be36df69fe07">
<img width="486" alt="Screenshot 2023-08-03 at 4 00 15 PM" src="https://github.com/discourse/discourse/assets/50783505/65be7f67-ecfa-4c0c-a1d4-01dfd7452e06">
2023-08-14 12:33:45 -05:00
Keegan George
61571bee43
UX: Add show more button to long post queued reviewables (#23075) 2023-08-14 10:11:30 -07:00
Isaac Janzen
ac4e854a04
DEV: Convert edit-badge-groupings modal to component-based API (#22984)
<img width="603" alt="Screenshot 2023-08-04 at 4 43 02 PM" src="https://github.com/discourse/discourse/assets/50783505/033192cc-2c5c-4be6-adde-9dd89b6b05c3">
<img width="594" alt="Screenshot 2023-08-04 at 4 42 59 PM" src="https://github.com/discourse/discourse/assets/50783505/efe8d8fe-f06c-4940-9c99-66a2f8fb3532">
2023-08-14 12:03:28 -05:00
Jordan Vidrine
d546f34f2f
FIX: Adjust badge overflow ellipsis (#23086) 2023-08-14 11:10:02 -05:00
Roman Rizzi
5bb2316756
FIX: Topic summary UI fixes. (#23085)
Hide summary wasn't working because it called the wrong action, and we must disabled the summarize button until streaming finishes.
2023-08-14 12:33:12 -03:00
Joffrey JAFFEUX
ea6a89397a
UX: ensures user-status-picker’s input is autofocused (#23083)
I tried using "autofocus=true" first but it was not reliable in tests.
2023-08-14 17:19:44 +02:00
David Taylor
643193d2f0
DEV: Resolve user_option deprecation (#23082)
Setting user_options directly on the user object is deprecated (see https://github.com/discourse/discourse/blob/0b56af6f58/app/assets/javascripts/discourse/app/models/user.js#L150-L165). We're already setting it in the correct way a few lines later, so this line can be removed.
2023-08-14 13:19:03 +01:00
dependabot[bot]
0b56af6f58
Build(deps-dev): Bump eslint from 8.46.0 to 8.47.0 in /app/assets/javascripts (#23081)
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.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.46.0...v8.47.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-14 13:45:18 +08:00
Roman Rizzi
7ca5ee6cd2
FEATURE: Stream topic summaries. (#23065)
When we receive the stream parameter, we'll queue a job that periodically publishes partial updates, and after the summarization finishes, a final one with the completed version, plus metadata.

`summary-box` listens to these updates via MessageBus, and updates state accordingly.
2023-08-11 15:08:49 -03:00
Renato Atilio
840bea3c51
FEATURE: add topic voting webhook event type (#23072)
* FEATURE: add topic upvote webhook event type

* DEV: use a generic event type name for other actions in the same plugin
2023-08-11 13:42:28 -03:00
David Taylor
6de4b3ac3f
DEV: Remove OpenComposer mixin and refactor related logic (#23015)
The OpenComposer mixin comes from a time before we had a composer service. As well as being a general cleanup/refactor, this commit aims to removes interlinking between composer APIs and the discovery-related controllers which are being removed as part of #22622.

In summary, this commit:
- Removes OpenComposer mixin
- Adds and updates composer service APIs to support everything that `openComposer` did
- Updates consumers to call the composer service directly, instead of relying on the mixin (either directly, or via a route-action which bubbled up to some parent)
- Deprecates composer-related methods on `DiscourseRoute` and on the application route
2023-08-11 09:53:44 +01:00
Joffrey JAFFEUX
31626ce85d
FIX: prevents user-tips to interfere with widget (#23066)
Prior to this fix the user tip was rendered with panels and interfering with widget code. I suspect it was causing the widget node  (revamped-hamburger-menu-wrapper) to not be removed, as a result clickOutside would be called two times, negating the effect of the click.

This fix is just rendering the tip in a different node, preventing the interference, it shouldn't impact behavior as the positioning is absolute.
2023-08-11 10:41:39 +02:00
Ted Johansson
8053cb0c21
DEV: Add a HasDeprecatedColumns concern for better deprecation messages (#22930)
Currently when we decide we're going to drop a column in the future we just mark it with a TODO comment and add it to ignored_columns. This makes it instantly unavailable, and we mostly forget about the TODO in the end. 😬

This change adds a HasDeprecatedColumns concern which offers a little bit more flexibility. We can still simulate the old behaviour by setting drop_from to the current version, but we can also set it to a future version, causing it to raise a deprecation warning until then if used.
2023-08-11 15:25:44 +08:00
Jean
918be1dd63
FEATURE: add a param to exclude users by groups on the users directory page (#23067) 2023-08-11 11:45:33 +08:00
Martin Brennan
fb36af7799
DEV: Move calendar date + time picker from local dates into core component (#23023)
This commit moves the calendar date and time picker shown in
the local dates modal into a core component that can be reused
in other places. Also add system specs to make sure there isn't
any breakages with this feature, and a section to the styleguide.
2023-08-11 13:05:44 +10:00
dependabot[bot]
bc32641a36
Build(deps-dev): Bump sass from 1.65.0 to 1.65.1 in /app/assets/javascripts (#23068)
Bumps [sass](https://github.com/sass/dart-sass) from 1.65.0 to 1.65.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.65.0...1.65.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-08-11 08:29:14 +08:00
Jarek Radosz
e91fa0ef80
DEV: Convert user-tips functions into a service (#23032)
The original motivation for this change was to avoid mutating imported modules (by stubbing imported functions in tests)

Other than that it's a good practice to place code like this in services, especially (although not the case here) if it requires access to other services or controller.
2023-08-10 16:41:46 +02:00
Jarek Radosz
822ecdc91a
DEV: Migrate jump-to-post to the new modal api (#23058) 2023-08-10 16:40:32 +02:00
Jarek Radosz
bc26e6c4b2
DEV: Migrate insert-hyperlink to the new modal api (#23051) 2023-08-10 12:09:26 +02:00
Isaac Janzen
c280c1c52b
DEV: Convert site-setting-default-categories modal to component-based API (#22968) 2023-08-10 10:31:34 +01:00
Godfrey Chan
e7dee94c5c
Upgrade ember-on-resize-modifier (#23045)
The previous version of ember-on-resize-modifier depended on
ember-modifier@^3.2.7 while discourse had ember-modifier@^4.1.0.

As far as Yarn is concerned, it can accomplish this with:

node_modules
  ...
  ember-modifier 4.1.0
  ...
  ember-on-resize-modifier 1.1.0
    ...
    ember-modifier 3.2.7
    ...
  ...

This does NOT work!

In a classic build everything is compiled down to AMD modules and
at runtime there can only be one uniquely named "ember-modifier"
module. When we have duplicates, depending on activation ordering,
one of them will randomly win.

In practice, it seems like ember-modifier 3.2.7 had "won" in the
current build, and we are shipping it to production, you can find
these modules in vendor.js like:

```js
;define("ember-modifier/-private/class/modifier", /* ... */, function(/* ... */) {
  /* the 3.2.7 version with deprecations, etc */
})
/* ... */
;define("ember-modifier/index", /* ... */)
```

However, ember-auto-import also "found" the 4.1.0 version and in
one of the chunk.app.js:

```js
d('ember-modifier', /* ... */, function() { return __webpack_require__(/*! ember-modifier */ 227); });
```

...and in one of the chunk.vendors.js...

```js
/* 227 */
/*!****************************************************!*\
  !*** ../node_modules/ember-modifier/dist/index.js ***!
  \****************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {

"use strict";

/* ...the 4.1.0 version... */

}),
```

So, in practice:

* We are brining both copies into the production build
* The 3.2.7 modules are available in the AMD loader as "ember-modifier/..."
* But 4.1.0 modules are available in the AMD loader as "ember-modifier"
* Because mostly it's consumed as `import ... from "ember-modifier";`, the
  latter end up actually winning
* Because the newer code is compatible enough, and the deprecated features
  are unused, it seems to work ok..?

But in the Embroider build, ember-auto-import doesn't emit those shims
anymore. It does process most of the core modules through Webpack so the
imports get correctly wired up to the 4.1.0 as expected, as they no longer
go through/need the runtime AMD loader.js.

The older 3.2.7 copy is _still_ shipped in the vendor bundle and registered
the same, but not "stomped over" by the EAI shims anymore. Our manual shims
(#22703, merged yesterday) are more "polite" and check `require.has(...)`
before defining the module, and since `require.has(...)` check for the
`/index` alias and returns `true`, our shim does not stomp the 3.2.7 modules
either.

So then, when our "auxilary bundles" (admin, plugins, etc) tries to import
`"ember-modifier", they get the 3.2.7 version.
2023-08-10 10:28:39 +01:00
chapoi
ca1671023a
UX: align tags to top in modal (#23055)
* UX: align tags to top in modal

* UX: fix alignment in grid with multiple rows
2023-08-10 10:26:25 +02:00
chapoi
bda3ead644
UX: prevent overscroll behaviour in composer (#23056) 2023-08-10 10:23:41 +02:00
Jarek Radosz
94649565ce
DEV: Correct Style/RedundantReturn rubocop issues (#23052) 2023-08-10 02:03:38 +02:00
Blake Erickson
d314580c09
DEV: Remove unused user update params (#23046) 2023-08-09 16:55:49 -06:00
Jarek Radosz
2a7eb3d5b5
DEV: Migrate forgot-password to the new modal api (#23041) 2023-08-10 00:45:06 +02:00
Krzysztof Kotlarek
e835a91199
DEV: API to show and hide switch panel buttons (#23022)
There is a case when developer would like to go to separated mode but not show switch panel buttons. We need additional functions to show/add buttons to support this case.
2023-08-10 08:43:35 +10:00
dependabot[bot]
067579882c
Build(deps-dev): Bump sass in /app/assets/javascripts (#23048)
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.2 to 1.65.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.64.2...1.65.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-08-10 00:34:38 +02:00
Roman Rizzi
b832786f35
REFACTOR: Glimmerify topic summarization widgets. (#23043)
* REFACTOR: Glimerify topic summarization widgets.

Simplifies all the logic for generating/regenerating summaries and expanding/collapsing the summary box. It makes streaming easier to implement since now we can subscribe to message bus directly from the component.

* Update app/assets/javascripts/discourse/app/components/summary-box.hbs

Co-authored-by: David Taylor <david@taylorhq.com>

* Update app/assets/javascripts/discourse/app/components/summary-box.hbs

Co-authored-by: David Taylor <david@taylorhq.com>

* Update app/assets/javascripts/discourse/app/components/summary-box.hbs

Co-authored-by: David Taylor <david@taylorhq.com>

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2023-08-09 17:11:24 -03:00
Gerhard Schlager
b2fee68b3f DEV: Add rake task for generating avatars from SSO 2023-08-09 20:56:14 +02:00
Jarek Radosz
993ed10cf0
DEV: Don't stub logout function (#23039) 2023-08-09 18:20:43 +02:00
Mark VanLandingham
ab3a9b4690
DEV: Add plugin outlet after TopicNavigation (#23038) 2023-08-09 09:49:28 -05:00
Godfrey Chan
923b51ad25
DEV: add loader.js shims for packages used across bundles (#22703)
This adds a new `loaderShim()` function to ensure certain modules
are present in the `loader.js` registry and therefore runtime
`require()`-able.

Currently, the classic build pipeline puts a lot of things in the
runtime `loader.js` registry automatically. For example, all of
the ember-auto-import packages are in there.

Going forward, and especially as we switch to the Embroider build
pipeline, this will not be guarenteed. We need to keep an eye on
what modules (packages) our "external" bundles (admin, wizard,
markdown-it, plugins, etc) are expecting to be present and put
them into the registry proactively.
2023-08-09 12:04:41 +01:00
dependabot[bot]
048796e678
Build(deps): Bump a11y-dialog in /app/assets/javascripts (#23028)
Bumps [a11y-dialog](https://github.com/KittyGiraudel/a11y-dialog) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/KittyGiraudel/a11y-dialog/releases)
- [Commits](https://github.com/KittyGiraudel/a11y-dialog/compare/8.0.0...8.0.1)

---
updated-dependencies:
- dependency-name: a11y-dialog
  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-09 11:47:43 +02:00
dependabot[bot]
fcc69b497a
Build(deps-dev): Bump @babel/core in /app/assets/javascripts (#23004)
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [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.10/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-09 11:47:12 +02:00
dependabot[bot]
f90445682e
Build(deps): Bump ember-cli-htmlbars in /app/assets/javascripts (#23021)
Bumps [ember-cli-htmlbars](https://github.com/ember-cli/ember-cli-htmlbars) from 6.2.0 to 6.3.0.
- [Release notes](https://github.com/ember-cli/ember-cli-htmlbars/releases)
- [Changelog](https://github.com/ember-cli/ember-cli-htmlbars/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli-htmlbars/compare/v6.2.0...v6.3.0)

---
updated-dependencies:
- dependency-name: ember-cli-htmlbars
  dependency-type: direct:production
  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-09 11:26:42 +02:00
Penar Musaraj
cb5ae4dcfa
FIX: Search by tag context was broken (#23006) 2023-08-08 15:15:34 -04:00
Mark VanLandingham
1b63e046af
DEV: Plugin API method to replace post-menu buttons (#22995) 2023-08-08 14:00:45 -05:00
Jordan Vidrine
4d2d31e68a
Revert "UX: Simplify and redesign summary skeleton (#22965)" (#23012)
This reverts commit bd19f0c9f1.
2023-08-08 07:55:37 -05:00
David Taylor
655e99491a
DEV: Convert discovery routes to native class syntax (#23010) 2023-08-08 13:52:34 +01:00
Renato Atilio
904ab8deaa
FIX: avoid eager rewrite of /my* routes (#23011) 2023-08-08 09:43:41 -03:00
Martin Brennan
9a3f18f9bc
FIX: Cook hashtags in small action posts (#23008)
There is no decorateCooked equivalent for small action posts,
so we need to manually call decorateHashtags when there is a custom
message for small action posts in order for the hashtags to get
their coloured icon/square.
2023-08-08 15:38:37 +10:00
Krzysztof Kotlarek
3a0212d720
FIX: disable switch sidebar panel button after click (#23007)
Bug when you click fast on the switch panel button. It is happening because we are not waiting for the transition to finish before update state.

In addition, unused currentPanel property was removed.
2023-08-08 14:58:27 +10:00
David Battersby
175f6f6a14
FIX: allow lightbox cleanup on navigation changes (#22954)
Use dom:clean event to trigger lightbox clean up on navigation changes
2023-08-08 11:48:20 +08:00
Martin Brennan
09223e5ae7
DEV: Remove enable_experimental_hashtag_autocomplete logic (#22820)
This commit removes any logic in the app and in specs around
enable_experimental_hashtag_autocomplete and deletes some
old category hashtag code that is no longer necessary.

It also adds a `slug_ref` category instance method, which
will generate a reference like `parent:child` for a category,
with an optional depth, which hashtags use. Also refactors
PostRevisor which was using CategoryHashtagDataSource directly
which is a no-no.

Deletes the old hashtag markdown rule as well.
2023-08-08 11:18:55 +10:00
dependabot[bot]
2644b05e28
Build(deps-dev): Bump @babel/standalone from 7.22.9 to 7.22.10 in /app/assets/javascripts (#23003)
Bumps [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone) from 7.22.9 to 7.22.10.
- [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.10/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-08 07:26:15 +08:00
Penar Musaraj
161d3d190a
A11Y: Fix selecting topic when navigation via keyboard (#22996)
This fixes:
- a regression from 30c152c, where navigating to a topic's last reply
  via keyboard would lose track of the topic when returning to the topic
  list
- an issue where if a topic's last post is a small post, navigating to it
   via keyboard would not focus the post

Co-authored-by: David Taylor <david@taylorhq.com>
2023-08-07 17:05:16 -04:00
Jordan Vidrine
976219ed5c
DEV: Add class when replies above exists (#23000) 2023-08-07 15:50:17 -05:00
Penar Musaraj
9e9aa8f653
UX: Differentiate focus state from hover state (#22985)
When a button gets a focused state via keyboard, it is highlighted a bit more than the hover or selected state.
2023-08-07 16:46:10 -04:00
Roman Rizzi
2485f5d5f6
FIX: Don't cut browse more message on the mobile app. (#22998)
Adds a padding-bottom to the wrapper to avoid cutting the message on the mobile app and sets a max-width to align with the timeline on the desktop.

Fixes a bug on mobile where we updated the preference, but the user had a single list.
2023-08-07 17:19:21 -03:00
David Taylor
a38830c009
DEV: Avoid site-header error when rendering fails (#22993)
When Ember rendering fails for some reason, `this.header` will be undefined. This causes site-header to raise an error, which often gets printed to the console more obviously than the actual root cause.

This commit makes site-header fail more gracefully in this situation, to avoid it being a red-herring during development/debugging.
2023-08-07 17:03:13 +01:00
David Taylor
b8d6c9bd45
DEV: Make navigateToTopic more robust for themes/plugins (#22992)
This function was previously expecting multiple services to be injected on any class that uses it. This kind of hidden requirement leads to some very difficult-to-debug situations, so this commit updates the function to lookup all its required services inline.
2023-08-07 15:28:17 +01:00
David Taylor
a0e45a1e0c
DEV: Replace filter-mode mixin with lib functions (#22986)
The filter-mode mixin was previously serving two distinct purposes via a complex arrangement of getters/setters:

1. To calculate a filterMode, given values for category, filterType and noSubcategories

2. To calculate a filterType, given a filterMode

This commit splits the mixin into two functions, and updates all call sites to use them instead of the mixin.
2023-08-07 15:11:54 +01:00
David Taylor
7f2e42c826
DEV: Introduce dynamic wrapper attributes in RenderGlimmer (#22991) 2023-08-07 13:27:26 +01:00
Keegan George
1ded0a1429
UX: Add disabled styling to <DToggleSwitch/> (#22988) 2023-08-04 15:20:56 -07:00
Keegan George
282e43d806
DEV: Pluralize support for form template error strings (#22983) 2023-08-04 14:26:27 -07:00
David Taylor
f9361b9eda
DEV: Modernise navigation controllers (#22982)
Converts to native class syntax, native getters, and removes unused properties
2023-08-04 16:48:31 +01:00
David Taylor
ae95260645 DEV: Convert AbstractTopicRoute to native class syntax 2023-08-04 15:50:28 +01:00
David Taylor
a502eb1097 DEV: Refactor build-topic-route to define abstract controller
This makes more sense (and is likely faster) than redefining the entire route for every call to `buildTopicRoute`. Also moves the top-specific logic into the route rather than injecting it via an initializer.

Similar to d5107d1aba
2023-08-04 15:50:28 +01:00
Mark VanLandingham
14348fc2f5
FIX: Attempt to connect with navigator.onLine is initially false (#22981) 2023-08-04 09:43:45 -05:00
Bianca Nenciu
1d58dcac1f
FIX: Use only first character when looking up emoji (#22977)
The other characters may be variation selectors and result in a
false-negative.
2023-08-04 15:28:58 +02:00
David Taylor
b7e642d99d
DEV: Introduce decorator-position lint rule (#22937) 2023-08-04 12:26:06 +01:00
David Taylor
e76e0ad592
DEV: In development, refresh client when theme changes are made (#22978)
This brings the theme development experience (via the discourse_theme cli) closer to the experience of making javascript changes in Discourse core/plugins via Ember CLI. Whenever a change is made to a non-css theme field, all clients will be instructed to immediately refresh via message-bus.
2023-08-04 11:02:26 +01:00
Jarek Radosz
28dc222e2f
FIX: Quoting text selection across elements (#22974)
Regressed in https://github.com/discourse/discourse/pull/22802

Tests to follow next week
2023-08-04 08:30:56 +02:00
Alan Guo Xiang Tan
5d1a9a44c6
PERF: Avoid calling the same translation twice when rendering lists view (#22976)
Why this change?

In production, this appeared as a small hotspot as where we're calling
`poster.name_and_description` twice which in turns makes a method call
to `I18n.t`. When we're rendering a topic list with many topics and each
topic has many posters, this repeated and unnecessary method call
quickly adds up.
2023-08-04 13:38:41 +08:00
Ted Johansson
1f7e5e8e75
DEV: Switch over category settings to new table - Part 2 (#20580)
In #20135 we prevented invalid inputs from being accepted in category setting form fields on the front-end. We didn't do anything on the back-end at that time, because we were still discussing which path we wanted to take. Eventually we decided we want to move this to a new CategorySetting model.

This PR moves the num_auto_bump_daily from custom fields to the new CategorySetting model.

In addition it sets the default value to 0, which exhibits the same behaviour as when the value is NULL.
2023-08-04 10:53:22 +08:00
Renato Atilio
701ae8764e
FIX: keep first post edit history when moving/merging (#22966) 2023-08-03 22:04:35 -03:00
dependabot[bot]
95c2c854be
Build(deps-dev): Bump ember-functions-as-helper-polyfill (#22972)
Bumps [ember-functions-as-helper-polyfill](https://github.com/NullVoxPopuli/ember-functions-as-helper-polyfill) from 2.1.1 to 2.1.2.
- [Release notes](https://github.com/NullVoxPopuli/ember-functions-as-helper-polyfill/releases)
- [Changelog](https://github.com/ember-polyfills/ember-functions-as-helper-polyfill/blob/main/CHANGELOG.md)
- [Commits](https://github.com/NullVoxPopuli/ember-functions-as-helper-polyfill/compare/v2.1.1...v2.1.2)

---
updated-dependencies:
- dependency-name: ember-functions-as-helper-polyfill
  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-04 01:04:09 +02:00
Keegan George
bd19f0c9f1
UX: Simplify and redesign summary skeleton (#22965) 2023-08-03 13:59:35 -07:00
Roman Rizzi
001320c9f1
FIX: Display browse more message as long as there are suggested topics (#22967) 2023-08-03 17:39:51 -03:00
Isaac Janzen
d2502c9a79
DEV: Convert theme-change modal to component-based API (#22964)
# Before
<img width="575" alt="Screenshot 2023-08-03 at 1 35 47 PM" src="https://github.com/discourse/discourse/assets/50783505/b4ae1487-bef8-40d4-8949-902e36303d43">

# After
<img width="897" alt="Screenshot 2023-08-03 at 1 41 21 PM" src="https://github.com/discourse/discourse/assets/50783505/a37c5fe1-eee5-4e0a-8b0a-66aebbaf2342">

This modal could still use some design love. I will raise this internally.
2023-08-03 15:01:40 -05:00
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