discourse/plugins/chat/assets/javascripts/discourse
Joffrey JAFFEUX 55ef2d0698
FIX: auto fill was not happening on first load (#21809)
This commit attempts to fix the case where the messages loaded initially don't fill the screen. It would prevent user to scroll and as a result to load more.

There are multiple fixes in this commit:
- the main fix is removing this code which was preventing the actual fill:

```javascript
        // prevents an edge case where user clicks bottom arrow
        // just after scrolling to top
        if (loadingPast && this.#isAtBottom()) {
          return;
        }
```

- ensures we always give a page site to the `chatApi.channel(...)` call if we have one, in the current state when `fetchFromLastRead` was `true` we would not set `args.page_size`
- ensures the `query_paginated_messages` is having a valid page size, which is not nil and not > `MAX_PAGE_SIZE`
- write a spec for the autofill, it was a challenging spec to write but it should give us the confidence we need here
2023-05-29 17:34:44 +02:00
..
adapters FIX: better chat-api error handling (#19550) 2022-12-21 16:11:35 +01:00
components FIX: auto fill was not happening on first load (#21809) 2023-05-29 17:34:44 +02:00
connectors DEV: Refactoring chat message actions for ChatMessage component usage in thread panel (#20756) 2023-04-06 15:19:52 +02:00
controllers FEATURE: Thread list initial UI (#21412) 2023-05-10 11:42:32 +02:00
helpers UX: implements draft threads (#21361) 2023-05-05 08:55:55 +02:00
initializers UX: closes drawer on esc if input is not focused (#21772) 2023-05-26 18:48:45 +02:00
lib FEATURE: Improving thread list item and header (#21749) 2023-05-29 09:11:55 +02:00
models FEATURE: Improving thread list item and header (#21749) 2023-05-29 09:11:55 +02:00
modifiers/chat FIX: ensure sidepanel size is correctly applied when showing (#21701) 2023-05-23 20:13:58 +02:00
pre-initializers DEV: Fix random typos (#21638) 2023-05-18 15:34:46 +02:00
routes FEATURE: Add user status to inline mentions in chat (#20564) 2023-05-24 16:55:20 +04:00
services FIX: auto fill was not happening on first load (#21809) 2023-05-29 17:34:44 +02:00
templates DEV: Remove renderTemplate from the styleguide (#21660) 2023-05-25 11:22:36 +02:00
widgets FIX: Thread mention read state and notification links (#21385) 2023-05-04 17:28:51 +02:00
admin-chat-route-map.js
chat-route-map.js FEATURE: Thread list initial UI (#21412) 2023-05-10 11:42:32 +02:00
preferences-chat-route-map.js