Skip to content

fix: make empty task blocks clickable with placeholder text - #172

Merged
h4yfans merged 1 commit into
mainfrom
fix/empty-task-block-clickable
Apr 8, 2026
Merged

fix: make empty task blocks clickable with placeholder text#172
h4yfans merged 1 commit into
mainfrom
fix/empty-task-block-clickable

Conversation

@h4yfans

@h4yfans h4yfans commented Apr 8, 2026

Copy link
Copy Markdown
Collaborator

What

Make empty task blocks clickable with placeholder text, fixing regression where draft tasks (no title) became unclickable after blur.

Why

Draft task blocks (created by pressing Enter in a filled task) have taskId='' and title=''. When the user blurred the title input without typing, the read-only span had empty content, collapsing to zero width. The task block became invisible and unclickable, blocking the user from re-entering edit mode.

How

  • Added isEmpty check to detect when title is blank
  • Show placeholder text "Task name…" in italic gray when empty
  • Add aria-label="Edit task name" for accessibility
  • Use resolved title consistently in the span content and styling logic
  • Ensure empty state has non-zero width so users can click back into edit mode
  • E2E tests cover the full CRUD loop for draft task blocks

Type

  • fix — bug fix

Test plan

  • E2E tests added: task-block-empty-title.e2e.ts covers create/read/update/delete for draft tasks
  • Manual testing: verified placeholder shows and is clickable after blur

Checklist

  • Self-reviewed the diff
  • No hardcoded secrets or credentials
  • Files stay under ~500 LOC
  • Follows immutable data patterns

Empty draft task blocks (taskId='') became unclickable after title blur because
the read-only title span had no fallback content, collapsing to zero width.
Now shows 'Task name…' placeholder with proper styling, includes aria-label
for accessibility, and uses proper click detection for isEmpty state.
@h4yfans
h4yfans merged commit b105676 into main Apr 8, 2026
2 checks passed
h4yfans added a commit that referenced this pull request May 6, 2026
fix: make empty task blocks clickable with placeholder text
@h4yfans
h4yfans deleted the fix/empty-task-block-clickable branch May 6, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant