Commit Graph
11 Commits
Author SHA1 Message Date
Jarek RadoszandGitHub 0ad2b2c003 DEV: Make the logIn helper replace current-user service (#30010) 2024-11-30 17:23:51 +01:00
Jarek RadoszandGitHub 9d517c8118 DEV: Fix no-loose-assertions lint (#29965)
and enable some of qunit lints
2024-11-28 11:22:27 +01:00
Jarek RadoszandGitHub 9e79c0f87e DEV: Convert more notOk assertions (#29556)
…to either qunit-dom or `strictEqual`
2024-11-04 10:27:30 +01:00
Jarek RadoszandGitHub 2cd35dcdc8 DEV: Convert more equal assertions (#29554)
…to either qunit-dom or `strictEqual`
2024-11-03 21:04:38 +01:00
Jarek RadoszandGitHub 5d8ddf8f4b DEV: Clean up imports (#28060)
* `@ember/owner` instead of `@ember/application`
* `discourse-i18n` instead of `I18n`
* `{ service } from "@ember/service"` instead of `inject as service`
2024-07-25 15:09:06 +02:00
58d3b5fb9f 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 <[email protected]>
2024-04-08 21:00:09 +02:00
David Taylor b3015f51ca DEV: Sort imports
Automatically generated by `eslint --fix` to satisfy the updated configuration
2023-10-10 21:46:54 +01:00
David TaylorandGitHub db6dcad564 DEV: Modernize chat getOwner usage (#23671)
See 6949d166e4 for motivation
2023-09-26 18:05:34 +01:00
Joffrey JAFFEUXandGitHub 92a35259d3 FEATURE: thread pagination (#22624)
Prior to this commit we were loading a large number of thread messages without any pagination. This commit attempts to fix this and also improves the following points:

- code sharing between channels and threads:
Attempts to reuse/share the code use in channels for threads. To make it possible part of this code has been extracted in dedicated helpers or has been improved to reduce the duplication needed.

Examples of extracted helpers:
- `stackingContextFix`: the ios hack for rendering bug when momentum scrolling is interrupted
- `scrollListToMessage`, `scrollListToTop`, `scrollListToBottom`:  a series of helper to correctly scroll to a specific position in the list of messages

- better general performance of listing messages:
One of the main changes which has been made is to remove the computation of visible message during scroll, it will only happen when needed (update last read for example). This constant recomputation of `message.visible` on intersection observer event while scrolling was consuming a lot of CPU time.
2023-07-27 09:57:03 +02:00
a151dccdd4 DEV: Added chat api to remove secondary actions (#21982)
In some cases, plugins may want to hide some of these actions
at all times, overriding the rules for canX with hiding these
buttons. To achieve this, a plugin can call the API
`removeChatComposerSecondaryButtons` and pass the list of button
IDs that should be removed as argument, like the example below:

```
withPluginApi("1.2.0", (api) => {
  api.removeChatComposerSecondaryActions("copyLink", "select");
});
```

---------

Co-authored-by: Martin Brennan <[email protected]>
2023-06-08 11:37:50 -03:00
Joffrey JAFFEUXandGitHub a59c495f6c DEV: adds sendChatMessage client API (#21783)
Usage:

```
api.sendChatMessage(channelId, message, { threadId: 6 });
```
2023-05-29 18:41:12 +02:00