Commit Graph

22567 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
Arpit Jalan
1785eb8f88
FIX: add home-logo outlet args to non glimmer version (#26495)
* FIX: add home-logo outlet args to non glimmer version

* fix linting
2024-04-03 21:44:32 +05:30
Penar Musaraj
c4e8221d7e
UX: Improvements to user tips (#26480)
- Add a "Skip tips" button to first notification tip
- Add a "Skip tips" button to the admin guide tip
- Fixes the timeline tip showing when no timeline was present
- Fixes post menu tip showing when no "..." button is present
- Adds system tests
- Marks each tip as seen as soon as it is displayed so that refreshing,
clicking outside, etc. won't show it again
- Change just above means we no longer need a MessageBus track

Co-authored-by: Bianca Nenciu <nbianca@users.noreply.github.com>
2024-04-03 11:43:56 -04:00
Bianca Nenciu
2190c9b957
DEV: Make category object more Ember friendly (#26342)
Some of the properties, like 'categoriesById', 'parentCategory' and
'subcategories', were updated manually when categories were loaded.
This was not ideal because it required a lot of code to keep the
objects in sync and some of the properties were not updated correctly.
2024-04-03 17:34:28 +03:00
Bianca Nenciu
b09558ae2d
DEV: Use Category.findById instead of Array.find (#26445)
Category.findById uses a Map to look up categories by ID which makes it
faster and preferable over Site.categories.find.
2024-04-03 15:51:05 +03:00
Régis Hanol
c5f1fc3a08
DEV: replace diffhtml with morphlex (#26138)
morphlex is ~20% the size of diffhtml and provides a 2-6x speedup depending on diff size.

See t/113634/13 for benchmarks.
2024-04-03 11:27:45 +02:00