Engineering Journal
Pdf Processor
Pdf Processor

A button that does nothing is worse than an error

2026-07-11

TLDR

Disabling buttons silently or swallowing failed actions without user feedback forces users to guess why an operation did not execute. In complex document and PDF canvas editors, preconditions often depend on dynamic selection states (e.g., block counts, container nesting). Keeping buttons interactive and displaying clear, contextual feedback toasts when preconditions fail teaches users how the tool operates rather than making them assume the software is broken.
UI Action StrategyBehavior on Failed PreconditionUser FeedbackUX Impact
Silent Disable / No-OpButton grayed out or unresponsiveNone (Silent failure)User assumes software is broken
Interactive Action + ToastExecutes validation checkContextual toast notificationTeaches exact constraint boundary

Problem statement: the ambiguity of silent disabling

In rich text and document extraction tools, actions like "Split into Columns" require specific preconditions:

  1. Multiple block elements must be selected.
  2. Selection cannot span inside fixed tables or callout boxes.
  3. Selection block count must exceed target column count.
When applications handle these constraints by graying out buttons or swallowing clicks silently, users cannot determine which precondition failed.


Technical failure mode: the ambiguous disability trap

// DEFECTIVE IMPLEMENTATION: Silent No-Op / Disabled State
function handleColumnSplitClick() {
  const selectedBlocks = getSelectedBlocks();
  
  // Fails silently if selection criteria aren't met
  if (selectedBlocks.length < 2) return;

executeColumnSplit(selectedBlocks); }

When a user selects a single block and clicks "Split into Columns", nothing happens.

Repeatedly clicking the unresponsive button leads users to file a bug report for a feature that is working as designed.


The fix & architecture: explicit validation feedback

Keep UI actions active and trigger clear, plain-language toast feedback whenever preconditions fail:

// REFACTORED: Action Validation with Contextual Toast Feedback
function applyColumnSplit(requestedColumnCount) {
  const selectedBlocks = getSelectedBlocks();

if (selectedBlocks.length === 0) { return showToastWarning('No content selected. Highlight text blocks to split into columns.'); }

if (selectedBlocks.length === 1) { return showToastWarning("Single blocks cannot be split. Select two or more text blocks."); }

if (selectedBlocks.length < requestedColumnCount) { return showToastWarning( Selected ${selectedBlocks.length} blocks, which is less than the requested ${requestedColumnCount} columns. ); }

// Execute valid column split operation executeColumnSplit(selectedBlocks, requestedColumnCount); }

Rule of thumb: Avoid silent UI no-ops. Keep action controls interactive and display clear contextual warnings when execution preconditions fail.
Read this post in the full Engineering Journal →