mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-09 16:18:30 +08:00
This new navbar component is used for every navbar in chat, full page or drawer, and any screen.
This commit also uses this opportunity to correctly decouple drawer-routes from full page routes. This will avoid having this kind of properties in components: `@includeHeader={{false}}`. The header is now defined in the parent template using a navbar. Each route has now its own template wrapped in a div of the name of the route, eg: `<div class="c-routes-threads">..</div>`.
The navbar API:
```gjs
<Navbar as |navbar|>
<navbar.BackButton />
<navbar.Title @title="Foo" />
<navbar.ChannelTitle @channel={{@channel}} />
<navbar.Actions as |action|>
<action.CloseThreadButton />
</navbar.Actions>
</navbar>
```
The full list of components is listed in `plugins/chat/assets/javascripts/discourse/components/navbar/index.gjs` and `plugins/chat/assets/javascripts/discourse/components/navbar/actions.gjs`.
Visually the header is not changing much, only in drawer mode the background has been removed.
This commit also introduces a `<List />` component to facilitate rendering lists in chat plugin.
|
||
|---|---|---|
| .. | ||
| channel-title-test.js | ||
| chat-channel-card-test.js | ||
| chat-channel-leave-btn-test.js | ||
| chat-channel-metadata-test.js | ||
| chat-channel-preview-card-test.js | ||
| chat-channel-row-test.js | ||
| chat-channel-status-test.js | ||
| chat-channel-test.js | ||
| chat-composer-dropdown-test.js | ||
| chat-composer-message-details-test.js | ||
| chat-composer-placeholder-test.js | ||
| chat-composer-upload-test.js | ||
| chat-composer-uploads-test.js | ||
| chat-emoji-avatar-test.js | ||
| chat-emoji-picker-test.js | ||
| chat-header-icon-test.js | ||
| chat-message-avatar-test.js | ||
| chat-message-collapser-test.js | ||
| chat-message-info-test.js | ||
| chat-message-left-gutter-test.js | ||
| chat-message-reaction-test.js | ||
| chat-message-separator-date-test.js | ||
| chat-message-separator-new-test.js | ||
| chat-message-test.js | ||
| chat-message-text-test.js | ||
| chat-modal-archive-channel-test.js | ||
| chat-modal-delete-channel-test.js | ||
| chat-modal-move-message-to-channel-test.js | ||
| chat-notices-test.js | ||
| chat-replying-indicator-test.js | ||
| chat-retention-reminder-test.js | ||
| chat-retention-reminder-text-test.js | ||
| chat-thread-header-test.js | ||
| chat-thread-list-item-test.js | ||
| chat-thread-participants-test.js | ||
| chat-upload-test.js | ||
| chat-user-avatar-test.js | ||
| chat-user-card-button-test.js | ||
| chat-user-display-name-test.js | ||
| chat-user-info-test.js | ||
| collapser-test.js | ||
| dc-filter-input-test.js | ||