Skip to content

TP-20 — Add safe preview card without applying theme on hover #115

Description

@ZhuchkaTriplesix

Epic: C
Depends on: TP-18, TP-17

Source: docs/theme-parser-github-issues.md

Goal

Optional visual preview for hovered/selected theme without rebuilding the whole app.

Files

  • lib/features/settings/theme_preview_card.dart
  • lib/features/settings/theme_picker_button.dart
  • tests as needed.

Implementation

Add ThemePreviewCard:

  • accepts QueryaTheme or lightweight preview colors;
  • displays:
    • background;
    • surface;
    • primary/accent;
    • sample text;
    • editor background strip.

In picker:

  • hover selects preview target id locally;
  • debounce 100-150ms before calling previewThemeById;
  • preview result stored in local state only;
  • never call setThemeById on hover.

Acceptance Criteria

  • Hovering row does not change app theme.
  • Preview card updates after debounce.
  • Broken preview shows non-blocking error in card.

Tests

  • hover/callback does not call onSelected;
  • preview future resolves and card updates;
  • broken preview shows fallback/error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceTheme parser epic label: performancesettingsTheme parser epic label: settingsthemeTheming, colors, VS Code themes

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions