1. Deconstruct the Request:
- Core Concept: Progressive Disclosure (sequencing information to reduce cognitive load).
- Components: Tooltips, Modals, Inline Hints.
- Key Requirement: "Data-driven guardrails" (logic/rules to decide when and what to show based on user state/context).
- Goal: Create a "pattern library" (a structured guide/system for implementing this).
2. Define "Progressive Disclosure" in this Context:
- It's not just showing help; it's a hierarchy.
- Level 1: Minimalist (Essentials only).
- Level 2: Helper (Inline/Hover).
- Level 3: Focus (Modal/Overlay).
- Level 4: Deep Dive (External/Expanded).
3. Structure the Pattern Library:
A good pattern library needs structure. I should organize it by:
- Philosophy/Principles: Why are we doing this?
- The Hierarchy (The Sequencing): The core mechanism.
- Component Specs: Defining the UI elements (Tooltips, Modals, Hints).
- The "Brain" (Data-Driven Guardrails): The logic engine.
- Implementation Scenarios: Examples of how it works in practice.
4. Drafting the Content - Section by Section:
-
Introduction: Keep it brief. Focus on reducing cognitive load.
-
The Hierarchy (The "Ladder"):
- Base State: Clean UI. No clutter.
- Level 1 (Inline/Hints): Persistent but subtle. Good for onboarding or state changes.
- Level 2 (Tooltips): On-demand. Hover/Focus. "I'm curious."
- Level 3 (Modals/Drawers): Interruption required. "I need to explain this complex thing."
-
The Components (UI Specs):
- Tooltip: Short, 1-2 sentences. No interactive elements (usually).
- Inline Hint: Contextual, potentially dismissible.
- Modal: High focus, requires action to dismiss.
-
The "Guardrails" (The Data Logic):
- This is the critical part. How do we make it data-driven?
- Metrics: User proficiency, error rates, time on task, feature usage frequency.
- Logic:
- If New User: Show Inline Hint.
- If Expert User: Hide Hints, keep Tooltips only.
- If Error occurred twice: Trigger Modal/Coach mark.
- Frequency: Don't show the same hint twice (unless reset).
-
Sequencing Strategy:
- How do they flow?
- Don't stack a tooltip and a modal at the same time.
- Rule: One thing at a time.
-
Implementation Guide (Technical/Design):
- State management (Cookies/Local Storage/Backend).
- A/B testing.
5. Refining the "Guardrails" (Self-Correction):
- Initial thought: Just list rules.
- Better approach: Define "Trigger Events" and "Suppression Rules."
- Triggers: First visit, feature flag enabled, error state.
- Suppressors: "Don't show on mobile if X," "Don't show if user skipped last 3 hints."
6. Creating the Output Format:
- Use Markdown headers.
- Use tables for specs (it looks professional).
- Use bolding for emphasis.
- Include a visual representation (using ASCII or description) of the logic flow.
7. Detailed Drafting (Mental Sandbox):
-
Tooltip: Needs a character limit. 140 chars?
-
Modal: Needs a "primary action."
-
Data attributes: data-help-id, data-user-level.
-
The "State Machine" concept:
- User lands on page -> Check Profile -> Profile says "New" -> Trigger Inline Hint "Welcome".
- User hovers over icon -> Check Dictionary -> Show Tooltip.
- User clicks "Advanced Settings" -> Check if seen before -> If no, show Modal "Heads up, these are advanced."
8. Final Polish:
- Ensure the distinction between Tooltips (reactive) and Inline Hints (proactive) is clear.
- Ensure the "Guardrails" section sounds actionable for developers/data scientists.
9. Final Output Generation: (This matches the provided good response).
- Structure: Library Overview -> Component Inventory -> The Sequencing Logic -> Data-Driven Guardrails -> Code/Data Schema -> Usage Do's/Don'ts.
(Self-Correction during drafting): I initially forgot to mention accessibility. I need to add a note about ARIA labels and keyboard navigation for the tooltip/hint system.
(Review against prompt):
- Progressive disclose? Yes.
- Sequences tooltips, modals, hints? Yes.
- Data-driven guardrails? Yes.
Proceed to generate response.
This plan outlines a Progressive Disclosure Pattern Library designed to scale complex user interfaces. It moves beyond simple "show/hide" logic and introduces a state-machine approach where the UI adapts based on user proficiency, data context, and system events.
📁 The "On-Demand" UI Pattern Library
1. Core Philosophy & Hierarchy
The library relies on a Volatility Hierarchy. Information is layered by the cost of display (screen real estate, cognitive load, and interruption).
- Layer 0: The Baseline (Default State) — Only absolute essentials.
- Layer 1: Inline Hints (Contextual Aid) — Persistent but subtle guides.
- Layer 2: Tooltips (On-Demand Micro-info) — Non-interactive, hover/focus.
- Layer 3: Popovers/Modals (Task Completion) — Interactive, blocks other content.
2. Component Inventory
A. Inline Hints (The "Whisper")
- Purpose: To guide users without requiring interaction. Best for onboarding new features or highlighting empty states.
- UI Pattern: A small text label, a pulsing dot, or a "collapse" Chevron icon.
- Trigger: Automatic (on page load) based on user context.
- Dismissal: Auto-dismiss (after interaction) or Manual (X button).
B. Smart Tooltips (The "Nudge")
- Purpose: To define terminology or show data provenance.
- UI Pattern: Standard floating card. Restriction: No interactive elements (buttons/inputs) allowed inside.
- Trigger: Hover (Desktop) / Long Press (Mobile).
- Guardrail: Max width 250px; Max character count 140.
C. Modals & Drawers (The "Focus")
- Purpose: To complete a critical sub-task or display dense data visualizations.
- UI Pattern: Centered overlay or Right-side drawer.
- Trigger: Explicit Click/Tap.
- Guardrail: Must have a defined "Primary Action" and "Cancel" mechanism.
3. The Sequencing Engine (Logic Layer)
This is the core of the progressive disclosure system. The engine decides which component to show and when.
The Decision Matrix
| User Context | Interface Complexity | Component Used | Behavior |
|---|
| Novice (New Signup) | High | Inline Hint + Coach Mark | Aggressive visibility. Hints persist until dismissed. |
| Intermediate (Active) | Medium | Tooltip | Reactive. Help is hidden until requested (hover). |
| Expert (Power User) | Low | None / Keyboard Shortcut | UI is stripped down. Tooltips suppressed. |
| Error State | High | Modal / Alert | Forced focus. Requires resolution to proceed. |
4. Data-Driven Guardrails
To prevent UI clutter and "toast fatigue," all patterns must adhere to these programmatic guardrails.
A. Frequency Capping (The "Nag" Logic)
B. Semantic Proximity
- Rule: Tooltips must not cover the element they are describing.
- Implementation: Use Flip/Flop collision detection (e.g., Popper.js or Floating UI).
- Data Guardrail: If Tooltip content > 140 chars, upgrade to a Popover to ensure readability.
C. "Feature Flood" Prevention
- Rule: Never show two Inline Hints simultaneously.
- Implementation: Use a Global Queue.
- Logic: If
Hint A is active, Hint B waits in the buffer until Hint A is dismissed.
D. The "Urgency" Threshold
- Rule: Only system-critical messages break the disclosure pattern.
- Levels:
Low: Tooltip (User pulls info).
Medium: Inline Hint (System pushes info gently).
High: Modal (System forces focus).
5. Implementation Schema (JSON Structure)
Every UI element capable of progressive disclosure should consume a standardized configuration object.
{
"component_id": "advanced_filters_v2",
"disclosure_strategy": {
"default_state": "collapsed",
"trigger_type": "hover",
"content_priority": 2,
"guardrails": {
"max_display_count": 5,
"audience_segment": ["new_user", "free_tier"],
"suppress_if": {
"user_role": "admin",
"device_type": "mobile"
}
},
"progression": {
"next_step": "modal_advanced_settings",
"condition": "click_see_more"
}
}
}
6. Visual & Interaction Guidelines
The "Fixation" Rule
- Tooltips should disappear immediately when the cursor leaves the trigger (unless the user moves the cursor into the tooltip, creating a bridge).
- Modals require an explicit "Close" action (Click outside, ESC key, or Cancel button).
Motion Design
- Tooltips: 100ms fade-in (immediate feedback).
- Modals: 200ms ease-out (focus shift).
- Inline Hints: 300ms slide-in (gentle introduction).
7. Testing & Analytics
To validate the library, track these KPIs:
- Hint Dismissal Rate: If >80% close immediately, the hint is annoying (Move to Tooltip).
- Time-to-Action: Did the user complete the task faster with the disclosure pattern?
- Engagement Depth: Ratio of users who progress from Layer 0 (Baseline) to Layer 3 (Modal).
Summary Checklist for Designers
- Is it critical? Put it in the Baseline.
- Is it helpful but optional? Put it in a Tooltip.
- Is it complex/rare? Put it in a Modal.
- Does it teach a new behavior? Use an Inline Hint (temporarily).