Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions playwright/app.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ test('clearing component source reports clear action without error status', asyn
await expect(page.locator('#status')).toHaveText('Component cleared')
await expect(page.locator('#status')).toHaveClass(/status--neutral/)
await expect(page.locator('#preview-host pre')).toHaveCount(0)
await expect(page.locator('#preview-host button')).toHaveCount(0)
Comment thread
knightedcodemonkey marked this conversation as resolved.
Outdated
})

test('jsx syntax errors affect status but not diagnostics toggle severity', async ({
Expand Down
9 changes: 2 additions & 7 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,19 +472,14 @@ const clearComponentSource = () => {
clearDiagnosticsScope('component')
typeDiagnostics.clearTypeDiagnosticsState()
setStatus('Component cleared', 'neutral')

if (!jsxCodeEditor) {
maybeRender()
}
maybeRender()
Comment thread
knightedcodemonkey marked this conversation as resolved.
Outdated
}

const clearStylesSource = () => {
setCssSource('')
clearDiagnosticsScope('styles')
setStatus('Styles cleared', 'neutral')
if (!cssCodeEditor) {
maybeRender()
}
maybeRender()
}

const confirmClearSource = ({ label, onConfirm }) => {
Expand Down
Loading