feat: improve task note markdown editor
ci / gitleaks (push) Successful in 7s
ci / docker (push) Successful in 5m44s

This commit is contained in:
2026-09-11 17:37:53 +08:00
parent 9ec9d60633
commit 7caa78f318
5 changed files with 156 additions and 17 deletions
+17 -1
View File
@@ -273,7 +273,23 @@ describe('completion feedback motion', () => {
expect(authBlock.indexOf("await syncBrowserTimezone(data.user?.timezone)")).toBeLessThan(authBlock.indexOf('await loadRestoredView()'))
})
it('relies on the task PATCH for atomic due and recurrence synchronization', () => {
it('provides a practical task-note Markdown toolbar with editing and preview modes', () => {
expect(app).toContain('ref="taskNoteEditor"')
expect(app).toContain('class="markdown-toolbar" role="toolbar" aria-label="Markdown 格式"')
for (const label of ['标题', '粗体', '斜体', '无序列表', '有序列表', '待办', '链接', '行内代码', '代码块', '引用']) {
expect(app).toContain(`aria-label="${label}"`)
}
expect(app).toContain('@click="formatTaskNote(')
expect(app).toContain('@keydown="handleTaskNoteShortcut"')
expect(app).toContain('class="markdown-mode-switch"')
expect(app).toContain(':aria-pressed="!markdownPreview"')
expect(app).toContain(':aria-pressed="markdownPreview"')
expect(css).toContain('.markdown-toolbar{display:flex;')
expect(css).toContain('overflow-x:auto')
expect(css).toContain('.markdown-toolbar button{min-width:44px;min-height:44px;')
})
it('keeps all task detail changes on the unified save button', () => {
const saveTaskBlock = app.slice(app.indexOf('async function saveTask('), app.indexOf('async function saveSelectedTaskChanges('))
expect(saveTaskBlock).not.toContain('/recurrences/')
expect(saveTaskBlock).toContain('as Partial<Task>, false')