Feat: Nicer click behavior for the Markdown Widget (#6537)

## Summary

Double click instead of single to edit. No longer changes background
color dramatically on hover.

<!-- Add screenshots or video recording to help explain your changes -->

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-6537-Feat-Nicer-click-behavior-for-the-Markdown-Widget-29f6d73d365081a49119fcc2cc86fc11)
by [Unito](https://www.unito.io)
This commit is contained in:
Alexander Brown
2025-11-02 08:42:45 -08:00
committed by GitHub
parent 704de20245
commit fddebd4a73
3 changed files with 6 additions and 41 deletions

View File

@@ -369,32 +369,6 @@ Another line with more content.`
})
})
describe('Styling and Layout', () => {
it('applies widget-markdown class to container', () => {
const widget = createMockWidget('# Test')
const wrapper = mountComponent(widget, '# Test')
const container = wrapper.find('.widget-markdown')
expect(container.exists()).toBe(true)
expect(container.classes()).toContain('relative')
expect(container.classes()).toContain('w-full')
expect(container.classes()).toContain('cursor-text')
})
it('applies overflow handling to display mode', () => {
const widget = createMockWidget(
'# Long Content\n' + 'Content '.repeat(100)
)
const wrapper = mountComponent(
widget,
'# Long Content\n' + 'Content '.repeat(100)
)
const displayDiv = wrapper.find('.comfy-markdown-content')
expect(displayDiv.classes()).toContain('overflow-y-auto')
})
})
describe('Focus Management', () => {
it('creates textarea reference when entering edit mode', async () => {
const widget = createMockWidget('# Test')