Commit Graph

22005 Commits

Author SHA1 Message Date
Blake Erickson
7a7c53894d
FIX: Excessive video data downloading from service worker (#24924)
This bug appears to only be on Chrome due to the service worker fetching
the video content on page load instead of on play. For some reason
though the service worker would fetch around 4x more than the size of
the video resulting in excessive data being downloaded especially for
larger videos.

meta https://meta.discourse.org/t/287817
internal /t/111387/52
2023-12-15 13:29:50 -07:00
Ty Correll
368f4ef24d
UX: fix overlap obstructed anon topic reply (#24921)
This commit addresses the overlap between the anonymous reply button in a topic and the related or new and unread topics component.
2023-12-15 13:24:33 -06:00
Keegan George
388a2c5274
DEV: Add outlets and actions to move topic modal (#24913) 2023-12-15 08:50:29 -08:00
Penar Musaraj
8a4ab79be2
DEV: Improve header offset calculation (#24910) 2023-12-15 15:29:17 +01:00
chapoi
ed4840200b
UX: revert icon colour change in alerts (#24916) 2023-12-15 13:32:35 +01:00
Osama Sayegh
eff6e4b405
FIX: Position Float Kit elements correctly in RTL mode (#24908)
Float-kit elements (menus/tooltips) are positioned where they should be by setting an inline `left` property in JavaScript when they're rendered. For some reasons, we also set `left: 0` on float-kit elements here:

25d9927785/app/assets/stylesheets/common/float-kit/d-menu.scss (L11-L15)

This property is overridden by the inline property that the library sets in JavaScript. However, in RTL mode, all of our scss files are flipped where everything left becomes right and vice versa. In this case, the `left: 0` property in the scss file above becomes `right: 0`.

This results in a conflict specific to RTL mode where both the `left` and `right` properties are defined on the same absolute-positioned element; the `right` property will always be set to 0 because it comes from the (flipped) scss file above, and the inline `left` property will be set to some px amount determined in JavaScript.

The `right` property will take precedence over the inline `left` property due to the page being right-to-left (source: https://developer.mozilla.org/en-US/docs/Web/CSS/right#description) and this causes float-kit elements to incorrectly always stick to the right.

This commit removes the `left: 0` property altogether for float-kit elements from our scss files. It's not clear from git history why the property was added, and removing it doesn't seem to cause any issues.

Meta topic: https://meta.discourse.org/t/positioning-issues-with-rtl-locales-after-recent-updates/280220?u=osama
2023-12-15 13:16:31 +03:00
Keegan George
46eec95719
DEV: Add outlet and changes to support AI proofread (#24909) 2023-12-14 19:30:30 -08:00
Jarek Radosz
9f00c16a7a
DEV: Make DatePicker placeholder customizable (#24911) 2023-12-15 03:28:57 +01:00
Mark VanLandingham
25d9927785
DEV: Remove DefaultNotificationItem widget (#24906)
These are no longer used anymore because we use glimmer notification items everywhere 🎉
2023-12-14 13:45:59 -06:00
Mark VanLandingham
74f964f2b4
DEV: Add current menu-panel tab ID as data attribute to panel (#24901) 2023-12-14 10:36:51 -06:00
David Taylor
f51f467030
DEV: Throw error if renderInOutlet component has no template (#24900) 2023-12-14 15:51:47 +00:00
Jarek Radosz
057778b710
DEV: Update content-tag to 1.2.1 (#24888) 2023-12-14 12:00:36 +01:00
Ted Johansson
48116186af
DEV: Convert tl4_delete_posts_and_topics to groups (#24866)
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 tl4_delete_posts_and_topics  site setting to delete_all_posts_and_topics_allowed_groups.

This one is a bit different from previous ones, as it's a boolean flag, and the default should be no group. Pay special attention to the migration during review.
2023-12-14 09:56:42 +08:00
Blake Erickson
00209f03e6
DEV: Add file_size_restriction site setting type (#24704)
This change will allow admins to configure file sizes in mb instead of
having to convert to kb.

Co-authored-by: Ella <ella.estigoy@gmail.com>
2023-12-13 16:22:48 -07:00
dependabot[bot]
d993c38f3c
Build(deps-dev): Bump the embroider group in /app/assets/javascripts with 2 updates (#24877)
* Build(deps-dev): Bump the embroider group

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


Updates `@embroider/compat` from 3.4.0 to 3.4.2
- [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.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/core)

---
updated-dependencies:
- 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
...

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-13 22:32:35 +01:00
dependabot[bot]
bb2d3ab300
Build(deps): Bump ember-auto-import from 2.7.0 to 2.7.1 in /app/assets/javascripts (#24878)
* 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.0 to 2.7.1.
- [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-13 22:30:51 +01:00
Mark VanLandingham
c051bfc2fc
DEV: Plugin-api methods for user-notifications route customizations (#24873) 2023-12-13 15:15:42 -06:00
chapoi
7392e0e8a2
UX: have svg icons inherit colour (#24871) 2023-12-13 15:34:29 +01:00
David Taylor
fadcfd1451
DEV: Add safe_mode=deprecation_errors mode (#24870)
This commit adds an additional toggle to our safe-mode system. When enabled, it will cause all deprecation messages to become exceptions. This gives admins a way to test their themes/plugins against upcoming Discourse changes without needing to use the browser developer tools.
2023-12-13 14:06:59 +00:00
David Taylor
5e4a730366
DEV: Remove development-only DiscourseURL global (#24869)
I don't think anyone is actually using this, and the change won't affect production because it was only happening in development/test.
2023-12-13 12:41:36 +00:00
David Taylor
e5824c5d88
DEV: Tweaks for safe mode (#24868)
- Preserve query param in URL when navigating around
- Replace inline warning svg with emoji, which works better across different color schemes
2023-12-13 12:24:35 +00:00
Krzysztof Kotlarek
1017820012
DEV: Convert allow_uploaded_avatars to groups (#24810)
This change converts the allow_uploaded_avatars site setting to uploaded_avatars_allowed_groups.

See: https://meta.discourse.org/t/283408

Hides the old setting
Adds the new site setting
Adds a deprecation warning
Updates to use the new setting
Adds a migration to fill in the new setting if the old setting was changed
Adds an entry to the site_setting.keywords section
Updates tests to account for the new change
After a couple of months, we will remove the allow_uploaded_avatars setting entirely.

Internal ref: /t/117248
2023-12-13 10:53:19 +11:00
Jordan Vidrine
67594353ae
UX: Align icon with username in menu panel (#24854) 2023-12-12 15:32:16 -06:00
David Taylor
0f3a6cf042
DEV: Improve browser-update compatibility (#24852)
Now that we're using native `import()`, our main JS bundles might not even be parse-able by older browsers. In that case, `I18n` will never be defined, and so we need to account for that situation in the browser-update code.
2023-12-12 21:09:14 +00:00
Mark VanLandingham
097cef7d21
UX: Improve layout of avatar+icon notifications (#24851) 2023-12-12 14:28:29 -06:00
chapoi
f6644a69c3
UX: prevent header buttons from wrapping text (#24845) 2023-12-12 13:31:49 +01:00
Jarek Radosz
41942357ed
DEV: Use class attribute instead of @class arg (#24804) 2023-12-12 13:09:05 +01:00
dependabot[bot]
f1969c24c6
Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#24833)
* 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.5 to 7.23.6
- [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.6/packages/babel-core)

Updates `@babel/standalone` from 7.23.5 to 7.23.6
- [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.6/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>
2023-12-11 22:50:33 +01:00
Jarek Radosz
3999f3e826
DEV: Convert PreferenceCheckbox to gjs (#24817) 2023-12-11 22:03:03 +01:00
Mark VanLandingham
c6a2c80441
UX: Adjust notification items when avatar is shown (#24832) 2023-12-11 14:44:14 -06:00
Jeff Wong
4e8f9e8fd2
DEV: remove animating class (#24830)
class is no longer needed to detect animations since the change in:

c2295b9d5d
2023-12-11 11:55:14 -08:00
David Taylor
683c038ec0 UX: Add some missing hljs classes 2023-12-11 18:11:27 +00:00
David Taylor
a48595ae7a DEV: Remove unused hljs css selectors
In modern hljs, languages should be targetted with `lang-` prefixes. These selectors haven't worked in Discourse for a long time, so let's drop them to reduce confusion
2023-12-11 18:11:27 +00:00
Mark VanLandingham
6fc992f66a
FIX: Color of notification icons in user-notifications index (#24826) 2023-12-11 11:35:02 -06:00
Osama Sayegh
102e1b4faf
DEV: Remove legacy hamburger menu code (#24788)
We no longer offer the option to use the legacy hamburger menu since October 9th 2023, see 832b3b9e60. However, the code for the legacy hamburger menu is still around and needs to be removed. All plugins and themes that we know of that customize the legacy hamburger menu have been updated to either remove the customizations or migrate the customizations to the new sidebar, so now we can safely remove the legacy hamburger menu code from core.

Internal topic: t/113137.
2023-12-11 20:17:00 +03:00
Mark VanLandingham
223e413a6c
DEV: Render glimmer notification items for user notification list (#24802)
This removes the widget notifications list and renders the glimmer user menu notification items instead.
2023-12-11 11:04:43 -06:00
Penar Musaraj
695ec99cea
UX: Fix highlighting regressions (#24825)
Two regressions fixed here, one introduced in 6dc5fe0c83
and the other introduced a few months ago.
2023-12-11 11:02:48 -05:00
Bianca Nenciu
81b0420614
FEATURE: Add pagination to categories page (#23976)
When `lazy_load_categories` is enabled, the categories are no longer
preloaded in the `Site` object, but instead they are being requested
on a need basis.

The categories page still loaded all categories at once, which was not
ideal for sites with many categories because ti would take a lot of
time to build and parse the response.

This commit adds pagination to the categories page using the LoadMore
helper. As the user scrolls through the categories page, more categories
are requested from the server and appended to the page.

<!-- NOTE: All pull requests should have tests (rspec in Ruby, qunit in JavaScript). If your code does not include test coverage, please include an explanation of why it was omitted. -->
2023-12-11 17:58:45 +02:00
Penar Musaraj
af23fec835
FIX: Reload page after adding 2FA when it is enforced (#24803)
When 2FA is enforced and the user has no key or TOTP on their account, we
block navigating away from the page until they have added one. However,
we don't reload the page after they have added one, so the user is left
with a page that still says they need to add 2FA.
2023-12-11 10:56:30 -05:00
David Taylor
b5fb8e89eb
FIX: Resolve computed property override when inviting to PM (#24823)
This was raising a deprecation under Ember 3, and an error under Ember 4+
2023-12-11 15:39:50 +00:00
Jarek Radosz
81de91751e
DEV: Remove incorrect "for" attributes (#24805)
(and correct some html whitespace)
2023-12-11 15:44:38 +01:00
Jarek Radosz
cc74bcdc85
DEV: Correct i18n helper invocation case (#24806) 2023-12-11 15:44:28 +01:00
David Taylor
4a62676512
DEV: Identify errors/deprecations triggered by browser extensions (#24820)
It's possible for browser extensions to trigger JS errors and deprecation warnings. That can lead to significant confusion and noise in our logs/metrics. One recent example we've identified is the 'Wappalyzer' extension triggering the `ember-global` deprecation.

This commit will clearly identify these errors/deprecations with a `[BROWSER EXTENSION]` prefix in the console.
2023-12-11 14:22:44 +00:00
chapoi
2eed8753fb
UX: fix icon colour on signup CTA (#24818) 2023-12-11 12:26:00 +01:00
dependabot[bot]
4949d85c15
Build(deps): Bump markdown-it from 13.0.2 to 14.0.0 in /app/assets/javascripts (#24809)
* Build(deps): Bump markdown-it in /app/assets/javascripts

Bumps [markdown-it](https://github.com/markdown-it/markdown-it) from 13.0.2 to 14.0.0.
- [Changelog](https://github.com/markdown-it/markdown-it/blob/master/CHANGELOG.md)
- [Commits](https://github.com/markdown-it/markdown-it/compare/13.0.2...14.0.0)

---
updated-dependencies:
- dependency-name: markdown-it
  dependency-type: direct:production
  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>
2023-12-10 22:38:03 +01:00
David Taylor
6388d929d6
UX: Ensure wizard previews display at correct width (#24801) 2023-12-08 20:45:54 +00:00
David Taylor
4adbcf3f2a
DEV: Update before-header-panel outlet arguments (#24796)
Passing through `attrs` is problematic for a few reasons:

1. Connectors could mutate it and cause issues in the parent widget

2. It doesn't provide a clean API boundary. The connector can access all attrs of the widget. As we move towards refactoring the header away from widgets, this may change. Better to explicitly call out the things we expect plugins/themes to access

3. `attrs` is a reserved property for classic components. Passing an argument called `attrs` into a classic component raises a 'computed property override' deprecation error under Ember 3.28, and causes an error in Ember 4+.

Unfortunately this will be a breaking change to the outlet. Fortunately, it was introduced fairly recently and does not have too many users. We will make immediate updates to themes/plugins we are aware of.

Followup to 9cc2b5cc20
2023-12-08 17:02:25 +00:00
chapoi
e227008c65
UX: login modal sizing fixes (#24794) 2023-12-08 17:21:37 +01:00
Bianca Nenciu
b4cf175daf
DEV: Use category objects as values for category select kits (#24793)
Commit dcd81d56c0 changed this, but that
implementation is not ideal because the initialization of the select kit
can result in requests to the server.

This implementation has the advantage that it also fixes the user and
group properties that return categories.
2023-12-08 18:09:48 +02:00
Penar Musaraj
80d5acc0ce
FIX: Navigate search results using J/K keys (#24787) 2023-12-08 11:06:59 -05:00
Penar Musaraj
6dc5fe0c83
A11Y: improve setting focus to a post (#24786)
See https://github.com/discourse/discourse/pull/23367 for implementation details.
2023-12-08 11:06:21 -05:00
Neil Lalonde
27144f188c
UX: if no login options are configured, show a message (#24777)
Admins will be instructed to login via /u/admin-login to change their
site settings.
2023-12-08 10:49:54 -05:00
David Taylor
efbe5b7dda
DEV: Catch errors in theme/plugin onPageChange handlers (#24784)
This makes the errors easier for admins to identify/resolve, and also prevents failures from affecting core functionality.
2023-12-08 10:01:37 +00:00
Bianca Nenciu
dcd81d56c0
FIX: category selectors for lazy loaded categories (#24533)
A lot of work has been put in the select kits used for selecting
categories: CategorySelector, CategoryChooser, CategoryDrop, however
they still do not work as expected when these selectors already have
values set, because the category were still looked up in the list of
categories stored on the client-side Categrories.list().

This PR fixes that by looking up the categories when the selector is
initialized. This required altering the /categories/find.json endpoint
to accept a list of IDs that need to be looked up. The API is called
using Category.asyncFindByIds on the client-side.

CategorySelector was also updated to receive a list of category IDs as
attribute, instead of the list of categories, because the list of
categories may have not been loaded.

During this development, I noticed that SiteCategorySerializer did not
serializer all fields (such as permission and notification_level)
which are not a property of category, but a property of the relationship
between users and categories. To make this more efficient, the
preload_user_fields! method was implemented that can be used to
preload these attributes for a user and a list of categories.
2023-12-08 12:01:08 +02:00
Martin Brennan
d5fe9b4f8c
FEATURE: Add copy link post menu button (#24709)
This commit ports the feature by @chapoi that was
previously a theme component in core.

A new post_menu button, copyLink, is added and used
as the default instead of share.

copyLink, on desktop, will copy the link of the post
to the user's clipboard and show a nice 'lil animation.
On mobile the native share menu will be shown.

If site owners want the old behaviour back, they just
need to change the post_menu site setting to use
the share button instead of copyLink.
2023-12-08 11:45:49 +10:00
dependabot[bot]
8eb40fa059
Build(deps): Bump terser from 5.25.0 to 5.26.0 in /app/assets/javascripts (#24780)
* Build(deps): Bump terser in /app/assets/javascripts

Bumps [terser](https://github.com/terser/terser) from 5.25.0 to 5.26.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.25.0...v5.26.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>
2023-12-07 23:16:14 +01:00
Penar Musaraj
61cf76bf70
Revert "A11Y: fix setting focus to a post (#23367)" (#24783)
This reverts commit 9dce1592dc.

The change is having some adverse effects.
2023-12-07 17:03:52 -05:00
Penar Musaraj
9dce1592dc
A11Y: fix setting focus to a post (#23367)
This is a second attempt to fix this issue. First fix at #23243, see PR for details.
2023-12-07 15:44:42 -05:00
Keegan George
290f6a70bd
FIX: Form template form error visiblity (#24779) 2023-12-07 12:26:56 -08:00
Isaac Janzen
bf48e14687
FIX: Move the search-menu-results-top plugin outlet (#24774)
The `search-menu-results-top` plugin outlet was not positioned at the top of `results` as expected. Additionally, the expected outlet arguments that existed in the "widget implementation" were not available on the glimmer search menu.
2023-12-07 12:36:39 -07:00
Mark VanLandingham
ddf3c571cf
FIX: Prevent error when poster isn't present in message notification item (#24776) 2023-12-07 13:21:45 -06:00
Mark VanLandingham
ee05f57e2d
FEATURE: Site setting to display user avatars in user menu (#24514) 2023-12-07 11:30:44 -06:00
David Taylor
e4c373194d
DEV: Refactor Wizard components (#24770)
This commit refactors the Wizard component code in preparation for moving it to the 'static' directory for Embroider route-splitting. It also includes a number of general improvements and simplifications.

Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-07 16:33:38 +00:00
Kris
0139481188
UX: move monospace font to variable (#24762) 2023-12-07 09:51:14 -05:00
chapoi
001d2176e5
UX: minor fixes in topic action modal (#24772) 2023-12-07 14:54:56 +01:00
Ella E
7d4fd19696
DEV: revert bg color from --tertiary-very-low to --tertiary-low (#24764) 2023-12-06 20:07:01 -07:00
Alan Guo Xiang Tan
7aab65887f
UX: Fix edit navigation tags modal height too long on desktop (#24765)
Why this change?

The tags modal loads more tags via infinite loading based on when the last tag in the
given page appears in the viewport for the user. When it comes in to
view, a request is then triggered to fetch additional tags. To ensure
that we are only loading a single page of tags each time the modal is
opened, we previously set a max height on the modal's body to ensure
that the last tag which appears in the modal will be outside of the view
port in the initial load. However, this has regressed recently due to
unknown reasons and resulted in multiple pages of tags being loaded
immediately from the server as the modal's height was not restricted.
This regression was caught by an existing test but was unfortunately
determined as flaky.

What does this change do?

This change restores the max height on the edit navigation menu tags
modal on dekstop.
2023-12-07 09:42:04 +08:00
David Taylor
a192ae4c15
FIX: Ensure bulk select toggle appears for non-admin on new/unread (#24763)
TopicList is a classic component, so we need to use `.get()` for the argument to be autotracked in a native getter 😢
2023-12-06 23:55:41 +00:00
Kris
c197f8c6ee
UX: make github onebox styles more responsive (#24761) 2023-12-06 17:45:56 -05:00
Kris
42a75e3df9
FIX: saving tag changes without description (#24753) 2023-12-06 14:17:56 -05:00
chapoi
42e5bbaf38
UX: fix double-scrollbar in keyboard-shortcuts-modal (#24751) 2023-12-06 17:12:14 +01:00
Mark VanLandingham
efcb5bb3df
DEV: Plugin outlet around user menu empty state (#24730) 2023-12-06 08:06:50 -06:00
David Taylor
1e471f7ec2
FIX: Handle 404 correctly when transition has no path (#24748) 2023-12-06 12:12:19 +00:00
David Taylor
b3d1707b65
DEV: Refactor Wizard routes, controllers and templates (#24725)
Extracted from https://github.com/discourse/discourse/pull/23678

Co-authored-by: Godfrey Chan <godfreykfc@gmail.com>
2023-12-06 12:07:07 +00:00
David Battersby
8b46dc8bb5
FEATURE: Add thumbnails for chat image uploads (#24328)
Introduces the concept of image thumbnails in chat, prior to this we uploaded and used full size chat images within channels and direct messages.

The following changes are covered:
- Post processing of image uploads to create the thumbnail within Chat::MessageProcessor
- Extract responsive image ratios into CookedProcessorMixin (used for creating upload variations)
- Add thumbnail to upload serializer from plugin.rb
- Convert chat upload template to glimmer component using .gjs format
- Use thumbnail image within chat upload component (stores full size img in orig-src data attribute)
- Old uploads which don't have thumbnails will fallback to full size images in channels/DMs
- Update Magnific lightbox to use full size image when clicked
- Update Glimmer lightbox to use full size image (enables zooming for chat images)
2023-12-06 14:59:18 +08:00
Martin Brennan
3141994e38
FIX: Add checkbox-label to notification bulk actions (#24734)
Followup to c80b5b718c
2023-12-06 11:22:48 +10:00
Ella E
47629db3db
UX: Add a link from admin reports page to meta a topic (#24707)
* UX: Add a link from admin reports page to meta a topic
* DEV: apply prettier
2023-12-05 16:37:44 -07:00
Kris
3a98474983
A11Y: allow tab titles to use default translation (#24727) 2023-12-05 17:16:56 -05:00
Kris
b65f281842
FIX: escape category description text (#24724) 2023-12-05 15:48:13 -05:00
Mark VanLandingham
d4c02d738b
DEV: Add topicNotificationLevel fn to post model (#24723) 2023-12-05 12:08:29 -06:00
David Taylor
a5fc8f3253
FIX: Account activation under ember-5 build (#24722)
We were previously relying on Ember's 'vendor' bundle to make the jquery global available on the activate_account route. That no longer happens under our Ember 5 build.

This commit updates our activate-account script to remove the need for jquery, so that it works under both Ember 3 and Ember 5 builds.
2023-12-05 17:49:40 +00:00
Isaac Janzen
6aeddad333
DEV: Add search-menu-before-advanced-search plugin outlet (#24720) 2023-12-05 10:08:27 -07:00
David Taylor
863c0cdecc
FIX: Ensure slugless topic URLs are correctly redirected (#24719)
Using `DiscourseURL.routeTo` with `replaceURL: true` wouldn't cause a true Ember redirect. That meant that the transition source would be be replaced in the browser's history stack, and the 'back' button wouldn't work as expected. Instead, we can use the router service to perform a proper redirect.
2023-12-05 15:37:01 +00:00
chapoi
ad77a6876c
UX: fix alignment (#24718) 2023-12-05 14:19:21 +01:00
dependabot[bot]
9a10f9d240
Build(deps): Bump terser from 5.24.0 to 5.25.0 in /app/assets/javascripts (#24703)
* Build(deps): Bump terser in /app/assets/javascripts

Bumps [terser](https://github.com/terser/terser) from 5.24.0 to 5.25.0.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.24.0...v5.25.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>
2023-12-05 11:50:29 +01:00
Isaac Janzen
b9110c5a71
FIX: Don't refresh on topic search result click (#24697)
Fixes an issue where when selecting a topic search result we were refreshing the page rather than letting `DiscourseURL` redirect us to the given topic. This was because we were leaning on a `a` tag and it's href to handle the redirect
    
3aeff56faf/app/assets/javascripts/discourse/app/components/search-menu/results/types.hbs (L15-L16)

rather than `preventDefault`'ing the redirect
2023-12-04 11:27:38 -07:00
David Taylor
87d850948f
PERF: Only apply terser to production assets (#24699)
We funnel vendored javascript through ember-cli, but that's only used for the testem environment. Therefore, there's no need to minify it in production builds. In my tests, this reduces peak RSS of a production build from 3.53GB to 3.15GB.
2023-12-04 18:05:55 +00:00
Kris
c4381e0265
FIX: don't apply extraClassName to all popup menus (#24695) 2023-12-04 11:40:57 -06:00
David Taylor
9479b30ada
FIX: Ensure 'untagged' document title is set correctly (#24689)
https://meta.discourse.org/t/286130/4
2023-12-04 13:43:02 +00:00
David Taylor
cdb904a1b0
DEV: Remove unused htmlbars-inline-precompile shim (#24687)
Since 4425e99bf9, we no longer ship the template compiler to the client under any circumstances, so this shim doesn't work. Plus, even if it did work, it would trigger the ember-global deprecation and fail under Ember 4+.
2023-12-04 12:34:45 +00:00
Jarek Radosz
e0c876696a
DEV: Fix some qunit linting issues (#24686)
`qunit/literal-compare-order`
`qunit/no-compare-relation-boolean`
`qunit/assert-args`
2023-12-04 13:32:16 +01:00
Jarek Radosz
2029777b86
DEV: Replace AdminWrapper with body-class/html-class (#24683)
AdminWrapper isn't used (directly) in all-the*

Co-authored-by: David Taylor <david@taylorhq.com>
2023-12-04 12:53:07 +01:00
chapoi
1df1a9490d
UX: fix sidebar modal (#24646)
* UX: fix modal width
2023-12-04 08:10:17 +01:00
Krzysztof Kotlarek
d9ac0c33ff
FIX: update tag description field placeholder (#24644)
Improvements after  https://github.com/discourse/discourse/pull/24561

1. Make placeholder more descriptive
2. Respect new line breaks in description
2023-12-04 09:38:20 +11:00
Kris
56795f5c07
UX: improve btn-transparent styling (#24666) 2023-12-02 14:21:22 +11:00
David Taylor
aba3acf4cc
DEV: Correct deprecation id for discovery-controller-shims (#24671) 2023-12-01 19:11:48 +00:00
Mark VanLandingham
fb06cd6712
DEV: Add JS API to adjust desktop topic timeline min/max height (#24669) 2023-12-01 10:29:12 -06:00
David Taylor
9f9c82ea97
DEV: Only add ember-global deprecation for Ember 3 (#24667)
(otherwise, we're accidentally extending support into Ember 5!)

Followup to 106c1c317f
2023-12-01 14:50:15 +00:00
chapoi
f8bf4bda00
UX: fix info text color on custom field for login (#24665) 2023-12-01 14:41:44 +01:00
David Taylor
106c1c317f
DEV: Restore ember-global deprecation in production (#24664)
Even with our patch to the deprecate() macro, this is optimized out of the production build because it's wrapped in an `if(DEBUG)` statement. (https://github.com/davidtaylorhq/ember.js/blob/14c02f53b8/packages/%40ember/-internals/bootstrap/index.ts#L19-L19)
2023-12-01 13:07:57 +00:00
David Taylor
b72a177fb3
DEV: Exclude deprecation-collector plugin from source identifier (#24662) 2023-12-01 12:21:19 +00:00
dependabot[bot]
4df672a541
Build(deps-dev): Bump jsdom from 23.0.0 to 23.0.1 in /app/assets/javascripts (#24657)
* Build(deps-dev): Bump jsdom in /app/assets/javascripts

Bumps [jsdom](https://github.com/jsdom/jsdom) from 23.0.0 to 23.0.1.
- [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.0...23.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  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>
2023-12-01 11:11:16 +01:00
Isaac Janzen
aadc104817
FIX: Flashing when loading glimer search results (#24658) 2023-11-30 20:54:32 -07:00
Isaac Janzen
7539b457b2
DEV: Add forceDropdownForMenuPanels to plugin api (#24655) 2023-11-30 15:26:13 -07:00
Keegan George
d2b53ccac2
DEV: Port discourse-table-builder theme component to core (#24441) 2023-11-30 10:54:29 -08:00
chapoi
9fb4175008
UX: make summary 100% height (#24649) 2023-11-30 12:29:26 +01:00
Meghna
91ab2766e9
UX: properly align close button icon on composer messages (#24632) 2023-11-30 13:21:50 +05:30
Krzysztof Kotlarek
7e013b2120
DEV: add recurrence rule parameter to downloadCalendar API (#24404)
Add option to create recurrent calendar events. Recurrence rule parameter follows rfc5545 specification: https://datatracker.ietf.org/doc/html/rfc5545#section-3.3.10
2023-11-30 13:56:22 +11:00
Martin Brennan
c58cd697d2
FIX: Further improvements for plugin list (#24622)
Followup e37fb3042d

* Automatically remove the prefix `Discourse ` from all the plugin titles to avoid repetition
* Remove the :discourse_dev: icon from the author. Consider a "By Discourse" with no labels as official
* We add a `label` metadata to plugin.rb
  * Only plugins made by us in `discourse` and `discourse-org` GitHub organizations will show these in the list
* Make the plugin author font size a little smaller
* Make the commit sha look like a link so it's more obvious it goes to the code

Also I added some validation and truncation for plugin metadata
parsing since currently you can put absolutely anything in there
and it will show on the plugin list.
2023-11-30 10:53:17 +10:00
dependabot[bot]
f90fab3628
Build(deps): Bump the babel group in /app/assets/javascripts with 2 updates (#24637)
* 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.3 to 7.23.5
- [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.5/packages/babel-core)

Updates `@babel/standalone` from 7.23.4 to 7.23.5
- [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.5/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>
2023-11-29 22:29:41 +01:00
Isaac Janzen
11636f8736
DEV: Add missing html-safe on search result blurb (#24633) 2023-11-29 09:05:10 -07:00
Mark VanLandingham
c4767158df
DEV: Move desktop notifications logic to service (#24466) 2023-11-29 08:20:48 -06:00
Jarek Radosz
8cf13977a1
DEV: Fix or disable various lint rules (#24630)
A grab bag of smaller issues (constructor-super, no-fallthrough, ember/no-private-routing-service, no-unreachable, no-async-promise-executor)
2023-11-29 15:14:53 +01:00
Jarek Radosz
7cac167928
DEV: Fix "ember/no-empty-glimmer-component-classes" lint (#24629) 2023-11-29 15:14:30 +01:00
Jarek Radosz
0f7e4d2eaa
DEV: Convert input-tip to gjs (#24624) 2023-11-29 13:00:36 +01:00
Bianca Nenciu
1881ae50be
FIX: category-selector for top level categories (#24627)
The filter for top-level categories by using parent_category_id = -1 is
only implemented by the new search API.

Follow up to commit dbb8b66a37.
2023-11-29 13:29:18 +02:00
Jarek Radosz
d38360b23f
DEV: Fix ember/no-private-routing-service (#24009) 2023-11-29 12:26:52 +01:00
Jarek Radosz
cbe772f6fa
DEV: Fix router linting errors (#24012)
`ember/no-unnecessary-route-path-option`
`ember/routes-segments-snake-case`
2023-11-29 12:26:31 +01:00
Osama Sayegh
6e4648a2c4
UX: Various improvements to JSON Schema editor (#24543)
This commit makes a few improvements to the JSON Schema editor when using dark mode for the UI and fixes a small alignment issue with checkboxes.
2023-11-29 13:39:49 +03:00
Bianca Nenciu
dbb8b66a37
FIX: Show only top categories in first category-drop (#24575) 2023-11-29 09:41:25 +02:00
Martin Brennan
d40c0b698c
FIX: Word wrap for quote buttons (#24620)
The button text was becoming multiline unnecessarily
2023-11-29 10:43:52 +10:00
Isaac Janzen
8f6e8344aa
DEV: Remove unused search plugin outlets (#24614) 2023-11-28 14:55:22 -07:00
Isaac Janzen
9a909758ac
FIX: Escape topic titles when use_pg_headlines_for_excerpt true (#24608) 2023-11-28 14:32:22 -07:00
Kris
9576f3ec97
UX: create category doesn't always need a dropdown (#24610) 2023-11-28 16:28:07 -05:00
dependabot[bot]
2d2fd15636
Build(deps-dev): Bump the embroider group in /app/assets/javascripts with 1 update (#24615)
* 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).

- [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-minor
  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>
2023-11-28 22:23:13 +01:00
Kris
18a0783643
FIX: use correct color for inputs (#24616) 2023-11-28 16:21:36 -05:00
Jordan Vidrine
178c1f74ae
UX: Place login button text in span tag (#24613) 2023-11-28 15:02:30 -06:00
Isaac Janzen
e4499d98e6
DEV: Update search-menu-before-term-input outlet args (#24573) 2023-11-28 13:47:23 -07:00
Bianca Nenciu
fae3b89818
FIX: Add setters for some group properties (#24572)
These properties are set on the "Manage > Categories" group page. It
used to work, but only because it overridden the properties and it did
not update the IDs too.
2023-11-28 21:38:49 +02:00
Kris
19378cc068
FIX: lint unlinted file (#24612) 2023-11-28 14:11:55 -05:00
Kris
6d624c6f1a
UX: fix disabled input styles (#24603) 2023-11-28 14:10:41 -05:00
Jordan Vidrine
35dde2da21
FIX: Add more specificity to outline (#24611) 2023-11-28 12:44:45 -06:00
Jordan Vidrine
12902c1fc1
FEATURE: Add search menu outlet (#24609) 2023-11-28 12:12:09 -06:00
Isaac Janzen
feb5eda0d1
DEV: Make theme-qunit discoverable from /tests (#24606)
https://github.com/discourse/discourse/assets/50783505/c6db8c35-1473-4ccd-aca2-bfb71af9e73e
2023-11-28 10:04:23 -07:00
Jordan Vidrine
8f901cdd38
UX: Change direction of focus outline (#24605) 2023-11-28 10:58:16 -06:00
Bianca Nenciu
e85a81f33c
FIX: Make category-drop work with lazy_load_categories (#24187)
The category drop was rerendered after every category async change
because it updated the categories list. This is not necessary and
categories can be referenced indirectly by ID instead.
2023-11-28 17:58:47 +02:00
Jarek Radosz
2a3418fe24
DEV: Don't use the deprecated createEvent() (#24601) 2023-11-28 15:05:51 +01:00
Jarek Radosz
9d44d833d5
DEV: Remove unnecessary getURL() calls (#24591)
`ajax()` already uses it
2023-11-28 14:32:15 +01:00
Jarek Radosz
0cad82ef55
DEV: Update click-track tests (#24597) 2023-11-28 13:54:30 +01:00
David Taylor
5783f231f8
DEV: Introduce DISCOURSE_ASSET_URL_SALT (#24596)
This value is included when generating static asset URLs. Updating the value will allow site operators to invalidate all asset urls to recover from configuration issues which may have been cached by CDNs/browsers.
2023-11-28 11:28:40 +00:00
Jarek Radosz
4953bced64
DEV: Remove unused searchTags param (#24590) 2023-11-28 10:56:36 +01:00
Jarek Radosz
4c7793940a
DEV: Fix "no-dupe-keys" lint (#24589) 2023-11-28 10:55:52 +01:00
Jarek Radosz
70dc6bcfd3
DEV: Fix "no-unsafe-finally" lint (#24587) 2023-11-28 10:54:13 +01:00
Jarek Radosz
916e1371b3
DEV: Fix "ember/no-global-jquery" lint (#24586) 2023-11-28 10:53:38 +01:00
Jarek Radosz
22210a9c15
DEV: Fix "no-setter-return" lint (#24585) 2023-11-28 10:49:49 +01:00
Jarek Radosz
a80e32fe75
DEV: Fix no-extra-boolean-cast lint (#24582) 2023-11-28 10:37:23 +01:00
Jarek Radosz
cd69891b14
DEV: Fix no-unnecessary-curly-parens lint rule (#24581) 2023-11-28 10:35:36 +01:00
Krzysztof Kotlarek
5551a71c55
FEATURE: increase tag description limit to 1000 (#24561)
Admin can add tag description up to 1000 characters.

Full description is displayed on tag page, however on topic list it is truncated to 80 characters.
2023-11-28 08:45:40 +11:00
Penar Musaraj
633deb5af8
UX: Submit security key edit form on Enter (#24532)
Co-authored-by: Jarek Radosz <jradosz@gmail.com>
2023-11-27 16:11:12 -05:00
David Taylor
6f3b087907 DEV: Generate Ember5 lockfile 2023-11-27 16:40:22 +00:00