Commit Graph

31628 Commits

Author SHA1 Message Date
Blake Erickson
969ab0fd6e
FIX: Video playback on iOS (#25513) 2024-01-31 20:09:57 -07:00
Alan Guo Xiang Tan
44f8418093
DEV: Refactor Theme#settings to return a hash instead of array (#25516)
Why this change?

Returning an array makes it hard to immediately retrieve a setting by
name and makes the retrieval an O(N) operation. By returning an array,
we make it easier for us to lookup a setting by name and retrieval is
O(1) as well.
2024-02-01 10:26:56 +08:00
Jordan Vidrine
f2ac9e4c12
UX: Refactor Do Not Disturb indicator (#25508) 2024-01-31 16:56:07 -06:00
dependabot[bot]
f9c944ceb8
Build(deps): Bump the babel group in /app/assets/javascripts with 1 update (#25511)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.23.9 to 7.23.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.23.10/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-31 23:45:17 +01:00
Kelv
bfa3e056f1
DEV: refactor topic-summary widget to topic-map-summary component (#25447)
* shift topic-summary widget to topic-map-summary component
* remove relativeDate memoization which was causing bug where displayed date never updated
2024-01-31 22:09:39 +08:00
Joffrey JAFFEUX
ec26dc51cd
UX: shows PWA/Hub footer navigation on chat (#25501)
This commit sets a default of 0px for `--footer-nav-height` and set it only when `body.footer-nav-visible` allowing us to safely use `--footer-nav-height` wherever it will be needed if set.
2024-01-31 14:41:12 +01:00
David Battersby
52249fad11
FIX: remove fast-edit regex and string replacement (#25496)
This change removes the regex we used previously, which only allowed ASCII characters in fast-edit. Now multi-language content  can be used with fast-edit.

It also removes the string replacement we relied on in the past to catch various forms of punctuation marks, as this no longer appears necessary (possibly since this component was updated to use Glimmer).
2024-01-31 18:26:43 +08:00
chapoi
a695d85cbd
UX: Update selected colour var (#25500) 2024-01-31 09:32:38 +01:00
Jarek Radosz
58be138e75
FIX: Site-setting integer input type (#25485)
Regressed in f2e1363f67
2024-01-30 20:25:48 +01:00
David Taylor
88305e3d96
DEV: Remove version-number-based logic (#25482)
The `deprecate_column` helper would change its behavior based on the current `Discourse::VERSION`. This means that 'finalizing' a stable release introduces a previously untested behavior change.

Much better to keep it as a deprecation until manual action is taken to introduce the breaking change.
2024-01-30 17:34:10 +00:00
David Taylor
9b50de4569
SECURITY: Properly escape user content within <noscript> 2024-01-30 09:10:09 -07:00
David Taylor
283fe48243
DEV: Update confirm-email flows to use central 2fa and ember rendering (#25404)
These routes were previously rendered using Rails, and had a fairly fragile 2fa implementation in vanilla-js. This commit refactors the routes to be handled in the Ember app, removes the custom vanilla-js bundles, and leans on our centralized 2fa implementation. It also introduces a set of system specs for the behavior.
2024-01-30 10:32:42 +00:00
Sam
27301ae5c7
FEATURE: support silent internal links (#25472)
Internal links always notify and add internal connections in topics.

This adds a special feature that lets you append `?silent=true` to a link
to have it excluded from:

1. Notifications - users will not be notified for these links
2. Post links below posts in the UI

This is specifically useful for large reports where adding all these connections
just results in noise.
2024-01-30 17:03:58 +11:00
Martin Brennan
304a7f3e1a
FIX: Do not show quote copy button to anon (#25471)
This was an oversight in 51016e56dd,
anon doesn't have any need to copy quotes, just as they have
no need to open the composer with a quote prefilled.
2024-01-30 13:19:35 +10:00
Mark VanLandingham
f6becaa0b6
DEV: Wrap user summary category rows in plugin outlet (#25466) 2024-01-29 15:48:36 -06:00
Penar Musaraj
2558543794
DEV: Add general pretender for passkey challenge (#25432)
* DEV: Add general pretender for passkey challenge

* Limit a test to Chrome because of Firefox ESR flakiness
2024-01-30 08:13:59 +11:00
Kris
d29fefd73a
FIX: missing ampersand in input class selector (#25464) 2024-01-29 14:03:32 -05:00
Mark VanLandingham
2665752732
DEV: PluginOutlet addition in user/notifications-index & summary class names (#25463) 2024-01-29 12:56:42 -06:00
marstall
5a00d1964f
DEV: add site setting to disable watched word checking in user fields (#25411)
adding a hidden sitesetting, `disable_watched_word_checking_in_user_fields` - false by default. if set to true, you can use any word at all in user profile fields.

meta: https://meta.discourse.org/t/watched-words-scope/282699/20
2024-01-29 12:44:32 -05:00
David Taylor
2457553d0a
FIX: Avoid flash-of-unstyled-content in Safari with bug workaround (#25462)
Safari has a bug which means that scripts with the `defer` attribute are executed before stylesheets have finished loading. This is being tracked at https://bugs.webkit.org/show_bug.cgi?id=209261.

This commit works around the problem by introducing a no-op inline `<script>` to the end of our HTML document. This works because defer scripts are guaranteed to run after inline scripts, and inline scripts are guaranteed to run after any preceding stylesheets.

Technically we only need this for Safari. But given that the cost is so low, it makes sense to include it everywhere rather than incurring the complexity of gating it by user-agent.
2024-01-29 17:20:44 +00:00
chapoi
df2f63cf74
UX: add bg style to input field type number (#25460) 2024-01-29 10:51:12 -05:00
David Taylor
ed2802eeb5
DEV: Fix alternative output directories in ember-cli proxy (#25291)
Specifying alternatives to `dist/` is useful when running multiple servers locally (e.g. for performance testing)
2024-01-29 14:09:41 +00:00
David Taylor
63f6bd5efe
DEV: Add admin warning for sites on Ember 3 (#25459)
Running Discourse 3.2 stable under Ember 3 will technically be possible, but is only intended as a short-term migration point. This commit adds an admin warning for sites which are using this configuration, to make it clear that themes and plugins are unlikely to support the configuration.

https://meta.discourse.org/t/287211
2024-01-29 14:09:07 +00:00
David Taylor
1bfccdd4f2
DEV: Allow run_second_factor! to be used before login (#25420)
In a handful of situations, we need to verify a user's 2fa credentials before `current_user` is assigned. For example: login, email_login and change-email confirmation. This commit adds an explicit `target_user:` parameter to the centralized 2fa system so that it can be used for those situations.

For safety and clarity, this new parameter only works for anon. If some user is logged in, and target_user is set to a different user, an exception will be raised.
2024-01-29 12:28:47 +00:00
dependabot[bot]
8e32c11ab4
Build(deps-dev): Bump @floating-ui/dom from 1.5.4 to 1.6.1 in /app/assets/javascripts (#25449)
* Build(deps-dev): Bump @floating-ui/dom in /app/assets/javascripts

Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.5.4 to 1.6.1.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.6.1/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-29 12:39:46 +01:00
Alan Guo Xiang Tan
91bfc513ac
Revert "Build(deps): Bump @glimmer/syntax from 0.84.3 to 0.88.0 in /app/assets/javascripts (#25450)" (#25455)
This reverts commit ef87629526.

Breaks licensee on CI which I have no time to figure out now
2024-01-29 10:14:10 +08:00
Martin Brennan
c7860173c1
DEV: Clean up hashtag code (#25397)
* Delete dead code
* Split up hashtag-autocomplete into more logical modules
2024-01-29 09:48:56 +10:00
dependabot[bot]
ef87629526
Build(deps): Bump @glimmer/syntax from 0.84.3 to 0.88.0 in /app/assets/javascripts (#25450)
* Build(deps): Bump @glimmer/syntax in /app/assets/javascripts

Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.84.3 to 0.88.0.
- [Release notes](https://github.com/glimmerjs/glimmer-vm/releases)
- [Changelog](https://github.com/glimmerjs/glimmer-vm/blob/main/CHANGELOG.md)
- [Commits](https://github.com/glimmerjs/glimmer-vm/compare/v0.84.3...v0.88.0)

---
updated-dependencies:
- dependency-name: "@glimmer/syntax"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-29 07:18:00 +08:00
Kris
6d57da1d6e
FIX: global selector needed to avoid clicks registering on other elements (#25445) 2024-01-26 22:24:21 +00:00
Kris
3714a6f222
FIX: remove excess margin after title (#25444) 2024-01-26 13:42:38 -05:00
Blake Erickson
7200a41207
FIX: export csv file failed message (#25443)
When exporting a csv file and the size of the file exceeded the
max_export_file_size_kb it will still send the PM that the export
succeeded with a broken link to a missing export file. This change
ensures that a failed message will be sent instead.
2024-01-26 11:16:02 -07:00
Kris
6b185f8655
PERF: eliminate some slow CSS selectors (#25392) 2024-01-26 13:10:45 -05:00
Kris
4e72b06a54
UX: improve mobile table editor button location (#25426) 2024-01-26 13:08:12 -05:00
Kris
4266b0cf7d
UX: fix and improve topic title badge spacing (#25441) 2024-01-26 12:11:03 -05:00
Jarek Radosz
f2e1363f67
FIX: Deprecate NumberField, use <input> instead (#25434)
* Revert "FEATURE: Use native number fields for integer inputs (#24984)"

This reverts commit 8fce890ead.

* FIX: Deprecate NumberField, use <input> instead

This reverts #24984 as it introduced regressions (behavioral and visual) and instead it deprecates the NumberField component and replaces its uses in core with native `<input>` elements.
2024-01-26 17:56:07 +01:00
Penar Musaraj
19b86e7ea2
FIX: Auto-populate group field in invite modal on group route (#25431) 2024-01-26 17:02:48 +01:00
Bianca Nenciu
76647d3a34
FIX: Set allowUncategorized SelectKit option (#25440)
CategoryRow component uses allowUncategorized SelectKit option to
decide whether to show the "Uncategorized" category or not. This was
undefined which lead to "Uncategorized" category being always hidden
causing a minor visual glitch.
2024-01-26 16:26:58 +02:00
chapoi
fbfab92fce
UX: overflow fix for add participants to PM on mobile (#25437) 2024-01-26 09:26:25 +01:00
Kris
3c54d9e64c
UX: improve featured link positioning in topic titles (#25427) 2024-01-25 16:49:34 -05:00
dependabot[bot]
d022b85a52
Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#25428)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.23.7 to 7.23.9
- [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.23.9/packages/babel-core)

Updates `@babel/standalone` from 7.23.8 to 7.23.9
- [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.23.9/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-25 22:45:19 +01:00
Blake Erickson
e409fabf8d
DEV: Log any errors for the user csv export (#25422)
Currently when exporting a list of users and there is an error we just
log that there was an error, but we don't show what the issue is in the
logs which makes it really hard to debug in production. This change will
output any errors to the logs.
2024-01-25 12:18:16 -07:00
Blake Erickson
ae5c11f364
FIX: Remove css that should not have been added (#25425)
Accidentally added this css that didn't need to be added as part of this
commit: 0dcdc66f58
2024-01-25 12:17:26 -07:00
Blake Erickson
89883b2f51
WIP: Experiemental Bulk Topic Actions Dropdown (#25245)
* WIP: Experiemental Bulk Topic Actions Dropdown

Creates a new dropdown that can be used for topic bulk actions.
2024-01-25 09:12:06 -07:00
Jarek Radosz
4d1ed4a62d
DEV: Don't check for ResizeObserver existence (#25419)
We already assume it's there in many other places
2024-01-25 13:47:15 +01:00
David Taylor
241eaadc26
FIX: Computed property override error for webhook.categories (#25418) 2024-01-25 12:25:02 +00:00
Jarek Radosz
5734066942
DEV: Use document.body directly (#25417)
No need to fire up those query parsing engines :P
2024-01-25 12:50:33 +01:00
David Taylor
1651d63204
FIX: Allow category to be set on topic model instances (#25416)
Some parts of our code (e.g. some types of reviewable) set `topic.category`. In the past this would override the computed property value, but with recent Ember it raises an error. This commit adds a setter which handles the situation cleanly
2024-01-25 10:49:00 +00:00
Martin Brennan
57ededb770
DEV: Move admin sidebar out of initializer (#25396)
Having the admin sidebar code in an instance initializer is not
ideal because:

* It runs during app boot which may not even be necessary based on site settings
* It makes it hard for plugins to register additional links in time without resorting
to before/after initializer gymnastics

This PR moves the admin sidebar into a lib and creates the panel
in custom-sections.js, then the sections and links are loaded when
the main sidebar component is rendered, which leaves plugins enough
time to add additional links in an initializer.

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-01-25 10:45:14 +10:00
Ted Johansson
6ad34a0152
DEV: Exclude system users when calculating group user count (#25400)
We want to exclude the system user from group user counts, since intuitively admins wouldn't include them.

Originally this was accomplished by booting said system user from the groups, but this is causing problems, because the system user needs TL group membership to perform certain tasks.

After this PR, system user is still in the TL groups, but excluded when refreshing the user count.
2024-01-25 08:13:58 +08:00
Kris
cf25fab9b0
UX: simplify education message layout on empty /new route (#25412) 2024-01-24 18:13:42 -05:00
Kris
0c63463d28
UX: fix spacing for about page headings (#25410) 2024-01-24 16:36:36 -05:00
dependabot[bot]
0855804d72
Build(deps-dev): Bump webpack from 5.89.0 to 5.90.0 in /app/assets/javascripts (#25409)
* Build(deps-dev): Bump webpack in /app/assets/javascripts

Bumps [webpack](https://github.com/webpack/webpack) from 5.89.0 to 5.90.0.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.89.0...v5.90.0)

---
updated-dependencies:
- dependency-name: webpack
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-24 22:35:36 +01:00
Mark VanLandingham
9130a3cafd
DEV: Add PluginOutlet wrapping user notifications EmptyState (#25406) 2024-01-24 11:34:43 -06:00
chapoi
4bef6fbd62
UX: add spacing in new topic draft text - timestamp (#25403) 2024-01-24 17:29:50 +01:00
Jarek Radosz
fd3c3fa565
DEV: Use service: lookups instead of :main (#25402)
where applicable
2024-01-24 15:59:44 +01:00
Jarek Radosz
57c4b6bd50
DEV: Update js linting setup (#25365) 2024-01-24 15:30:03 +01:00
Jarek Radosz
8ca2aef556
DEV: Add missing service injections to app route (#25401)
…so "site" and "currentUser" (and sort all of them)
2024-01-24 14:08:19 +01:00
Jarek Radosz
070a8414ea
DEV: Make the flaky keyboard nav test chrome-only (#25378) 2024-01-24 14:05:32 +01:00
Vinoth Kannan
ecb7fb0481
FEATURE: add option to sort topic query result via plugin. (#25349)
Previously, it was not possible to modify the sorting order of the `TopicQuery` result from a plugin. This feature adds support to specify custom sorting functionality in a plugin. We're using the `apply_modifier` method in the `DiscoursePluginRegistry` module to achieve it.

Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
2024-01-24 12:58:12 +05:30
Ted Johansson
32e2a1fd4a
DEV: Add delegated Group#human_users scope (#25398)
Some preparatory refactoring as we're working on TL groups for the system user. On User we have a scope #human_users to exclude the system user, DiscoBot, etc. This PR adds the same scope (delegated to User) on Group.
2024-01-24 13:33:05 +08:00
Kelv
8b44270929
DEV: refactor topic-map participants into glimmer component (#25350)
* DEV: refactor topic-map participants into glimmer components
2024-01-24 12:00:46 +08:00
Kris
9dfa31202e
DEV: fix typo in addSidebarSection API example (#25393) 2024-01-23 17:45:48 -05:00
Penar Musaraj
b6f64a70f0
UX: Add "filter for more" to icon picker (#25263)
Repurposes the existing "filter for more" row from the tag drop component.
2024-01-23 21:53:13 +01:00
Penar Musaraj
4d43ef5186
FEATURE: Enable passkeys by default (#25340) 2024-01-23 17:23:26 +01:00
Arpit Jalan
fdf332f3aa
FEATURE: trigger app event for click tracking (#25381)
* FEATURE: trigger app event for click tracking

* fix the build
2024-01-23 16:32:07 +05:30
Martin Brennan
db70e7a842
FIX: Minor bookmark issues (#25358)
* FIX: Minor bookmark issues

* We were showing "missing %{name} value" when the name for the
  bookmark was undefined with title translations
* There was no way to see the bookmark details on hover in chat
  for a message where the bookmark icon was in the left gutter.
  We can show the title on the bookmark button in the chat message
  actions instead.

* Minor fix

* DEV: Test fix
2024-01-23 16:49:41 +10:00
Kris
5627355c8c
DEV: adds before-header-logo outlet (#25196) 2024-01-22 17:17:08 -05:00
Mark VanLandingham
7bad0b1d8a
DEV: Trigger DiscourseEvent on push notification send (#25375) 2024-01-22 15:30:35 -06:00
David Taylor
4074763efb
DEV: Switch to bundled Ember types (#25370)
Since Ember 5.1, types are included in the ember-source package (see https://blog.emberjs.com/stable-typescript-types-in-ember-5-1/)
2024-01-22 20:32:37 +00:00
Jean
a37d26f559
FEATURE: Add support for custom site name in Open Graph metadata (#25373) 2024-01-22 13:57:52 -04:00
Penar Musaraj
4f901cae8f
PERF: Better query performance for user avatar consistency check. (#25342) 2024-01-22 18:33:39 +01:00
Roman Rizzi
57915d9edc
FIX: Radar chart not widely available. (#25368)
We added support for radar type charts in #24274. However, radar charts work with three variables, meaning we can't display any report that way.

Unfortunately, by adding `:radar` to the `Report#modes` variable, I made them widely available.

Related bug report: https://meta.discourse.org/t/report-radar-graph-uncaught-typeerror/292360
2024-01-22 11:21:28 -03:00
Joffrey JAFFEUX
f669a6fa4c
FIX: search escape handler should be on keydown (#25364)
The keydown event fires as soon as the key is pressed down. This is often preferred for actions that need to occur immediately, like stopping a process, closing a modal window, or canceling an ongoing operation. The immediacy of keydown makes it more responsive, as the user doesn't have to fully press and release the key.

Moreover, it allows us to not close chat on escape when the search menu is open.
2024-01-22 15:19:20 +01:00
Jarek Radosz
108aff663e
FIX: User-tips regression in #25361 (#25367)
It's a set of Tip objects, not ids
2024-01-22 14:45:47 +01:00
Jarek Radosz
62c30e0b5f
DEV: Convert activation-email-form to gjs (#25343) 2024-01-22 12:14:10 +01:00
Jarek Radosz
4035513901
DEV: Clean up user-tips service (#25361)
1. TrackedSet instead of TrackedMap of `true`s
2. Use Set#has for early exit
3. Use the site service instead of Site import
2024-01-22 12:13:02 +01:00
Jarek Radosz
3fc06e4345
DEV: Convert activation-controls to gjs (#25344) 2024-01-22 12:11:22 +01:00
Jarek Radosz
749b490188
DEV: Convert about-page-users to gjs (#25341) 2024-01-22 12:10:59 +01:00
dependabot[bot]
76350c9498
Build(deps-dev): Bump the types group in /app/assets/javascripts with 1 update (#25351)
* Build(deps-dev): Bump the types group

Bumps the types group in /app/assets/javascripts with 1 update: [@types/ember__routing](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__routing).


Updates `@types/ember__routing` from 4.0.20 to 4.0.21
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Changelog](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ember__routing/history-location.d.ts)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__routing)

---
updated-dependencies:
- dependency-name: "@types/ember__routing"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-22 11:54:06 +01:00
Martin Brennan
b3904eab45
FIX: User group check should return true for system user for auto groups (#25357)
This is a temporary fix to address an issue where the
system user is losing its automatic groups when the server
is running. If any auto groups are provided, and the user is
a system user, then we return true. The system user is admin,
moderator, and TL4, so they usually have all auto groups.

We can remove this when we get to the bottom of why the auto
groups are being deleted.
2024-01-22 14:40:29 +10:00
Gerhard Schlager
a870c10e14
UX: user.account_possessive was impossible to translate (#25331) 2024-01-21 15:42:14 +01:00
Mark VanLandingham
07a0c6c637
DEV: Add additional arg to appEvents triggered on notification click (#25317) 2024-01-19 10:01:33 -06:00
Jarek Radosz
cbe4b3d7d8
DEV: Add more details to getOwner deprecation (#25309)
Co-authored-by: David Taylor <david@taylorhq.com>
2024-01-19 14:36:05 +01:00
dependabot[bot]
2815fc24ff
Build(deps-dev): Bump sass from 1.69.7 to 1.70.0 in /app/assets/javascripts (#25324)
* Build(deps-dev): Bump sass in /app/assets/javascripts

Bumps [sass](https://github.com/sass/dart-sass) from 1.69.7 to 1.70.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.69.7...1.70.0)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-19 11:23:03 +01:00
Ted Johansson
d17ae1563d
DEV: Convert min_trust_level_for_user_api_key to groups (#25299)
We're changing the implementation of trust levels to use groups. Part of this is to have site settings that reference trust levels use groups instead. It converts the min_trust_level_for_user_api_key  site setting to user_api_key_allowed_groups.

This isn't used by any of our plugins or themes, so very little fallout.
2024-01-19 11:25:24 +08:00
Blake Erickson
561851b104
FEATURE: Add hot as a homepage option (#25325) 2024-01-18 16:36:18 -07:00
Penar Musaraj
fd873b64b6
A11Y: Show focus state in user PM topic list (#25313)
When navigating in a PM topic list via keyboard by pressing Tab repeatedly, the selected PM's row did not have a visible focus state.
2024-01-18 14:11:37 -05:00
Kris
3e6482d3cc
DEV: add tag arg to after-create-topic-button outlet (#25315) 2024-01-18 12:32:44 -05:00
Jarek Radosz
b2b32d6af8
DEV: Replace period mixin with a component (#25292) 2024-01-18 13:06:42 +01:00
dependabot[bot]
26698ff52a
Build(deps): Bump terser from 5.26.0 to 5.27.0 in /app/assets/javascripts (#25306)
* Build(deps): Bump terser in /app/assets/javascripts

Bumps [terser](https://github.com/terser/terser) from 5.26.0 to 5.27.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.26.0...v5.27.0)

---
updated-dependencies:
- dependency-name: terser
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-18 01:14:30 +01:00
Renato Atilio
89eae4c6e3
DEV: add anonymousOnly opt to registerTopicFooterButton (#25293)
Adds support to `anonymousOnly` as an option when using `registerTopicFooterButton`, rendering the buttons accordingly.
2024-01-17 21:10:42 -03:00
Bianca Nenciu
6a205ea0a5
DEV: Replace lazy_load_categories site setting (#25302)
The site setting has been removed in a previous commit abad38c, but it
was merged at the same time with 4cfc0e2 which added it back.
2024-01-17 21:44:48 +02:00
Bianca Nenciu
abad38c2e7
DEV: Make lazy_load_categories setting use groups (#25282)
This allows certain users to test the new feature and avoid disruptions
in other's workflows.
2024-01-17 20:26:51 +02:00
Penar Musaraj
719956f255
FIX: Allow staff to change group members visibility level for automatic groups (#25281) 2024-01-17 12:54:52 -05:00
Bianca Nenciu
4cfc0e231a
DEV: Change categories#index loading strategy (#25232)
The old strategy used to load 25 categories at a time, including the
subcategories. The new strategy loads 20 parent categories and at most
5 subcategories for each parent category, for a maximum of 120
categories in total.
2024-01-17 17:18:01 +02:00
David Taylor
ec1905cf6f
FIX: "Action Logs" button on user admin page (#25300)
The `transitionToRoute` API was removed in Ember 5 in favour of the route service
2024-01-17 13:49:59 +00:00
Sam
df8bb947b2
FEATURE: improvements to hot algorithm (#25295)
- Decrease gravity, we come in too hot prioritizing too many new topics
- Remove all muted topics / categories and tags from the hot list
- Punish topics with zero likes in algorithm
2024-01-17 16:12:03 +11:00
Sam
ebd3971533
FEATURE: experiment with hot sort order (#25274)
This introduces a new experimental hot sort ordering. 

It attempts to float top conversations by first prioritizing a  topics with lots of recent activity (likes and users responding) 

The schedule that updates hot topics is disabled unless the hidden site setting: `experimental_hot_topics` is enabled. 

You can control "decay" with `hot_topic_gravity` and `recency` with `hot_topics_recent_days` 

Data is stored in the new `topic_hot_scores` table and you can check it out on the `/hot` route once 
enabled. 
---------

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2024-01-17 13:01:04 +11:00
dependabot[bot]
1a752148a9
Build(deps-dev): Bump imports-loader from 4.0.1 to 5.0.0 in /app/assets/javascripts (#25288)
* Build(deps-dev): Bump imports-loader in /app/assets/javascripts

Bumps [imports-loader](https://github.com/webpack-contrib/imports-loader) from 4.0.1 to 5.0.0.
- [Release notes](https://github.com/webpack-contrib/imports-loader/releases)
- [Changelog](https://github.com/webpack-contrib/imports-loader/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack-contrib/imports-loader/compare/v4.0.1...v5.0.0)

---
updated-dependencies:
- dependency-name: imports-loader
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-16 23:44:00 +01:00
dependabot[bot]
f5b29f9189
Build(deps-dev): Bump the types group in /app/assets/javascripts with 20 updates (#25287)
* Build(deps-dev): Bump the types group

Bumps the types group in /app/assets/javascripts with 20 updates:

| Package | From | To |
| --- | --- | --- |
| [@types/ember](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember) | `4.0.10` | `4.0.11` |
| [@types/ember__application](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__application) | `4.0.10` | `4.0.11` |
| [@types/ember__array](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__array) | `4.0.9` | `4.0.10` |
| [@types/ember__component](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__component) | `4.0.21` | `4.0.22` |
| [@types/ember__controller](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__controller) | `4.0.11` | `4.0.12` |
| [@types/ember__debug](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__debug) | `4.0.7` | `4.0.8` |
| [@types/ember__destroyable](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__destroyable) | `4.0.4` | `4.0.5` |
| [@types/ember__engine](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__engine) | `4.0.10` | `4.0.11` |
| [@types/ember__error](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__error) | `4.0.5` | `4.0.6` |
| [@types/ember__object](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__object) | `4.0.11` | `4.0.12` |
| [@types/ember__polyfills](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__polyfills) | `4.0.5` | `4.0.6` |
| [@types/ember__routing](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__routing) | `4.0.19` | `4.0.20` |
| [@types/ember__runloop](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__runloop) | `4.0.8` | `4.0.9` |
| [@types/ember__service](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__service) | `4.0.8` | `4.0.9` |
| [@types/ember__string](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__string) | `3.0.13` | `3.0.14` |
| [@types/ember__template](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__template) | `4.0.5` | `4.0.6` |
| [@types/ember__test](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__test) | `4.0.5` | `4.0.6` |
| [@types/ember__utils](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/ember__utils) | `4.0.6` | `4.0.7` |
| [@types/qunit](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/qunit) | `2.19.9` | `2.19.10` |
| [@types/rsvp](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/rsvp) | `4.0.8` | `4.0.9` |


Updates `@types/ember` from 4.0.10 to 4.0.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember)

Updates `@types/ember__application` from 4.0.10 to 4.0.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__application)

Updates `@types/ember__array` from 4.0.9 to 4.0.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__array)

Updates `@types/ember__component` from 4.0.21 to 4.0.22
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__component)

Updates `@types/ember__controller` from 4.0.11 to 4.0.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__controller)

Updates `@types/ember__debug` from 4.0.7 to 4.0.8
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__debug)

Updates `@types/ember__destroyable` from 4.0.4 to 4.0.5
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__destroyable)

Updates `@types/ember__engine` from 4.0.10 to 4.0.11
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__engine)

Updates `@types/ember__error` from 4.0.5 to 4.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__error)

Updates `@types/ember__object` from 4.0.11 to 4.0.12
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__object)

Updates `@types/ember__polyfills` from 4.0.5 to 4.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__polyfills)

Updates `@types/ember__routing` from 4.0.19 to 4.0.20
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Changelog](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/ember__routing/history-location.d.ts)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__routing)

Updates `@types/ember__runloop` from 4.0.8 to 4.0.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__runloop)

Updates `@types/ember__service` from 4.0.8 to 4.0.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__service)

Updates `@types/ember__string` from 3.0.13 to 3.0.14
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__string)

Updates `@types/ember__template` from 4.0.5 to 4.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__template)

Updates `@types/ember__test` from 4.0.5 to 4.0.6
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__test)

Updates `@types/ember__utils` from 4.0.6 to 4.0.7
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/ember__utils)

Updates `@types/qunit` from 2.19.9 to 2.19.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/qunit)

Updates `@types/rsvp` from 4.0.8 to 4.0.9
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/rsvp)

---
updated-dependencies:
- dependency-name: "@types/ember"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__application"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__array"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__component"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__controller"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__debug"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__destroyable"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__engine"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__error"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__object"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__polyfills"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__routing"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__runloop"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__service"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__string"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__template"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__test"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/ember__utils"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/qunit"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
- dependency-name: "@types/rsvp"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: types
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-16 23:43:19 +01:00
Gerhard Schlager
44ff62aa12 PERF: Skip validations when hotlinked images are replaced in posts
They are not necessary and slow down rebakes.
2024-01-16 14:35:24 +01:00
Gerhard Schlager
241bf48497 DEV: Allow rebakes to generate optimized images at the same time
Previously only Sidekiq was allowed to generate more than one optimized image at the same time per machine. This adds an easy mechanism to allow the same in rake tasks and other tools.
2024-01-16 14:33:16 +01:00
Gerhard Schlager
bcb8b3fab9 REFACTOR: Reuse Discourse.store instance
Calling `Discourse.store` creates a new instance of a store each time.
2024-01-16 14:33:16 +01:00
Alan Guo Xiang Tan
7b907ec50a
DEV: Fix flaky table builder system spec (#25272)
Why this change?

The `Table Builder when editing a table when cancelling table creation should close the modal if there are no changes made` system
test in `spec/system/table_builder_spec.rb` was flaky. It turns out that
when the modal is opened, we have to load some JS/CSS files. While that
is happening, the modal is actually not functional and clicking stuff
in the footer can actually result in an error. In this case, the
`interceptCloseModal` calls the private `_hasChanges` function which
then calls `this.spreadsheet.getHeaders()`. When stuff is still loading,
`this.spreadsheet` has not been set. As a result we get the following
error:

```
Cannot read properties of null (reading 'getHeaders')
```

What does this change do?

Why stuff is loading, we will now hide the footer in the modal.
2024-01-16 10:48:49 +08:00
Alan Guo Xiang Tan
c33a8d658b
DEV: Avoid duplicating constant between client and server (#25179)
Why this change?

While the constant does not change very often, we should still avoid
duplicating the value of a constant used on the server side in the
client side to avoid the values going out of sync.
2024-01-16 09:50:55 +08:00
Alan Guo Xiang Tan
22614ca85b
DEV: Compile theme migrations javascript files when running theme qunit (#25219)
Why this change?

Currently, is it hard to iteratively write a theme settings migrations
because our theme migrations system does not rollback. Therefore, we
want to allow theme developers to be able to write QUnit tests for their
theme migrations files enabling them to iteratively write their theme
migrations.

What does this change do?

1. Update `Theme#baked_js_tests_with_digest` to include all `ThemeField`
records of `ThemeField#target` equal to `migrations`. Note that we do
not include the `settings` and `themePrefix` variables for migration files.

2. Don't minify JavaScript test files becasue it makes debugging in
   development hard.
2024-01-16 09:50:44 +08:00
Keegan George
f631eb5799
FIX: Trigger search app event being triggered multiple times (#25250) 2024-01-15 09:47:40 -08:00
chapoi
d5f527ee37
UX: show the SSO options when creating an account on mobile (#25260) 2024-01-15 16:36:00 +01:00
Arpit Jalan
d0486a72ac
FIX: use getter and setter for computed properties (#25259) 2024-01-15 15:04:28 +05:30
Kris
731699a7cf
UX: adjust onebox styles for chat, title line-height (#25249) 2024-01-12 18:14:26 -05:00
Kris
7639591552
UX: cleaning up some invite page styles (#25247) 2024-01-12 17:15:01 -05:00
Kris
92197b9c64
DEV: remove old keyboard modal CSS (#25246) 2024-01-12 17:02:38 -05:00
Ayke Halder
1a782acd9c
FIX: set microdata schema for topic on missing first post (#25195)
Some attributes of the microdata schema `DiscussionForumPosting` are rendered in the context of the first post.
Ensure these attributes are also set if the first post is not part of the current view.
2024-01-12 16:29:03 +05:30
Ayke Halder
9261500ea9
FIX: exclude empty posts from microdata schema for topic (#25198) 2024-01-12 12:47:56 +05:30
Ayke Halder
16b8476cb4
FIX: Ensure consistent datePublished on follow-up pages in topic microdata schema (#25130)
* Ensure consistent `datePublished` and remove `text` on second page in topic microdata schema

Always use `datePublished` from topic and never from `first_psot`. This ensures `datePublished` to be consistent on `first page` and `page=2+`.

No need to repeat `text` on `page=2+`. Especially do not set `text` on `page=2+` if it is only an abstract and thereby not 100% consistent with `text` on `first page`.

* Keep `text`attribute on follow-up pages
2024-01-12 12:11:08 +05:30
Alan Guo Xiang Tan
c76ca876a6
DEV: Add more debugging information to AR query logs on GitHub actions (#25237)
Why this change?

We have been chasing a problem with our flaky system test where the user
is logged out when it should never be.

What does this change do?

1. Logs the request path when lookup a user auth token.
2. Logs the request path and also the current thread's object id in
   ActiveRecord query logs.
2024-01-12 13:06:29 +08:00
Martin Brennan
80b93e06f7
FIX: Admin sidebar on mobile was still showing forum panel (#25236)
This commit makes it so the admin sidebar (when enabled)
will hide the other forum sidebar sections on mobile, the
same way it does on desktop. It was not happening automatically
because the sidebar component is also inside the hamburger-dropdown
component, which is used on mobile.
2024-01-12 14:49:08 +10:00
Alan Guo Xiang Tan
98b47636aa
DEV: Fix circular import dependency on user topic list route (#25234)
Why this change?

This is a follow up to cc917a1d7f. It has
been identified that there is a circular dependency issue in our Ember
app with the user topic list route and it looks something like this:

1. `controllers/user-topics-list` imports `routes/build-private-messages-route`
2. `routes/build-private-messages-route` imports
   `routes/user-topic-list`
3. `routes/user-topic-list` imports `controllers/user-topics-list`

This caused some weird problems in production where stuff would just not
load.

What does this change do?

1. Move `QUERY_PARAMS` from `controllers/user-topics-list` to
   `routes/user-topic-list` which is the more apprioriate place for the
   query params to be declared since they are route query params
   after all.

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-01-12 10:00:57 +08:00
Martin Brennan
de88fc26df
FIX: Admin sidebar fixes and custom link registration (#25200)
This commit adds some more links to the admin sidebar and
removes some to give it more parity with the old nav structure.

This also adds the `addAdminSidebarSectionLink` plugin API to
replace the admin-menu plugin outlet, which is used by plugins
like docker-manager to add links to the old admin nav.
2024-01-12 11:55:26 +10:00
Kris
52511a3260
DEV: remove :has selector from composer (#25233) 2024-01-11 19:15:37 -05:00
Penar Musaraj
8838d27754
A11Y: Allow keyboard users to scroll help modal (#25226) 2024-01-11 14:32:16 -05:00
Kris
05668bdf8a
DEV: add topicProgressExpanded arg to topic-navigation outlet (#25231) 2024-01-11 13:52:34 -05:00
Renato Atilio
c2aa64b251
FEATURE: Allow sorting group members by custom field via API (#25061)
* UX: add sorting params to groups table plugin outlet

* FEATURE: allow sorting group members by custom field via API

---------

Co-authored-by: Jean Perez <jmperez127@gmail.com>
2024-01-11 13:39:17 -03:00
Renato Atilio
f5f3742166
FIX: respect creation date when paginating group activity posts (#24993)
* FIX: respect creation date when paginating group activity posts

There are scenarios where the chronological order of posts doesn't match the order of their IDs. For instance, when moving the first post from one topic or PM to another, a new post (with a higher ID) will be created, but it will retain the original creation time.

This PR changes the group activity page and endpoint to paginate posts using created_at instead of relying on ID ordering.
2024-01-11 13:37:27 -03:00
Mark VanLandingham
68963e40da
FIX: Delete topicNotificationLevel from transformed post before creatingRecord in post widget (#25229) 2024-01-11 10:09:30 -06:00
Penar Musaraj
d42159babe
A11Y: Add role="button" to composer cancel button (#25228) 2024-01-11 10:08:52 -06:00
Penar Musaraj
9b61b72e33
A11Y: Add describedby associations in create account modal (#25227) 2024-01-11 10:19:56 -05:00
Penar Musaraj
3c517a52a7
A11Y: Fix sidebar toggle icon color contrast (#25225) 2024-01-11 09:22:41 -05:00
David Taylor
a15399fcea
DEV: Use correct vendor file when using ember-cli proxy in prod mode (#25224) 2024-01-11 13:27:21 +00:00
Joffrey JAFFEUX
63a50b12fd
DEV: implements category-row as a glimmer template (#25223)
This code introduces code duplication but category dropdown are a common performance area and we expect that having category rows as a glimmer template will improve performance when hundred of rows are rendered.

In the future we should investigate creating a base select-row component using glimmer to ease the migration.
2024-01-11 14:00:04 +01:00
Jarek Radosz
6d9fcf8f76
DEV: Don't apply this-fallback to strict-mode components (#25216)
fixes the issue with imported components references in plugin gjs files
2024-01-11 11:35:00 +01:00
Vinoth Kannan
cc917a1d7f
FIX: convert the route to Ember Octane to fix the dependency issue. (#25221)
The UI is randomly breaking while generating the messages menu in the user profile when we use the old class format. And it happens only when the `navigation_menu` site setting value is set to `header dropdown`. Users reported issues in some other random cases too.
2024-01-11 11:52:33 +05:30
Alan Guo Xiang Tan
59839e428f
DEV: Add skip_migrations param when importing remote theme (#25218)
Why this change?

Importing theme with the `bundle` params is used mainly by
`discourse_theme` CLI in the development environment. However, we do not
want migrations to automatically run in the development environment
and instead want the developer to be intentional about running theme
migrations. As such, this commit adds support for a
`skip_migrations` param when importing a theme with the `bundle` params.

This commit also adds a `migrated` attribute for migrations theme fields
to indicate whether a migrations theme field has been migrated or not.
2024-01-11 14:04:02 +08:00
Martin Brennan
08d641d932
DEV: Convert review_media_unless_trust_level to group-based setting (#25201)
This commit moves the review_media_unless_trust_level setting
to skip_review_media_groups as part of our move from TL to group
based settings.

c.f. https://meta.discourse.org/t/changes-coming-to-settings-for-giving-access-to-features-from-trust-levels-to-groups/283408
2024-01-11 13:43:01 +10:00
dependabot[bot]
c569107872
Build(deps): Bump follow-redirects from 1.15.2 to 1.15.4 in /app/assets/javascripts (#25212)
* Build(deps): Bump follow-redirects in /app/assets/javascripts

Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.2 to 1.15.4.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.2...v1.15.4)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-11 02:50:30 +01:00
Martin Brennan
a5c46c197c
FIX: Do not show themes list filter unless there are 10+ items (#25202)
Followup to be841e666e,
this commit does not show the themes/components list filter
if there are < 10 items in the list. This brings parity
with the search input, which does the same. If you only have
a few themes/components, then this extra UI is just unnecessary.

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-01-11 09:38:08 +10:00
dependabot[bot]
b2dfc22498
Build(deps-dev): Bump ember-exam from 8.0.0 to 9.0.0 in /app/assets/javascripts (#25210)
* Build(deps-dev): Bump ember-exam in /app/assets/javascripts

Bumps [ember-exam](https://github.com/ember-cli/ember-exam) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/ember-cli/ember-exam/releases)
- [Changelog](https://github.com/ember-cli/ember-exam/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-exam/compare/v8.0.0...v9.0.0)

---
updated-dependencies:
- dependency-name: ember-exam
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-10 20:57:56 +01:00
Penar Musaraj
7bfb1af180
A11Y: Better contrast for lightbox overlay links (#25208) 2024-01-10 14:07:49 -05:00
Bianca Nenciu
c916806fe8
FIX: Serialize categories when viewing a topic (#25206)
When navigating straight to a topic the category was not displayed at
all because the categories were not loaded. Similarly, the categories
for suggested topics were not loaded either.

This commit adds a list of categories to topic view model class and
serializer.
2024-01-10 20:30:59 +02:00
Jarek Radosz
0d52331823
DEV: Use ember 5 in package.json files by default (#25207) 2024-01-10 18:30:50 +01:00
Jarek Radosz
bcb31f79ce
FIX: Correctly rewrite script/link tags in the proxy (#25204)
Regressed in fe10a3feab

Fixes /theme-qunit
2024-01-10 14:49:33 +01:00
David Taylor
7a8cbf8422
DEV: Switch default Ember version to 5 (#25203)
https://meta.discourse.org/t/287211
2024-01-10 12:12:36 +00:00
David Taylor
627415eb21
DEV: Unsilence link-to deprecation for ember-cli build (#25197) 2024-01-10 11:01:57 +00:00
Vinoth Kannan
992211350a
FEATURE: option to sort user and group private messages. (#25146)
The UI will be the same as the one we're using in the topic list in "latest", "top" etc.,
2024-01-10 13:33:30 +05:30
Kris
18f8ebb2eb
UX: ensure links styled as buttons don't get visited color (#25199) 2024-01-09 18:33:50 -05:00
Mark VanLandingham
cef6aca6e5
DEV: Pass showDismiss to panel-body-bottom outlet (#25191) 2024-01-09 13:32:40 -06:00
chapoi
71b996d70f
UX: remove specific href styling (#25183) 2024-01-09 20:16:48 +01:00
Roman Rizzi
47597219b1
FEATURE: Prefer topic_embed's cached content when summarizing (#25190) 2024-01-09 14:00:01 -03:00
Kris
143c58122c
DEV: add plugin outlet to admin badge page (#25175) 2024-01-09 09:05:14 -05:00
Mark VanLandingham
b3791a2be0
DEV: Add setUserMenuNotificationsLimit plugin-api method (#25119) 2024-01-09 08:38:00 +08:00
Bianca Nenciu
be46acce8f
PERF: Prefer subquery instead of two queries (#25167)
The query that is now a subquery could return a long list of category
IDs, which slowed down the query considerably. This improvement reduces
the execution time from over 2 seconds down to about 100ms.
2024-01-09 08:19:37 +08:00
Martin Brennan
8c6144d116
DEV: Change enable_admin_sidebar_navigation to group setting (#25159)
This will make it easier to do more focused
testing of this change.
2024-01-09 09:06:27 +10:00
dependabot[bot]
e10620bfd3
Build(deps): Bump the babel group in /app/assets/javascripts with 1 update (#25176)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 1 update: [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/standalone` from 7.23.7 to 7.23.8
- [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.23.8/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-08 23:27:58 +01:00
marstall
3837657449
FIX: refactor calling of timed backup deletion
refactor calling of timed backup deletion so it runs regardless of SiteSetting.automatic_backups_enabled value
2024-01-08 15:41:00 -05:00
Bianca Nenciu
c62d1197b9
FEATURE: Add loading spinner on categories page (#25171)
The list of categories is loaded async when lazy_load_categories is
enabled, but there is no visual indication that the list of categories
is being loaded.
2024-01-08 20:28:57 +02:00
Kris
007a5fd99e
UX: fix review queue category and tag alignment, whitespace (#25166) 2024-01-08 12:55:39 -05:00
Jarek Radosz
c9d9bdfbd1
FIX: Remove all noscript elements, not just the first one (#25145)
Regressed in 6c5522d
2024-01-08 17:15:36 +01:00
Mark VanLandingham
af937581e9
DEV: Pass dismissButtonClick to panel-body-bottom outlet (#25163) 2024-01-08 10:12:52 -06:00
Ted Johansson
1b28823638
SECURITY: Prevent guest users from accessing secure uploads when login required 2024-01-08 08:02:19 -07:00
Daniel Waterworth
75c645453d
SECURITY: Store custom field values according to their registered type 2024-01-08 08:02:17 -07:00
Daniel Waterworth
4494d62531
SECURITY: Run custom field validations with save_custom_fields 2024-01-08 08:02:16 -07:00
Jarek Radosz
fe10a3feab
DEV: Use html-rewriter-wasm/lol_html instead of JSDOM (#25144)
Parsing html, modifying it, and then serializing had some negative side-effects (namely, it was losing html entity escaping in some cases)

Drops jsdom dependency
2024-01-08 12:51:23 +01:00
Martin Brennan
51016e56dd
FEATURE: Add copy quote button to post selection menu (#25139)
Merges the design experiment at
https://meta.discourse.org/t/post-quote-copy-to-clipboard-button-feedback/285376
into core.

This adds a new button by default to the menu that pops up when text is
selected in a post.

The normal Quote button that is shown when selecting text within a post
will open the composer with the quote markdown prefilled.

This new "Copy Quote" button copies the quote markdown directly to the
user’s clipboard. This is useful for when you want to copy the quote
elsewhere – to another topic or a chat message for instance – without
having to manually copy from the opened composer, which then has to be
dismissed afterwards. An example of quote markdown:

```
[quote="someuser, post:7, topic:285376"]
In this moment, I am euphoric.
[/quote]
```
2024-01-08 10:38:14 +10:00
dependabot[bot]
a720bdc72b
Build(deps-dev): Bump jsdom from 23.0.1 to 23.2.0 in /app/assets/javascripts (#25156)
* Build(deps-dev): Bump jsdom in /app/assets/javascripts

Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.1 to 23.2.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Changelog](https://github.com/jsdom/jsdom/blob/main/Changelog.md)
- [Commits](https://github.com/jsdom/jsdom/compare/23.0.1...23.2.0)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-08 08:13:13 +08:00
dependabot[bot]
7cdd5250c2
Build(deps-dev): Bump @floating-ui/dom from 1.5.3 to 1.5.4 in /app/assets/javascripts (#25157)
* Build(deps-dev): Bump @floating-ui/dom in /app/assets/javascripts

Bumps [@floating-ui/dom](https://github.com/floating-ui/floating-ui/tree/HEAD/packages/dom) from 1.5.3 to 1.5.4.
- [Release notes](https://github.com/floating-ui/floating-ui/releases)
- [Changelog](https://github.com/floating-ui/floating-ui/blob/master/packages/dom/CHANGELOG.md)
- [Commits](https://github.com/floating-ui/floating-ui/commits/@floating-ui/dom@1.5.4/packages/dom)

---
updated-dependencies:
- dependency-name: "@floating-ui/dom"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-08 08:10:49 +08:00
Kris
0472d3e122
UX: add missing button class to bulk-select (#24758) 2024-01-05 17:27:59 -05:00
Kris
ec0e802d34
DEV: less generic SVG ids to avoid clash (#25003) 2024-01-05 17:08:31 -05:00
Bianca Nenciu
62e570afe2
FIX: Ensure that categories array is not undefined (#25141)
With lazy_load_categories enabled, the categories array can be undefined
because it is not loaded yet (it is populated on demand).
2024-01-05 20:45:21 +02:00
Rafael dos Santos Silva
0fe11ef337
FIX: Stop optimizing WEBPs into JPGs (#25140)
This rarely results in better compression, and there are many uses of animated WEBPs too
2024-01-05 12:18:48 -03:00
Rafael dos Santos Silva
13735f35fb
FEATURE: Cache embed contents in the database (#25133)
* FEATURE: Cache embed contents in the database

This will be useful for features that rely on the semantic content of topics, like the many AI features



Co-authored-by: Roman Rizzi <rizziromanalejandro@gmail.com>
2024-01-05 10:09:31 -03:00
Krzysztof Kotlarek
0bb86129a5
FEATURE: used, unused, enabled, disabled component filter (#25136)
In this PR we introduced the enabled/disabled components filter.

https://github.com/discourse/discourse/pull/25105

However, components are slightly more complicated and can be used/unused/enabled/disabled.
2024-01-05 12:15:16 +11:00
Kris
e0a7d8f332
DEV: pass renderTimeline to topic-navigation outlet (#25132) 2024-01-04 14:47:05 -05:00
Krzysztof Kotlarek
7b81c39a8b
FIX: customise themes/components CSS (#25127)
Previous PR removed overflow-y CSS parameter which was required: https://github.com/discourse/discourse/pull/25105/files#diff-eae50f20f62ec6d720f9a100ccdef41622588c724bc68f6027ae13e2661bd3c4L249

Overflow is conflicting with select-kit so both search and filter were moved out of `themes-list-container`
2024-01-04 16:00:25 +11:00
Krzysztof Kotlarek
be841e666e
FEATURE: filter themes and components (#25105)
Allow filtering themes or components to find Active/Enabled Inactive/Disabled or Updates Available in the admin panel.
2024-01-04 14:29:08 +11:00
Kris
d3dddc6e1b
DEV: add btn-default class to review action buttons (#25095) 2024-01-04 07:05:07 +08:00
dependabot[bot]
d5c2321f8e
Build(deps-dev): Bump sass from 1.69.6 to 1.69.7 in /app/assets/javascripts (#25118)
* Build(deps-dev): Bump sass in /app/assets/javascripts

Bumps [sass](https://github.com/sass/dart-sass) from 1.69.6 to 1.69.7.
- [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.69.6...1.69.7)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-03 22:45:51 +01:00
Isaac Janzen
c689eeef31
FIX: move-topics topic search losing focus (#25116)
- [Meta Report](https://meta.discourse.org/t/moving-posts-the-input-focus-shifts-when-searching-for-a-topic-to-move-a-post-to-as-typing/284924/1)

### Correct Focus kept during Search
https://github.com/discourse/discourse/assets/50783505/ae9b4480-208e-470a-98c4-5ba10a053eb7

### Search Log after search
<img width="430" alt="Screenshot 2024-01-03 at 11 08 08 AM" src="https://github.com/discourse/discourse/assets/50783505/155f413a-adc1-4e59-a74b-dcef7af01990">
2024-01-03 14:21:43 -07:00
Isaac Janzen
1f94da349b
DEV: Make the Glimmer Search Menu the new default (#25092)
- Convert group based `experimental_search_menu_groups_enabled` site setting to be a _hidden_ boolean `experimental_search_menu` setting.
- Make default `true`
- Remove widget search menu tests

Discourse Encrypt Test Failure Fix - https://github.com/discourse/discourse-encrypt/pull/301
2024-01-03 09:07:27 -07:00
David Taylor
0cf4870cfb
DEV: Upgrade from Ember 5.4 to 5.5 (#25114)
This change only applies when EMBER_VERSION=5. Discourse's default is still Ember 3.28
2024-01-03 14:42:42 +00:00
Arpit Jalan
4bf60b3e5b
FEATURE: include username link in the microdata schema (#25112) 2024-01-03 20:11:41 +05:30
Godfrey Chan
9ac3961f23
DEV: patch @ember/test-helpers (#24896)
Mainly we are after https://github.com/emberjs/ember-test-helpers/pull/1445
so the Ember 5 test suite doesn't fail on canary, but also took
some code from https://github.com/emberjs/ember-test-helpers/pull/1378
as needed to make the code make sense.
2024-01-03 14:29:07 +00:00
Jordan Vidrine
8dad9788a3
FIX: Drop down fix (#25093) 2024-01-03 08:02:32 -06:00
David Taylor
07caa5bc03
FEATURE: Show warning banner for critical JS deprecations to admins (#25091)
Ported from d95706b25a

This is enabled by default, but can be disabled via the `warn_critical_js_deprecations` hidden site setting.

The `warn_critical_js_deprecations_message` site setting can be used by hosting providers to add a sentence to the warning message (e.g. a date when they will be deploying the Ember 5 upgrade).
2024-01-03 11:41:09 +00:00
David Taylor
6e7356e7c3
DEV: Add production-mode shim for Em deprecation (#25109) 2024-01-03 10:39:59 +00:00
dependabot[bot]
6a60fe5ac1
Build(deps-dev): Bump the embroider group in /app/assets/javascripts with 1 update (#25024)
* Build(deps-dev): Bump the embroider group

Bumps the embroider group in /app/assets/javascripts with 1 update: [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat).


Updates `@embroider/compat` from 3.4.2 to 3.4.3
- [Release notes](https://github.com/embroider-build/embroider/releases)
- [Changelog](https://github.com/embroider-build/embroider/blob/main/CHANGELOG.md)
- [Commits](https://github.com/embroider-build/embroider/commits/HEAD/packages/compat)

---
updated-dependencies:
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-03 10:24:05 +01:00
Martin Brennan
4e6d4193ea
DEV: Fix spec for post menu (#25100)
Followup to b92993fcee
I ran out of time to get this working for that fix,
also here I am making the post.url method have parity
with post.shareUrl in JS, which omits the post number
for the first post.
2024-01-03 16:55:08 +10:00
Arpit Jalan
69383e9afd
FIX: include only author username in the schema (#25106) 2024-01-03 12:16:29 +05:30
Arpit Jalan
fb056ae719
FIX: add required metadata schema for subsequent pages (#25102)
This commits adds missing metadata schema for subsequent pages (?page=2)

https://meta.discourse.org/t/discussion-forum-schema-improvements/287347/21
2024-01-03 09:37:04 +05:30
Natalie Tay
dc263b5189
FIX: Syntax error (#25101) 2024-01-03 11:01:42 +08:00
Ted Johansson
a0fbce996a
FEATURE: Buffer file names of failed uploads when bulk uploading (#25068)
Currently, when bulk uploading and multiple uploads fail, we show a number of dialogs in quick succession. This is of course a terrible user experience.

With this change, we buffer the error messages until there are no more pending uploads. Then we combine the buffered errors and display a single dialog with a list of failed files.
2024-01-03 10:29:23 +08:00
Kelv
b4a89ea610
FEAT: add cc addresses and post_id to sent email logs (#25014)
* add cc addresses and post_id to sent email logs
* sort cc addresses by email address filter value and collapse additional addreses into tooltip
* add slice helper for use in ember tempaltes
2024-01-03 09:27:25 +08:00
Sam
7b12be866d
FIX: never skip push notifications (#25099)
* FIX: never skip push notifications

According to Apple, silent push notifications are automatically punished per:

https://developer.apple.com/videos/play/wwdc2022/10098/?time=814

> As mentioned when I showed you the code on how to request a push
> subscription, you must promise that pushes will be user visible.
> Handling a push event is not an invitation for your JavaScript to
> get silent background runtime. Doing so would violate both a user’s
> trust and a user’s battery life. When handling a push event, you are
> in fact required to post a notification to Notification Center.
> Other browsers all have countermeasures against violating the promise
> to make pushes user visible, and so does Safari.
> In the beta build of macOS Ventura, after three push events where you
> fail to post a notification in a timely manner, your site’s push
> subscription will be revoked. You will need to go through the permission
> workflow again.

The isIdle check was causing certain push notifications to be silent

Additionally, the auto dismissal logic was causing delays which may cause
the device to think the push was a silent one.

By removing this we hope to ensure push notification delivery is more robust
and consistent on iOS.
2024-01-03 12:23:04 +11:00
Kris
e8509ddf50
FIX: github onebox styles for commits (#25098) 2024-01-02 17:29:56 -05:00
Kris
f999cde159
UX: update post background highlight (#25094) 2024-01-02 16:53:40 -05:00
Kris
c2dc2cd727
UX: add gap between category and tags in suggested topics (#25097) 2024-01-02 16:40:35 -05:00
Isaac Janzen
4886c1fddc
DEV: Update when / how we display of full name on search-item-user (#25090)
- Full name should only be displayed within `initial options`
- Keep results on a single line unless full name is included

# Initial Options
<img width="416" alt="Screenshot 2024-01-02 at 9 58 07 AM" src="https://github.com/discourse/discourse/assets/50783505/a9f6880a-86e0-4683-978a-c0391a90c78e">

# Other
<img width="432" alt="Screenshot 2024-01-02 at 9 58 43 AM" src="https://github.com/discourse/discourse/assets/50783505/83b508b0-c501-4fb7-89f7-8e66dc88979f">
<img width="424" alt="Screenshot 2024-01-02 at 9 58 18 AM" src="https://github.com/discourse/discourse/assets/50783505/b98223d7-f92c-4803-87bf-0470e6ce05ed">
2024-01-02 10:26:40 -07:00
Arpit Jalan
878d973d90
FIX: fixes for microdata schema rendering (#25082)
d9ca6c3bb9 (r135940042)
2024-01-02 19:23:57 +05:30
dependabot[bot]
37127ec141
Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#25075)
* Build(deps): Bump the babel group

Bumps the babel group in /app/assets/javascripts with 2 updates: [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) and [@babel/standalone](https://github.com/babel/babel/tree/HEAD/packages/babel-standalone).


Updates `@babel/core` from 7.23.6 to 7.23.7
- [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.23.7/packages/babel-core)

Updates `@babel/standalone` from 7.23.6 to 7.23.7
- [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.23.7/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: babel
- dependency-name: "@babel/standalone"
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: babel
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-02 11:51:42 +01:00
David Taylor
34ae2080c6
DEV: Merge mobile/desktop navigation-bar templates (#25017)
Having separate mobile/desktop templates is something we're moving away from. This commit moves the mobile-specific logic into a conditional in the main colocated template.
2024-01-02 10:48:31 +00:00
David Taylor
fb95ab8e00
DEV: Use webpack to load table-builder dependencies (#25018)
This avoids the need to vendor the JS/CSS in our git repository
2024-01-02 10:47:47 +00:00
David Taylor
e47ad13122
DEV: Colocate mobile-nav template (#25016)
Previously it was relying on the `templates/mobile` logic to make this a simple div wrapper on mobile, and a more complex implementation on mobile. This commit colocates the template so it's active on mobile and desktop, but adds an `{{#if` block to explicitly change the behavior.
2024-01-02 10:47:21 +00:00
David Taylor
236f3cc6eb
UX: Add 'edit' link to theme colour palette selector (#25073) 2024-01-02 10:45:52 +00:00
David Taylor
641c689ac1
DEV: Patch deprecated-run-loop-and-computed-dot-access in production (#25074)
In Ember, these deprecations are wrapped in an `if(DEBUG)` check, so they are optimized out of the production build. We prefer to keep deprecations in production so that we can collect telemetry and warn theme authors who do not use local development environments.

This commit restores the deprecations as part of our ember-production-deprecations addon.
2024-01-02 10:44:26 +00:00
Natalie Tay
b4f36507e0
FIX: Allow the flags to be cleaned up (#25085)
Currently, the reviewable queue includes ReviewableFlaggedPost with posts that have already been hidden. This allows for such hidden posts to be cleared up by the auto-tool.
2024-01-02 18:32:50 +08:00
Martin Brennan
b92993fcee
FIX: Post copy link not working (#25086)
Followup to c6cb319671,
the actionCallback function was double-wrapped with () => {}
which meant that copyClipboard did not return a promise.
2024-01-02 19:23:41 +10:00
dependabot[bot]
a2e4cc0903
Build(deps-dev): Bump sass from 1.69.5 to 1.69.6 in /app/assets/javascripts (#25076)
* Build(deps-dev): Bump sass in /app/assets/javascripts

Bumps [sass](https://github.com/sass/dart-sass) from 1.69.5 to 1.69.6.
- [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.69.5...1.69.6)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2024-01-02 08:43:40 +08:00
Sam
baa7c4cec7
FIX: allow styling of feedback on mobile (#25072)
(to test try using discourse-ai which displays feedback on mobile)


---------

Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
2023-12-30 08:57:16 +11:00
Alan Guo Xiang Tan
0756486b65
FIX: Adding form template to category dropdown can some times be empty (#25066)
Why this change?

A system test which was testing our ability to add a form template to a
category was flaky. This turned out to be a client side bug where the
`FormTemplateChooser` dropdown may not display any dropdown options if
the ajax request to fetch the categories form template has not been
completed when the dropdown is opened.

What does this change do?

Make use of select-kit's `triggerSearch` function to fetch the records
which will properly rerender the dropdown options.
2023-12-29 14:15:56 +08:00
Sam
c6cb319671
DEV: API allow post actions to optionally provide visual feedback
post action feedback is the mechanism in which we provide visual feedback
to the user when a post action is clicked, in cases where the action is a
background (hidden to user) for example: copying text to the clipboard

Core uses this to share post links, but other plugins (for example: AI) use
this to share post transcripts via the clipboard.

This adds a proper plugin API to consume this functionality

`addPostMenuButton` can provide a builder that specified a function as the action. 

This function will be called with an object that has both the current post and a method for showing feedback.
2023-12-29 15:59:43 +11:00
Rafael dos Santos Silva
a6cf2d20e6
FEATURE: Topic crawler view bottom plugin outlet (#25060) 2023-12-28 15:16:30 -03:00
David Taylor
48ad326ba4
FIX: Handle deprecations correctly in server-side pretty-text (#25059)
`window.deprecationWorkflow` does not exist in the server-side pretty-text environment. This commit fixes the check and adds a general spec for deprecations triggered inside pretty-text
2023-12-28 16:35:06 +00:00
Isaac Janzen
8e58c6dd93
DEV: Add extension points to Admin User Fields (#25021)
- Add plugin outlet to `AdminUserFieldItem`
- Add ability to include custom fields when saving `AdminUserFieldItem` 
- Update plugin API with `includeUserFieldPropertiesOnSave` per ☝️ 
- Add `DiscoursePluginRegistry` to `UserFieldsController` to add custom columns
2023-12-28 08:24:24 -07:00
marstall
ddd750cda7
FEATURE: change /invites.json api endpoint to optionally accept array of emails (#24853)
https://meta.discourse.org/t/feature-request-sending-bulk-invitations-via-api/272423/18
2023-12-28 10:16:04 -05:00
Bianca Nenciu
14269232ba
DEV: No longer preload categories (#24950)
Categories will no longer be preloaded when `lazy_load_categories` is
enabled through PreloadStore.

Instead, the list of site categories will continue to be populated
by `Site.updateCategory` as more and more categories are being loaded
from different sources (topic lists, category selectors, etc).
2023-12-28 14:36:33 +02:00
Bianca Nenciu
c4396c6acf
DEV: Prefer Ember's RSVP over native Promise (#25049)
This causes an incompatibility in some plugins that are patching the
discovery-categories route, such as discourse-global-filter.
2023-12-28 14:15:35 +02:00
Sam
b4c1b10969
FIX: copy link not working in non secure context (#25053)
In non secure contexts (HTTP vs HTTPS) which many run in development the
`clipboardCopy` method falls back to and an exec hack.

However, callers expect a promise from this method and the fallback just
returns a boolean.
2023-12-28 10:42:23 +11:00
David Battersby
a7fe2e1a48
FIX: pass args in chat header logo plugin outlet (#25050)
This change passes down all params to the home logo widget (rather than explicitly setting minimized). This will allow for flexible logo sizing in the Discourse full width theme component.
2023-12-27 19:43:20 +08:00
Arpit Jalan
d9ca6c3bb9
FIX: improve structured data based on recent changes (#25043)
This commit makes some improvements to a topic's structured data based
on the recommendation on meta topic: https://meta.discourse.org/t/google-structured-data-for-forums-and-profile-pages/286762/9
2023-12-27 11:13:16 +05:30
dependabot[bot]
689fa512b6
Build(deps): Bump ember-auto-import from 2.7.1 to 2.7.2 in /app/assets/javascripts (#25025)
* Build(deps): Bump ember-auto-import in /app/assets/javascripts

Bumps [ember-auto-import](https://github.com/ef4/ember-auto-import/tree/HEAD/packages/ember-auto-import) from 2.7.1 to 2.7.2.
- [Release notes](https://github.com/ef4/ember-auto-import/releases)
- [Changelog](https://github.com/embroider-build/ember-auto-import/blob/main/packages/ember-auto-import/CHANGELOG.md)
- [Commits](https://github.com/ef4/ember-auto-import/commits/HEAD/packages/ember-auto-import)

---
updated-dependencies:
- dependency-name: ember-auto-import
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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

* Update lockfiles for ember version flag

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: discoursebuild <build@discourse.org>
2023-12-27 08:25:43 +08:00
chapoi
32c438387b
UX: make sidebar title static (#25040)
* UX: make sidebar title static

* tests
2023-12-26 13:37:32 +01:00
chapoi
3a20718526
UX: header avatar > change to aria-label (#25038) 2023-12-26 12:18:12 +01:00
David Battersby
67d736a045
FEATURE: chat header redesign on mobile (#24938)
This change simplifies the layout of our header when chat is open on mobile. The search icon and hamburger menu icons are also hidden and the Discourse logo is replaced by a ← Forum link to make it easier to continue where you left off within the forum (prior to this update the user could only go back to the forum index page).
2023-12-26 17:36:26 +08:00
Alan Guo Xiang Tan
043ba1d179
DEV: Fix job cluster concurrency spec timing out (#25035)
Why this change?

On CI, we have been seeing the "handles job concurrency" job timing out
on CI after 45 seconds. Upon closer inspection of `Jobs::Base#perform`
when cluster concurrency has been set, we see that a thread is spun up
to extend the expiring of a redis key by 120 seconds every 60 seconds
while the job is still being executed. The thread looks like this before
the fix:

```
keepalive_thread =
  Thread.new do
    while parent_thread.alive? && !finished
      Discourse.redis.without_namespace.expire(cluster_concurrency_redis_key, 120)
      sleep 60
    end
  end
```

In an ensure block of `Jobs::Base#perform`, the thread is stop by doing
something like this:

```
finished = true
keepalive_thread.wakeup
keepalive_thread.join
```

If the thread is sleeping, `keepalive_thread.wakeup` will stop the
`sleep` method and run the next iteration causing the thread to
complete. However, there is a timing issue at play here. If
`keepalive_thread.wakeup` is called at a time when the thread is not
sleeping, it will have no effect and the thread may end up sleeping for
60 seconds which is longer than our timeout on CI of 45 seconds.

What does this change do?

1. Change `sleep 60` to sleep in intervals of 1 second checking if the
   job has been finished each time.

2. Add `use_redis_snapshotting` to `Jobs::Base` spec since Redis is
   involved in scheduling and we want to ensure we don't leak Redis
keys.

3. Add `ConcurrentJob.stop!` and `thread.join` to `ensure` block in "handles job concurrency"
   test since a failing expectation will cause us to not clean up the
thread we created in the test.
2023-12-26 14:47:03 +08:00
Martin Brennan
89705be722
DEV: Add auto map from TL -> group site settings in DeprecatedSettings (#24959)
When setting an old TL based site setting in the console e.g.:

SiteSetting.min_trust_level_to_allow_ignore = TrustLevel[3]

We will silently convert this to the corresponding Group::AUTO_GROUP. And vice-versa, when we read the value on the old setting, we will automatically get the lowest trust level corresponding to the lowest auto group for the new setting in the database.
2023-12-26 14:39:18 +08:00
Natalie Tay
12131c8e21
FIX: CLS jumpiness in post-stream when ?page=N (#25034)
With certain conditions, this issue does not show up. The easiest way to reproduce this is probably to do either of this

- Use a 3G slow connection or;
- Add a breakpoint to scrolling-post-stream.topRefresh (anon)
- (and optionally lock-on.lock)

This issue is happening because there are multiple areas that set scroll location in the post stream when loading a topic. In our case, sometimes lock-on is triggering and scrolling to post_1, before ?page=2's post_21 is being scrolled to, due to posts above post_21 can finishing loading at different times. This causes some calculations to not add up, as being in the middle of a post stream has different calculations than being at the top of the post stream.
2023-12-26 14:31:49 +08:00
Alan Guo Xiang Tan
bf3e121323
DEV: Set config.eager_load = true on CI (#25032)
Why this change?

When running system tests on our CI, we have been occasionally seeing
server errors like:

```
Error encountered while proccessing /stylesheets/desktop_e58cf7f686aab173f9b778797f241913c2833c39.css
  NoMethodError: undefined method `+' for nil:NilClass
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/path/pattern.rb:139:in `[]'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:127:in `block (2 levels) in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `each_with_index'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:126:in `block in find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `map!'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:123:in `find_routes'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/journey/router.rb:32:in `serve'
    /__w/discourse/discourse/vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.7/lib/action_dispatch/routing/route_set.rb:852:in `call'
```

While looking through various Rails issues related to the error above, I
came across https://github.com/rails/rails/pull/27647 which is a fix to
fully initialize routes before the first request is handled. However,
the routes are only fully initialize only if `config.eager_load` is set
to `true`. There is no reason why `config.eager_load` shouldn't be `true` in the
CI environment and this is what a new Rails 7.1 app is generated with.

What does this change do?

Enable `config.eager_load` when `env["CI"]` is present
2023-12-26 13:05:55 +08:00
Kris
c4f940aa31
UX: resize pm composer inputs for narrow screens (#25019) 2023-12-22 15:17:26 -05:00
Kris
02b117a852
FIX: scope PM background color to PMs (#25020) 2023-12-22 15:16:59 -05:00
Kris
096e26d972
UX: adjust pm styles to enbubble controls (#24996) 2023-12-22 14:28:02 -05:00
Mark VanLandingham
64438fff25
FIX: Bind events properly in search-menu.js & fix focus issue (#25006)
The problem:
Removing the options to addEventListener results in events that are properly cleaned up when the search menu is removed. Previously every time you opened the search menu, the listeners would be attached again, and clicking outside even after it was closed would fire the function again and again (N times as you opened the search menu!)

This was made far far worse in this commit c91d053, where I called close() to remove focus from the search input in the event that the search menu is rendered outside the header.

The problem with this was 2-fold. The close function tried to focus the search header button in core here. When the events aren't cleanup up and that happens... you can't do anything in the app.

The solution:
We don't need the event listeners to close the search menu when it's rendered from the header. The widget header handles clicks outside of the header. Sooo

1. Only register them for standalone search menus
2. Remove the passive options to the listeners so that they are properly removed on close
3. Call close() to unfocus input rather than just closing panel
4. Rename passed in are closeSearchMenu -> onClose because it's more accurate. It's really a callback.
2023-12-22 09:48:00 -06:00
Alan Guo Xiang Tan
5668866031
UX: Disable dropdown when filtering in edit nav menu tags modal (#25010)
Why this change?

The `Editing sidebar tags navigation allows a user to filter the tag in the modal by selection` system test was flaky
when we were doing `modal.filter("").filter_by_unselected`. The
hypothesis here is that the filtering is debounced before issue a
request to load the new tags and the dropdown is only disabled in the
debounced function. Thereforethere is a chance that when
`modal.filter_by_unselected` runs, it is selecting a row against a
disabled dropdown which results in a noop.

What does this change do?

When filtering using the input in the modal, we will now disabled the
dropdown until the filtering completes which will then re-enable the
dropdown.
2023-12-22 16:26:44 +08:00
Krzysztof Kotlarek
7cad69e6ef
UX: File types site setting (#24976)
New file types site setting with buttons allowing to easily add image/video/audio/document extensions to the list.
2023-12-22 11:23:42 +11:00
Mark VanLandingham
fe8b1a1074
REVERT: "FIX: Properly close search menu on click/touch outside (#25000)" (#25005)
This reverts commit c91d053dec.
2023-12-21 15:54:17 -06:00
Mark VanLandingham
7c7e2aeff8
DEV: Move menu-item-end PluginOutlet outside <a> tag (#25001) 2023-12-21 12:39:17 -06:00
Kris
2887e2c055
UX: adjust bootstrap mode tooltip color (#25002) 2023-12-21 13:22:28 -05:00
Mark VanLandingham
c91d053dec
FIX: Properly close search menu on click/touch outside (#25000) 2023-12-21 11:05:36 -06:00
Bianca Nenciu
a3bd86f85c
DEV: Clean up category-link (#24988)
The `style` variable is always set because every category has a color
defined, so the surrounding if statement is unnecessary.

"+ X categories" option has also been removed in the past and the code
related to it is now dead code.
2023-12-21 11:54:47 +02:00
Ted Johansson
25ccf6fab1
FIX: Update position on model when re-positioning record (#24997)
When updating the position of a category, the server correctly updates the position in the database, but the response sent back to the client still contains the old position, causing it to "flip back" in the UI when saving. Only reloading the page will reveal the new, correct value.

The Positionable concern correctly positions the record and updates the database, but we don't assign the new position to the already instantiated model.

This change just assigns self.position after the database update. 😎
2023-12-21 10:15:10 +08:00
Martin Brennan
7fcef5f2f9
FIX: Show admin plugin route sub-links in sidebar (#24982)
This changes the Plugins link in the admin sidebar to
be a section instead, which then shows all enabled plugin
admin routes (which are custom routes some plugins e.g.
chat define).

This is done via adding some special preloaded data for
all controllers based on AdminController, and also specifically
on Admin::PluginsController, to have the routes loaded without
additional requests on page load.

We just use a cog for all the route icons for now...we don't
have anything better.
2023-12-21 11:37:20 +10:00
Ted Johansson
8fce890ead
FEATURE: Use native number fields for integer inputs (#24984)
We had our own implementation of number fields in Ember, extended from text fields. Number inputs are now widely supported in browsers, and we can fall back on the native implementation which will be a better experience in almost all cases.

One thing traded off here is number fields can't have a placeholder, but that is intentional. We aren't using that ability anywhere, and we probably only kept it because we're extending text fields.

With this change we can get rid of the entire .js file, since there's no custom behaviour, and just make NumberField a template.
2023-12-21 08:45:40 +08:00
Mark VanLandingham
3c6362bb26
DEV: PluginApi function to customize search menu assistant item behavior (#24992) 2023-12-20 15:25:45 -06:00
Osama Sayegh
87883a1963
FIX: Show true content of robots.txt after restoring to default (#24980)
Meta topic: https://meta.discourse.org/t/reseting-robots-txt-override-doesnt-seem-to-work-as-expected/287880?u=osama

Discourse provides a default version for `/robots.txt` which can be customized by admins in `/admin/customize/robots`. In that page, there's a button to reset back to the default version that Discourse provides. However, there's currently a bug with the reset button where the content appears to change to some HTML document instead of the default `robots.txt` version when clicking the button. Refreshing the page shows the true/correct content of `robots.txt` which is the default version, so the reset button actually works but there's a display problem.

What causes this display problem is that we use Rails' `render_to_string` method to generate the default content for `robots.txt` from the template, and what we get from that method is the `robots.txt` content wrapped in the application layout. To fix this issue, we need to pass `layout: false` to the `render_to_string` method so that it renders the template without any layouts.
2023-12-20 23:00:37 +03:00
Jordan Vidrine
547aafba4f
UX: Add class to text select menu when fast-editing (#24991) 2023-12-20 13:54:59 -06:00
Jarek Radosz
e18bb6e9fb
DEV: Bump the content-tag patch (#24990) 2023-12-20 18:59:33 +01:00
David Taylor
40e4fe4423
FIX: Remove old 'wizard' js script (#24986)
This was causing errors for admins. Followup to cbc28e8e33
2023-12-20 14:01:43 +00:00
David Taylor
cbc28e8e33
Enable Embroider/Webpack code spliting for Wizard (#24919)
(extracted from #23678)

* Move Wizard back into main app, remove Wizard addon
* Remove Wizard-related resolver or build hacks
* Install and enable `@embroider/router`
* Add "wizard" to `splitAtRoutes`

In a fully optimized Embroider app, route-based code splitting more
or less Just Work™ – install `@embroider/router`, subclass from it,
configure which routes you want to split and that's about it.

However, our app is not "fully optimized", by which I mean we are
not able to turn on all the `static*` flags.

In Embroider, "static" means "statically analyzable". Specifically
it means that all inter-dependencies between modules (files) are
explicitly expressed as `import`s, as opposed to `{{i18n ...}}`
magically means "look for the default export in app/helpers/i18n.js"
or something even more dynamic with the resolver.

Without turning on those flags, Embroider behaves conservatively,
slurps up all `app` files eagerly into the primary bundle/chunks.
So, while you _could_ turn on route-based code splitting, there
won't be much to split.

The commits leading up to this involves a bunch of refactors and
cleanups that 1) works perfectly fine in the classic build, 2) are
good and useful in their own right, but also 3) re-arranged things
such that most dependencies are now explicit.

With those in place, I was able to move all the wizard code into
the "app/static" folder. Embroider does not eagerly pull things from
this folder into any bundle, unless something explicitly "asks" for
them via `imports`. Conversely, things from this folder are not
registered with the resolver and are not added to the `loader.js`
registry.

In conjunction with route-based code splitting, we now have the
ability to split out islands of on-demand functionalities from the
main app bundle.

When you split a route in Embroider, it automatically creates a
bundle/entrypoint with the relevant routes/templates/controllers
matching that route prefix. Anything they import will be added to
the bundle as well, assuming they are not already in the main app
bundle, which is where the "app/static" folder comes into play.

The "app/static" folder name is not special. It is configured in
ember-cli-build.js. Alternatively, we could have left everything
in their normal locations, and add more fine-grained paths to the
`staticAppPaths` array. I just thought it would be easy to manage
and scale, and less error-prone to do it this way.

Note that putting things in `app/static` does not guarantee that
it would not be part of the main app bundle. For example, if we
were to add an `import ... from "app/static/wizard/...";` in a
main bundle file (say, `app.js`), then that chunk of the module
graph would be pulled in. (Consider using `await import(...)`?)

Overtime, we can build better tooling (e.g. lint rules and babel
macros to make things less repetitive) as we expand the use of
this pattern, but this is a start.

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-20 13:15:06 +00:00
David Taylor
2f40d9b07b
DEV: Correct ember-5 lockfile generation (#24983)
The regen_ember_5_lockfile script was actually just duplicating the ember3 lockfile without changes 🤦‍♂️. This commit fixes that, and updates the ember-version-enforcement workflow to detect lockfile issues in future.
2023-12-20 11:45:01 +00:00
Isaac Janzen
043fa28fab
FIX: Add missing user search result name and styling (#24974)
Co-authored-by: Mark VanLandingham <markvanlan@gmail.com>
2023-12-19 23:14:00 -06:00
Mark VanLandingham
6d5dd92ea1
DEV: Half-revert search-menu flicker fix (#24975) 2023-12-19 16:22:30 -06:00
David Taylor
29107b3429
DEV: Stop exporting internal routeAction function (#24946)
Consumers should use the default export. This function doesn't work directly (unless you manually construct its arguments) - the default export helper handles all that automatically.
2023-12-19 12:47:22 +00:00