Skip to content

Build your personal knowledge base with Trilium Notes

fix(mobile): keep the chat title's arrow visible when truncated

Elian Doran3ada5af2f74f
diff --git a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
index e7c6c8934f..6518ec855a 100644
--- a/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
+++ b/apps/client/src/widgets/mobile_widgets/MobileNotePanel.css
@@ -33,16 +33,27 @@ body.mobile .modal.mobile-note-panel {
padding-inline-start: var(--note-panel-close-width, 0px);
> button {
+ display: flex;
+ align-items: center;
max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
+ min-width: 0;
border: 0;
background: transparent;
box-shadow: none;
color: var(--main-text-color);
font-size: 1.1em;
font-weight: 600;
+
+ &::after {
+ flex-shrink: 0;
+ }
+ }
+
+ .sidebar-chat-title {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
}
}
diff --git a/apps/client/src/widgets/sidebar/SidebarChat.tsx b/apps/client/src/widgets/sidebar/SidebarChat.tsx
index 1d1a8ed802..ab0a7f2c3b 100644
--- a/apps/client/src/widgets/sidebar/SidebarChat.tsx
+++ b/apps/client/src/widgets/sidebar/SidebarChat.tsx
@@ -407,7 +407,7 @@ export default function SidebarChat() {
{headerSlot && createPortal((
<>
{newChatButton}
- <Dropdown text={chatTitle} className="sidebar-chat-title-dropdown" noSelectButtonStyle {...historyProps}>
+ <Dropdown text={<span className="sidebar-chat-title">{chatTitle}</span>} className="sidebar-chat-title-dropdown" noSelectButtonStyle {...historyProps}>
{historyItems}
</Dropdown>
{moreActions}