Commit Graph

53847 Commits

Author SHA1 Message Date
David Taylor
3733db866c
DEV: Introduce default 'auto' mode for glimmer header (#26467)
This will automatically enable the glimmer header when all installed themes/plugins are ready. This replaces the old group-based site setting.

In 'auto' mode, we check for calls to deprecated APIs (e.g. decorateWidget) which affect the old header. If any are present, we stick to the old header implementation and print a message to the console alongside the normal deprecation messages.

To override this automatic behavior, a new `glimmer_header_mode` site setting can be set to 'disabled' or 'enabled'.

This change also means that our test suite is running with the glimmer header. This unveiled a couple of small issues (e.g. some incorrect `aria-*` and `alt` text) which are now fixed. A number of selectors had to be updated to ensure the tests were clicking the actual `<button>` elements rather than the surrounding `<li>` elements.
2024-04-10 14:35:54 +01:00
Arpit Jalan
5d0471ebe4
FEATURE: add new plugin outlet 'after-header' (#26587)
* FEATURE: add new plugin outlet 'after-header'

* Add to widget version

* fix linting

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-10 16:26:57 +05:30
Isaac Janzen
f8dd468caa
DEV: Update headerIcons API (#26090)
- Remove panelPortal usage, which allowed for content to be added as a dropdown
- Instead rely on float-kit's DMenu to render a dropdown
2024-04-10 11:37:37 +01:00
Régis Hanol
8509fc2ebc DEV: refactor (composer|d)-editor.js
This started as a way to prevent "previewUpdated" from doing the same work twice when morphing.

Ended up refactoring "previewUpdated" and extracted into 5 distinct methods for clearer understanding and more consistent debouncing (using the "@debounce" decorator instead of the "discourseDebounce" method).

No "feature" was changed, other than not doing the "decorateCookedElement" when morphing is enabled, since we already did it _before_ morphing.
2024-04-10 10:36:20 +02:00
Régis Hanol
4b043a2a82 DEV: refactor morphed preview specs 2024-04-10 10:36:20 +02:00
Régis Hanol
84d4dca4ab FIX: morph after all the "decorateCookedElement"
A lot of plugins are using "api.decorateCookedElement" to decorate the cooked preview.

Some of those plugins, like the "image-grid" ([grid]...[/grid]), changes the DOM. We have to call them _before_ morphing otherwise, there's no real point in morphing the preview.

The missing piece was triggering the "decorate-non-stream-cooked-element" application event.
2024-04-10 10:36:20 +02:00
Régis Hanol
db77803ca3 DEV: refactor column.js 2024-04-10 10:36:20 +02:00
Martin Brennan
b7a2d29b7b
DEV: Introduce post_should_secure_uploads? plugin modifier (#26508)
This modifier allows plugins to alter the outcome of
`should_secure_uploads?` on a Post record, for cases when
plugins need post-attached uploads to always be secure (or
not secure) in specific scenarios.
2024-04-10 12:02:44 +10:00
Jarek Radosz
98ec4af327
FIX: Add the ident to fix user status styling in posts (#26585) 2024-04-10 01:44:37 +02:00
dependabot[bot]
cac21677ee
Build(deps-dev): Bump lefthook from 1.6.8 to 1.6.9 (#26584)
Bumps [lefthook](https://github.com/evilmartians/lefthook) from 1.6.8 to 1.6.9.
- [Release notes](https://github.com/evilmartians/lefthook/releases)
- [Changelog](https://github.com/evilmartians/lefthook/blob/master/CHANGELOG.md)
- [Commits](https://github.com/evilmartians/lefthook/compare/v1.6.8...v1.6.9)

---
updated-dependencies:
- dependency-name: lefthook
  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-10 01:35:23 +02:00
dependabot[bot]
f687d91b99
Build(deps-dev): Bump qunit-dom from 3.1.0 to 3.1.1 (#26583)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.1.0 to 3.1.1.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.1.0...v3.1.1)

---
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-10 01:34:49 +02:00
dependabot[bot]
3b85ae89c6
Build(deps-dev): Bump babel-import-util from 2.0.1 to 2.0.2 (#26582)
Bumps [babel-import-util](https://github.com/ef4/babel-import-util) from 2.0.1 to 2.0.2.
- [Commits](https://github.com/ef4/babel-import-util/compare/v2.0.1...v2.0.2)

---
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-10 01:34:35 +02:00
Jarek Radosz
54cc0a0304
FIX: Nested list checkboxes css (#26581)
regressed in 6cf7447cb9
2024-04-10 00:28:23 +02:00
Penar Musaraj
a52b1d6b4a
FIX: Let users reset their homepage choice if custom homepage is from… (#26536)
Co-authored-by: Régis Hanol <regis@hanol.fr>
2024-04-09 15:54:44 -04:00
Ella E
002ff94ded
UX: Display JIT when user list is empty (#26579)
* UX: Display JIT when user list is empty

* UX: Remove empty state heading

* DEV: add spacing by enclosing empty state body in <p> tag
2024-04-09 13:52:21 -06:00
Blake Erickson
72ac675e4e
FEATURE: Consolidate link notifications (#26567)
Just like we have for consolidating likes this adds similar
functionality for consolidating links.
2024-04-09 11:53:37 -06:00
Discourse Translator Bot
7f802e9c42
Update translations (#26575) 2024-04-09 18:48:44 +02:00
Jarek Radosz
d16bc06b66
UX: Fix user menu ellipsis color (#26578) 2024-04-09 17:20:26 +02:00
Jarek Radosz
6cf7447cb9
UX: Tweak the checklist plugin css (#26577)
Fixes alignment of checboxes in posts. Removes unused styles.
2024-04-09 16:00:26 +02:00
Jarek Radosz
f5c9e75438
UX: Fix alignment issues around user status (#26491)
Minor changes but they 1. correct the html structure (no divs in spans) 2. unify the margins
2024-04-09 11:10:12 +02:00
David Taylor
a601813a6c
DEV: Drop unused shims for Ember 3 deprecations (#26563)
These deprecation shims are no-ops under Ember 5.
2024-04-09 09:22:37 +01:00
David Taylor
2a5d4ede6d
DEV: Set samesite=lax on cookies set by client-side (#26559)
Chrome's default is already Lax, so this change is a no-op there.

Firefox will soon be follow them, and has started warning about cookies with no samesite attribute. That's the motivation for this commit.
2024-04-09 09:22:20 +01:00
Martin Brennan
d7f7915558
FIX: Bookmark clock icon not showing (#26572)
When choosing the "Custom..." option in the new bookmark
menu and then choosing a date + time in the modal for the
reminder, the bookmark icon on the post was not updating to
show the one with the clock to indicate the reminder.

This was just a data syncing issue between BookmarkFormData
and what the modal sets. Ideally all this would be refactored
because the data flow is messy...but hard to find time for
that right now.

Followup 67a8080e33
2024-04-09 16:14:59 +10:00
Alan Guo Xiang Tan
e2ced85757
DEV: Allow enum typed theme objects property to be optional (#26571)
This commit changes enum typed theme objects property to be optional.
Previously, an enum typed property is always required but we have found
that this might not be ideal so we want to change it.
2024-04-09 11:26:24 +08:00
Martin Brennan
0d0dbd391a
DEV: Rename with_secure_uploads? to should_secure_uploads? on Post (#26549)
This method name is a bit confusing; with_secure_uploads implies
it may return a block or something with the uploads of the post,
and has_secure_uploads implies that it's checking whether the post
is linked to any secure uploads.

should_secure_uploads? communicates the true intent of this method --
which is to say whether uploads attached to this post should be
secure or not.
2024-04-09 13:23:11 +10:00
Osama Sayegh
84b4e4bddf
FEATURE: Add 'Create topic' automation script (#26552)
This commit adds a new automation script for creating topics. It's very similar to the existing 'create a post' automation, except that it posts new topics in a specific category and with optional tags.

Internal topic: t/125829.
2024-04-09 04:21:31 +03:00
Krzysztof Kotlarek
0085365459
FEATURE: confirmation when a public section is updated (#26546)
Display additional confirmation when:
- The public section is going to be updated;
- The public section is going to be deleted;
- The public section is going to be marked as private.
2024-04-09 09:58:30 +10:00
dependabot[bot]
a68bea26ce
Build(deps): Bump @glimmer/syntax from 0.91.2 to 0.92.0 (#26570)
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.91.2 to 0.92.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.91.2...v0.92.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-09 01:15:12 +02:00
dependabot[bot]
80479fc23f
Build(deps-dev): Bump qunit-dom from 3.0.0 to 3.1.0 (#26569)
Bumps [qunit-dom](https://github.com/mainmatter/qunit-dom) from 3.0.0 to 3.1.0.
- [Release notes](https://github.com/mainmatter/qunit-dom/releases)
- [Commits](https://github.com/mainmatter/qunit-dom/compare/v3.0.0...v3.1.0)

---
updated-dependencies:
- dependency-name: qunit-dom
  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-09 01:15:03 +02:00
dependabot[bot]
52e564c5be
Build(deps-dev): Bump rubocop from 1.62.1 to 1.63.0 (#26568)
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.62.1 to 1.63.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.62.1...v1.63.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: indirect
  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-09 00:45:43 +02:00
chapoi
fb41fccb20
UX: new default border radius (#26560)
* UX: remove border radius from PMs

* UX: add default 2px border radius
2024-04-08 22:21:57 +02:00
Gerhard Schlager
815cfa1d47
DEV: Reduce the usage of "(s)" in strings (#26566)
It's mostly fine to use the plural form instead of writing something like "topic(s)" when one or more topics could be meant, but the actual count is not known.

This also removes some unused strings from the locale files.
2024-04-08 21:39:15 +02:00
Gerhard Schlager
74ac143c3c
DEV: Correctly pluralize strings (#26565) 2024-04-08 21:24:54 +02:00
David Taylor
4712e8b035
DEV: Convert discourse-hbr to a regular package (#26562)
No need for this to be an ember addon. All we do is import `discourse-hbr/raw-handlebars-compiler` in a node environment.
2024-04-08 20:00:34 +01:00
Joffrey JAFFEUX
1060e4573a
DEV: allows fabricators to use faker (#26555)
The complexity of the situation is that we don't want to load faker into production by default but fabricators and styleguide are available on production.

This is made possible through app/assets/javascripts/discourse/app/lib/load-faker.js which contains a function to ensure faker is loaded asynchronously (loadFaker) and another function to access the loaded faker (getLoadedFaker).

Note 1: this commit also refactors fabricators to have access to context and use faker where possible
Note 2: this commit moves automation to admin bundle

---------

Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-08 21:00:09 +02:00
David Taylor
1801e3d64c
DEV: Rename 'bootstrap-json' addon to 'custom-proxy' (#26561)
It was originally named bootstrap-json because it contacted a 'bootstrap' API in rails to generate the ember-cli html response. However, it has since been overhauled to remove that 'bootstrap' system. Now it is a much simpler proxy server which transforms the HTML sent by Rails.
2024-04-08 19:53:02 +01:00
Jarek Radosz
8080ced95b
DEV: Remove unused code (#26556)
Left over from e3cfb1967d
2024-04-08 16:10:42 +02:00
Jan Cernik
e34da15b55
FEATURE: Add thread support to the chat message mover (#26147)
When selecting messages to move to a new channel, if any of the selected messages is the original message of a thread, the entire thread, including all its replies, will be moved to the destination channel
2024-04-08 09:03:46 -03:00
Joffrey JAFFEUX
0bee802ccc
FIX: do not autofocus input on edit in mobile (#26554) 2024-04-08 14:02:36 +02:00
Jarek Radosz
32e0a0a0d3
DEV: De-jQ click-interceptor (#26515)
Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-08 13:38:46 +02:00
Bianca Nenciu
6c2c1a43ae
FIX: Load categories with post revisions (#26496)
When lazy load categories is enabled, categories should be loaded with
post revisions because the categories may not be preloaded on the client
side.
2024-04-08 11:33:33 +03:00
Joffrey JAFFEUX
bd7823cc70
FIX: prevents mobile DMenu modal to lock scroll (#26550)
The bug was due to the fact that the `<DModal />` is displayed inside a if block, when the condition was false to close the menu, the modal was just hidden without calling callbacks. The fix ensures we are correctly calling `modal.close()` before in this case.
2024-04-08 09:47:50 +02:00
Régis Hanol
62788c2af1 UX: no pointer cursor on "read-only" checklist 2024-04-08 08:22:21 +02:00
Régis Hanol
36659531f7 FIX: ensure [date-range don't clashes with checklist
Adding the "→" was not setting the proper token nesting hierarchy.
2024-04-08 08:22:21 +02:00
Régis Hanol
d3f7b3b5f9 FIX: checklist weren't working if there was an image URL
When clicking a "checklist", we're parsing the raw to change the state of the checklist that was clicked. If there was an image URL with an empty alternative text in the raw "![](https://example.com/image.jpg)" it would consider the "[]" as an empty checklist item.

Internal - t/124499
2024-04-08 08:22:21 +02:00
Joffrey JAFFEUX
17c92b4b2a
UX: shows the bookmark menu improvements
This commit adds a new option `@modalForMobile` for `<DMenu />` which allows to display a `<DModal />` when expanding a menu on mobile.

This commit also adds a `@views` options to toasts which is an array accepting `['mobile',  'desktop']` and will control if the toast is show on desktop and/or mobile.

Finally this commit allows to hide the progressBar even if the toast is set to `@autoClose=true`. This is controlled through the `@showProgressBar` option.
2024-04-08 08:18:50 +02:00
Martin Brennan
fb5ae16630
FIX: Do not show edit sections button on admin sidebar (#26547)
Sections cannot be created or edited or deleted in
the admin sidebar. Also move the footer component into
a gjs file.
2024-04-08 15:21:24 +10:00
Alan Guo Xiang Tan
fbfeb5d6d0
DEV: Remove unused /u/<:username>/preferences/categories route (#26548)
This commmit removes the unused `/u/:username/preferences/categories`
route which was merged into the `/u/:username/preferences/tracking`
route in 2fc2d7d828.
2024-04-08 12:59:48 +08:00
dependabot[bot]
c0befe65d3
Build(deps-dev): Bump rubocop-rspec from 2.28.0 to 2.29.1 (#26543)
Bumps [rubocop-rspec](https://github.com/rubocop/rubocop-rspec) from 2.28.0 to 2.29.1.
- [Release notes](https://github.com/rubocop/rubocop-rspec/releases)
- [Changelog](https://github.com/rubocop/rubocop-rspec/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop-rspec/compare/v2.28.0...v2.29.1)

---
updated-dependencies:
- dependency-name: rubocop-rspec
  dependency-type: indirect
  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-08 10:28:15 +08:00
dependabot[bot]
9d7000c12f
Build(deps): Bump css_parser from 1.16.0 to 1.17.1 (#26544)
Bumps [css_parser](https://github.com/premailer/css_parser) from 1.16.0 to 1.17.1.
- [Changelog](https://github.com/premailer/css_parser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/premailer/css_parser/compare/v1.16.0...v1.17.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-08 10:28:04 +08:00