Commit Graph

22643 Commits

Author SHA1 Message Date
Joffrey JAFFEUX
9d3ab91517
UX:minor tweaks to user notifications dropdown (#26754)
- changes mute icon to bell-slash
- changed mute text
- changed ignore text
2024-04-25 15:22:41 +02:00
David Taylor
2f2da72747
FEATURE: Add experimental tracking of 'real browser' pageviews (#26647)
Our 'page_view_crawler' / 'page_view_anon' metrics are based purely on the User Agent sent by clients. This means that 'badly behaved' bots which are imitating real user agents are counted towards 'anon' page views.

This commit introduces a new method of tracking visitors. When an initial HTML request is made, we assume it is a 'non-browser' request (i.e. a bot). Then, once the JS application has booted, we notify the server to count it as a 'browser' request. This reliance on a JavaScript-capable browser matches up more closely to dedicated analytics systems like Google Analytics.

Existing data collection and graphs are unchanged. Data collected via the new technique is available in a new 'experimental' report.
2024-04-25 11:00:01 +01:00
Penar Musaraj
1f73e7d039
FIX: Allow deleting avatars from the selectable avatars setting (#26720)
Fixes two issues:

- frontend was reloading the page when clicking-to-remove avatar
- backend wasn't allowing resetting the setting by deleting all avatars
2024-04-24 16:07:12 -04:00
Keegan George
963647c734
DEV: Add experimental ember-instantsearch add-on (#26667) 2024-04-24 11:49:05 -07:00
Joffrey JAFFEUX
be96295c25
DEV: supports inline for d-menu (#26742)
`<DMenu @inline={{true}} ...>...</DMenu>` will render the body relative to the trigger instead of rendering it in a portal.
2024-04-24 18:29:26 +02:00
Joffrey JAFFEUX
9f8091abf0
FIX: prevents error due to property override (#26741)
The `secondFactorMethod` property is defined as a @discourseComputed` which means it can't be overridden. Yet, we do override it in `app/assets/javascripts/discourse/app/components/security-key-form.js` and `app/assets/javascripts/discourse/app/components/second-factor-form.js` by doing `this.set("secondFactorMethod", ...)`.

This commit sets a default property `secondFactorMethod` on the `email-login` controller after the model has been loaded. Given this property is no longer computed, it can be set again at other places.

Followups:
- Ideally we would follow DDAU pattern but this is quite a significant refactor.
- The test I added is very limited, ideally we should start writing system specs for this, but it means having to deal with the email, it's a significant work.
2024-04-24 17:54:16 +02:00
Joffrey JAFFEUX
21ef033e86
UX: changes normal level icon for user-notifications (#26740)
The icon has been changed from "user" to "bell" to make this level more clear.
2024-04-24 16:07:21 +02:00
Kris
dcf9ca054b
DEV: add topic-area-bottom plugin outlet (#26721) 2024-04-24 09:56:59 -04:00
David Taylor
dcd994a9f1
DEV: Drop workbox dependency (#26735)
This service-worker caching functionality was disabled by default in 1c58395bca, and the setting to re-enable was marked as experimental. Now we are dropping all the related logic.
2024-04-24 10:19:12 +01:00
dependabot[bot]
3b07b6e4ca
Build(deps-dev): Bump qunit-dom from 3.1.1 to 3.1.2 (#26724)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.1.1 to 3.1.2.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.1.1...v3.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-24 09:42:32 +01:00
Krzysztof Kotlarek
0cd4d7ddd1
FEATURE: include themes and components keywords to the admin sidebar (#26708)
Include themes and component keywords to make the filter more accurate.
2024-04-24 12:34:38 +10:00
Daniel Waterworth
d2a52c3c35
FIX: Use serialized subcategories in subcategory-with-featured-topics (#26718) 2024-04-23 15:27:12 -05:00
Kris
efc31387e2
UX: bookmark button in topic footer should have btn-default class (#26717) 2024-04-23 13:11:13 -04:00
Arkshine
c3fb050988
FIX: Automatic code highlighting not applied in fullscreen modal (#26710) 2024-04-23 13:04:17 -04:00
Krzysztof Kotlarek
e1d9fd479f
FEATURE: after wizard admin is redirected to the guide page (#26696)
After the wizard is completed, the admin should be redirected to the admin guide topic.

Also tooltip from "Getting started" button was removed.
2024-04-23 10:04:15 +10:00
dependabot[bot]
ada3588860
Build(deps): Bump terser from 5.30.3 to 5.30.4 (#26703)
Bumps [terser](https://github.com/terser/terser) from 5.30.3 to 5.30.4.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.30.3...v5.30.4)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-23 08:55:51 +10:00
Penar Musaraj
30e3f291f8
UX: Fix styling for focused row (#26698) 2024-04-22 13:17:00 -04:00
Kris
b971efed8c
UX: dynamic spacing for summarization buttons (#26690) 2024-04-22 09:49:00 -04:00
Gabriel Grubba
dc996a1e5c
FIX: Locale mismatch at theme translations picker (#26687)
* FIX: Locale mismatch at theme translations picker

Before, the theme translations picker value was set to the
site's default locale, which mismatches from the user's locale.

This commit changes the picker value to the user locale.

relates to https://meta.discourse.org/t/locale-mismatch-at-theme-translations/302879

* DEV: Address code review feedback.

- https://github.com/discourse/discourse/pull/26687#discussion_r1572516758
- https://github.com/discourse/discourse/pull/26687#discussion_r1572524059
2024-04-19 14:23:27 -03:00
Mark VanLandingham
239eac7799
DEV: Allow auth errors to render HTML (#26686) 2024-04-19 09:11:03 -05:00
Bianca Nenciu
1deeff2336
FIX: Serialize categories for group posts (#26663)
This is necessary when "lazy load categories" feature is enabled to
make sure the categories are rendered for group posts.
2024-04-19 16:33:37 +03:00
Kris
5021f8a7da
FIX: correct arguments for "show top replies" in topic map (#26681)
Co-authored-by: Kelv <kelv@discourse.org>
2024-04-19 08:17:05 -04:00
David Taylor
7180da1b1c DEV: Boolean -> globalThis.Boolean in gjs template
Globals are no longer directly available in gjs
2024-04-19 10:06:08 +01:00
David Taylor
e9e3456f18 DEV: Rename modifier import to avoid overwriting template keyword 2024-04-19 10:06:08 +01:00
dependabot[bot]
9f9b09536d Build(deps): Bump babel-plugin-ember-template-compilation
Bumps [babel-plugin-ember-template-compilation](https://github.com/emberjs/babel-plugin-ember-template-compilation) from 2.2.1 to 2.2.2.
- [Release notes](https://github.com/emberjs/babel-plugin-ember-template-compilation/releases)
- [Changelog](https://github.com/emberjs/babel-plugin-ember-template-compilation/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emberjs/babel-plugin-ember-template-compilation/compare/v2.2.1...v2.2.2)

---
updated-dependencies:
- dependency-name: babel-plugin-ember-template-compilation
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-19 10:06:08 +01:00
dependabot[bot]
5a2317609f
Build(deps-dev): Bump babel-import-util from 2.0.2 to 2.0.3 (#26682)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.2 to 2.0.3.
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: babel-import-util
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-19 09:31:25 +01:00
David Battersby
06500fa626
FEATURE: add swipe up to close toast notification (#26659)
Toasts can now be dismissed by doing a swipe up on mobile.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-04-19 09:49:50 +02:00
Carson Chang
7cf04d96c3
UX: Keep input headings consistently bold (#26510) 2024-04-18 20:22:08 -07:00
Martin Brennan
dbcefcf85e
FEATURE: Show additional filter links in admin sidebar for no results (#26672)
When the user sees no results in their admin sidebar query,
we are adding two additional links:

* "Search site settings" - Navigates to the site settings page
  with the filter prefilled in the search
* "Admin user list" - Navigates to the user list with the filter
  prefilled in the username search

This will bridge the gap until we have a full admin-wide search.

Also make admin site setting search param refresh on filter changes

---------

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-04-19 10:55:17 +10:00
dependabot[bot]
b88273e046
Build(deps-dev): Bump the embroider group with 5 updates (#26677)
Bumps the embroider group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [@embroider/test-setup](https://github.com/embroider-build/embroider/tree/HEAD/packages/test-setup) | `3.0.3` | `4.0.0` |
| [@embroider/compat](https://github.com/embroider-build/embroider/tree/HEAD/packages/compat) | `3.4.7` | `3.4.8` |
| [@embroider/core](https://github.com/embroider-build/embroider/tree/HEAD/packages/core) | `3.4.7` | `3.4.8` |
| [@embroider/macros](https://github.com/embroider-build/embroider/tree/HEAD/packages/macros) | `1.15.1` | `1.16.0` |
| [@embroider/webpack](https://github.com/embroider-build/embroider/tree/HEAD/packages/webpack) | `3.2.3` | `4.0.0` |


Updates `@embroider/test-setup` from 3.0.3 to 4.0.0
- [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/test-setup)

Updates `@embroider/compat` from 3.4.7 to 3.4.8
- [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)

Updates `@embroider/core` from 3.4.7 to 3.4.8
- [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/core)

Updates `@embroider/macros` from 1.15.1 to 1.16.0
- [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/macros)

Updates `@embroider/webpack` from 3.2.3 to 4.0.0
- [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/webpack)

---
updated-dependencies:
- dependency-name: "@embroider/test-setup"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: embroider
- dependency-name: "@embroider/compat"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: embroider
- dependency-name: "@embroider/macros"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: embroider
- dependency-name: "@embroider/webpack"
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: embroider
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-18 15:48:10 +01:00
David Taylor
5c2ac4fe88
DEV: Allow RenderGlimmer to be used inside post-cooked-glued widgets (#26675)
In this case, the top-level widget being glued must have a `_postCookedWidget` attribute.
2024-04-18 15:39:29 +01:00
Jarek Radosz
bfd6a7b86c
DEV: Clean up sidebar/filter.gjs (#26673)
The most important change being the replacement of `Input` component with an `<input>` element.
2024-04-18 13:17:21 +02:00
Jarek Radosz
2d5d7b5a33
DEV: Don't leak the topic model through minimized arg (#26669)
Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-18 13:17:09 +02:00
Martin Brennan
2d2329095c
FEATURE: Use new bookmark menu in topic footer buttons (#26670)
Followup to 67a8080e33

This commit makes it so the topic footer button for bookmarks
uses the new BookmarkMenu component, and makes some tweaks to
that component to allow for a label and CSS class options.

Also introduces a TopicBookmarkManager to manage the saving/editing/
deleting of the topic level bookmarks and the reactivity that happens
in the topic UI afterward.

Next commit should rip out old bookmark associated code in the
topic controller as it will no longer be needed.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
2024-04-18 11:06:12 +02:00
Joffrey JAFFEUX
09311c7dab
DEV: minimum fabricators for post/topic (#26671)
I will add new default properties as needed in the future, but for now this is enough to have an entry point.
2024-04-18 09:54:23 +02:00
Martin Brennan
99d22c85ae
FEATURE: Make admin sidebar keywords translateable (#26657)
This commit ensures that additional keywords for admin
sidebar links (which are also stored in the admin sidebar state
manager) are translated with I18n, which was discussed
in https://meta.discourse.org/t/introducing-experimental-admin-sidebar-navigation/289281/58?u=martin

This also changes the admin sidebar state manager keywords to
not be a TrackedObject -- this is not necessary as keywords are
only set once, and it was causing rendering issues because
the keywords were being set at the same time they were read.

Finally this adds a "theme" keyword to the "Components" link
because we often refer to components as Theme Components

Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2024-04-18 16:14:11 +10:00
Kelv
edbd44e737
DEV: replace transformed-post POJO with topic model in topic-map components (#26629)
* DEV: replace postAttrs dependencies in topic-map component by passing in topicDetails and postStream to topic-map to ensure state changes are passed properly down to child components
2024-04-18 10:04:38 +08:00
Krzysztof Kotlarek
98fc614162
FEATURE: mandatory fields for group site setting (#26612)
Automatically add `moderators` and `admins` auto groups to specific site settings.

In the new group-based permissions systems, we just want to check the user’s groups since it more accurately reflects reality

Affected settings:
- tag_topic_allowed_groups
- create_tag_allowed_groups
- send_email_messages_allowed_groups
- personal_message_enabled_groups
- here_mention_allowed_groups
- approve_unless_allowed_groups
- approve_new_topics_unless_allowed_groups
- skip_review_media_groups
- email_in_allowed_groups
- create_topic_allowed_groups
- edit_wiki_post_allowed_groups
- edit_post_allowed_groups
- self_wiki_allowed_groups
- flag_post_allowed_groups
- post_links_allowed_groups
- embedded_media_post_allowed_groups
- profile_background_allowed_groups
- user_card_background_allowed_groups
- invite_allowed_groups
- ignore_allowed_groups
- user_api_key_allowed_groups
2024-04-18 08:53:52 +10:00
Kris
1dbceb1a70
UX: when reopening collapsed composer, reset height (#26661) 2024-04-17 17:28:18 -04:00
Jarek Radosz
84efa66cc1
DEV: Apply flex-direction: column on .d-header (#26658)
This doesn't change anything in 99.9% of cases - by default d-header has only one child element `.wrap`.

There are only two themes that I'm aware of that add another child:
1. discourse-categories-navbar - which I'm currently updating to use the new header APIs, and where the column layout makes more sense
2. a private theme, which was recently updated to use those APIs and that works around the current layout by applying `flex-wrap: wrap` to d-header (I'll remove that override as it conflicts with this change)
2024-04-17 23:00:55 +02:00
Daniel Waterworth
7ce5eac235
FIX: Don't put non-category in Site.categories (#26664) 2024-04-17 15:54:34 -05:00
Bianca Nenciu
9638ce17fa
FIX: Serialize categories for bookmarks (#26606)
This is necessary when "lazy load categories" feature is enabled to make
sure the categories are rendered for topics and posts.
2024-04-17 17:23:47 +03:00
David Taylor
840ac6bd0a
DEV: Avoid using @tracked as a decorator in RenderGlimmer object literal
Decorators in object literals are non-standard, and we're working to remove them.
2024-04-17 15:19:23 +01:00
Joffrey JAFFEUX
552859b0ff
DEV: converts discard-draft modal to gjs (#26637) 2024-04-17 13:11:50 +02:00
Krzysztof Kotlarek
df373d90fe
FEATURE: direct link to components for admin sidebar (#26644)
To add a components link to the sidebar refactoring was required to create unique URLs for themes and components. Before the query param was used. After changes, we have two URLs `/admin/customize/themes` and `/admin/customize/components`.
2024-04-17 11:45:59 +10:00
Daniel Waterworth
56c4804440
DEV: Always pass ancestors to category-link (#26638)
We want to remove uses of Category.findById. This change pushes the fetching up the chain of responsibility.
2024-04-16 15:28:36 -05:00
dependabot[bot]
57d29b6f3b
Build(deps-dev): Bump ember-cli from 5.7.0 to 5.8.0 (#26641)
Bumps [ember-cli](https://github.com/ember-cli/ember-cli) from 5.7.0 to 5.8.0.
- [Release notes](https://github.com/ember-cli/ember-cli/releases)
- [Changelog](https://github.com/ember-cli/ember-cli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ember-cli/ember-cli/compare/v5.7.0...v5.8.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-16 17:42:33 +01:00
Joffrey JAFFEUX
4f7cd7b78e
FIX: correctly unshrink composer when re-editing post (#26650)
Prior to this fix we were manually expanding the composer but not setting the correct height. This commit adds a new `unshrink` function on the composer service to correctly set the state and the height on the composer model.
2024-04-16 14:49:51 +02:00
Joffrey JAFFEUX
8fbdce36a4
FIX: prevents open to happen too early (#26649)
In discourse-assign the assign menu in the modal is using this `expandedOnInsert` option and  was sometimes not opening correctly resulting in a broken state until you click two times on it. This should prevent this issue.
2024-04-16 13:58:06 +02:00
Jarek Radosz
99391277d4
DEV: Remove an unused hbr template (#26620) 2024-04-16 12:58:18 +02:00