feat(frontend): polish chat suggestions, citations, and drawers

- unify suggested-question styling across chat entry points
- keep citation markers inline with their preceding list content
- prevent manual editor viewport shifts and synchronize drawer motion
- align embedded preview and editor drawers in the body stacking context
This commit is contained in:
wizardchen
2026-06-17 22:38:07 +08:00
committed by lyingbug
parent e0d3c1dafd
commit 4e2d568149
9 changed files with 305 additions and 313 deletions
@@ -150,7 +150,11 @@ const setSelectionRange = (start: number, end: number) => {
if (!textarea || activeTab.value !== 'edit') {
return
}
textarea.focus()
// Initialization can finish while the drawer is still sliding in. A plain
// focus() makes the browser scroll the transformed textarea into view,
// which intermittently shifts the drawer away from the right edge for a
// frame. Keep keyboard focus without letting it move the viewport.
textarea.focus({ preventScroll: true })
textarea.setSelectionRange(start, end)
})
}
@@ -735,7 +739,6 @@ onBeforeUnmount(() => {
:min-width="560"
:max-width="1280"
storage-key="setting-drawer:width:manual-markdown-editor"
:destroy-on-close="false"
:hide-footer="!initialLoaded"
:confirm-loading="saving && savingAction === 'publish'"
:confirm-text="$t('manualEditor.actions.publish')"
@@ -1111,5 +1114,3 @@ onBeforeUnmount(() => {
color: var(--td-text-color-placeholder);
}
</style>