Commit Graph

31987 Commits

Author SHA1 Message Date
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
Jarek Radosz
d16bc06b66
UX: Fix user menu ellipsis color (#26578) 2024-04-09 17:20: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
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
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
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
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
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]
b4942b77b3
Build(deps): Bump @glimmer/syntax from 0.91.1 to 0.91.2 (#26541)
Bumps [@glimmer/syntax](https://github.com/glimmerjs/glimmer-vm) from 0.91.1 to 0.91.2.
- [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.1...v0.91.2)

---
updated-dependencies:
- dependency-name: "@glimmer/syntax"
  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-08 07:02:51 +08:00
Blake Erickson
8da49b5664
FEATURE: Add message to bulk close topics (#26535)
This will allow you to type a single message when bulk closing topics
that will be applied to every topic, that way they all have the same
message.
2024-04-05 14:56:52 -06:00
Jarek Radosz
570e3f7a1a
UX: Tweak the mention padding (#26492)
…to prevent them from overlapping/touching when placed on consecutive lines of text
2024-04-05 22:23:37 +02:00
Daniel Waterworth
cafdc29806
DEV: Replace Category.findById with Category.asyncFindByIds in easy cases (#26270) 2024-04-05 11:59:10 -05:00
David Taylor
1df97e86c1
DEV: Introduce faker.js for use in tests & styleguide (#26533)
Available as a normal synchronous module in tests
Available as an async import in core, or via the `loadFaker` helper in themes/plugins (which cannot use async import directly)
2024-04-05 16:57:17 +01:00
Sérgio Saquetim
175d2451a9
DEV: Add topic_embed_import_create_args plugin modifier (#26527)
* DEV: Add `topic_embed_import_create_args` plugin modifier

This modifier allows a plugin to change the arguments used when creating
 a new topic for an imported article.

For example: let's say you want to prepend "Imported: " to the title of
every imported topic. You could use this modifier like so:

```ruby
# In your plugin's code
plugin.register_modifier(:topic_embed_import_create_args) do |args|
  args[:title] = "Imported: #{args[:title]}"
  args
end
```

In this example, the modifier is prepending "Imported: " to the `title` in the `create_args` hash. This modified title would then be used when the new topic is created.
2024-04-05 12:37:53 -03:00
Mark VanLandingham
552203aa1d
DEV: Add appEvents for composer / DEditor toolbar events (#26517) 2024-04-05 08:35:25 -05:00
David Battersby
f75d119cd3
FEATURE: add progress bar to toast notifications (#26483)
This change adds a progress bar to toast notifications when autoClose is enabled (true by default).

The progress bar allows users to visually see how long is left before the notification disappears.

When hovered on desktop, the progress and autoclose timer will be paused, it will resume again once the mouse is moved away from the toast notification.
2024-04-05 18:29:11 +08:00
Jean
38d39b6c34
FIX: update topic property access in raw topic-status view (#26528) 2024-04-05 03:07:22 -04:00
Bianca Nenciu
19eb0a7055
FIX: Load category info for about page (#26519) 2024-04-05 09:38:54 +03:00
Alan Guo Xiang Tan
de5ca63eb5
UX: Allow a default value to be specified for enum properties (#26529)
Why this change?

For a `typed: objects` theme setting with an enum property, we are
adding a `default` key for `type: enum` fields which will be used
as the default value on the client side.

```
some_objects_setting:
  type: objects
  schema:
    name: field
    properties:
      enum_field:
        type: enum
        default: awesome
        choices:
          - nice
          - cool
          - awesome
```
2024-04-05 11:44:39 +08:00
Martin Brennan
67a8080e33
FEATURE: Redesigned bookmark modal and menu (#23071)
Adds the new quick menu for bookmarking. When you bookmark
a post (chat message behaviour will come later) we show this new quick
menu and bookmark the item straight away.

You can then choose a reminder quick option, or choose Custom... to open
the old modal. If you click on an existing bookmark, we show the same quick menu
but with Edit and Delete options.

A later PR will introduce a new bookmark modal, but for now we
are using the old modal for Edit and Custom... options.
2024-04-05 09:25:30 +10:00
dependabot[bot]
918b4e711b
Build(deps-dev): Bump sass from 1.72.0 to 1.74.1 (#26526)
Bumps [sass](https://github.com/sass/dart-sass) from 1.72.0 to 1.74.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.72.0...1.74.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-05 00:19:08 +02:00
Penar Musaraj
e7c6100d9f
DEV: Fix issues with "admin guide" tip (#26520)
- Adjusts placement
- Closes the tip when the user clicks on a link in the tip description
2024-04-04 12:50:08 -04:00
Régis Hanol
377d2ca3ad
FIX: keep details open in preview (#26518)
when morphing is enabled, details elements in the preview will be kept open
2024-04-04 18:43:25 +02:00
Jan Cernik
cab178a405
DEV: Move chat service objects into core (#26506) 2024-04-04 10:57:41 -03:00
David Taylor
9af957014e
FIX: Log search result clicks in header search menu (#26500)
This logic wasn't fully ported to the new search menu implementation.
2024-04-04 14:52:32 +01:00
Jarek Radosz
c117f6de04
DEV: Redo DiscourseURL.isInternal() (#26504)
Simplify the implementation and make it return `true` for prefix-less relative urls, like `docs`
2024-04-04 15:39:51 +02:00
David Taylor
39ae85b0e7
DEV: early hints around_action -> after_action (#26423)
Using around_action means `add_early_hint_header` is in the stack for every request, and gets included in the backtrace of any errors.

We can manage with an after_action instead, which avoids adding to the stack depth (and avoids people blaming me for unrelated application errors 😉)
2024-04-04 14:37:44 +01:00
Régis Hanol
2995da2625
DEV: add "load-morphlex" wrapper... (#26514)
* DEV: add "load-morphlex" wrapper...

... so plugins can import and use morphlex.


Co-authored-by: David Taylor <david@taylorhq.com>
2024-04-04 15:30:56 +02:00
Gerhard Schlager
82c62fe44f
DEV: Correctly pluralize error messages (#26469) 2024-04-04 15:02:09 +02:00
David Taylor
37ae1708a5
UX: Stop avatar flicker when opening user menu on Safari (#26511)
When opening the user menu, we display old cached data, and then replace it with fresh data immediately afterwards. The vast majority of the time the data is unchanged, and so there is no visible change. When rendering HTML elements directly, Ember realizes that there is no change, and does not make any changes to the DOM. Great!

However, our `avatar` helper returns a blob of HTML. With raw HTML, Ember does not make any attempt to 'diff' the existing DOM. Instead, it replaces the old string with the new string. That can be a little wasteful, but normally it's not a big deal. But, when it comes to `<img lazy="lazy"`, re-rendering the `img` element causes a visible flicker in Safari.

To work around that, this commit replaces the `{{avatar}}` helper with an ember-rendered `<img` element. Now that Ember is responsible for rendering, it can detect there is no real change to the attributes and skip it, thereby avoiding the flicker.

If we find ourselves doing this more frequently, we may want to consider creating an `<Avatar` component. But for now, I think it's simple enough to justify building the `<img` manually in this case.
2024-04-04 11:46:38 +01:00
Selase Krakani
eda4b12260
DEV: Add form template support for composer's openNewTopic action (#26489)
* DEV: Spike form template support for composer's openNewTopic

* DEV: Add tests
2024-04-04 10:25:22 +00:00
Bianca Nenciu
52aefa720d
FIX: Load category before opening composer (#26493)
The "new topic" route can open the composer with a category preselected.
This commit ensures that the category is loaded before the composer is
opened.
2024-04-04 10:28:48 +03:00
Alan Guo Xiang Tan
339893812b
FIX: Input fields not displaying when adding a object to empty setting (#26509)
Why this change?

Prior to this change, the input fields were not displaying when adding
an object to a objects typed theme setting which has a default value of
`[]`. This is because the `fields` getter was not being recomputed.
2024-04-04 15:27:48 +08:00
Alan Guo Xiang Tan
a440e15291
DEV: Remove experimental_objects_type_for_theme_settings site setting (#26507)
Why this change?

Objects type for theme settings is no longer considered experimental so
we are dropping the site setting.
2024-04-04 12:01:31 +08:00
dependabot[bot]
de76214f71
Build(deps): Bump the babel group with 2 updates (#26502)
Bumps the babel group 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.24.3 to 7.24.4
- [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.24.4/packages/babel-core)

Updates `@babel/standalone` from 7.24.3 to 7.24.4
- [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.24.4/packages/babel-standalone)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:production
  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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-03 23:47:13 +02:00
dependabot[bot]
7dd2480a6b
Build(deps): Bump terser from 5.30.2 to 5.30.3 (#26503)
Bumps [terser](https://github.com/terser/terser) from 5.30.2 to 5.30.3.
- [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md)
- [Commits](https://github.com/terser/terser/compare/v5.30.2...v5.30.3)

---
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-03 23:47:05 +02:00