Skip to content

feat(tree): support active selection highlighting in SduiTreeBuilder for extension drivers #639

Description

@ZhuchkaTriplesix

Motivation & Problem

In #633, active table/view/database selection was synchronized to the connections sidebar tree (_ConnectionsTreeSelectionScope) with fluid animated selection styling (_PgTreeRow) across PostgreSQL, MySQL, SQLite, Redis, and MongoDB.

However, extension drivers (e.g. ClickHouse) render their schema hierarchy using SduiTreeBuilder in connections_panel_extension.dart. Currently, SduiTreeBuilder does not receive or support an active selection identifier (selectedNodeId or selectedObject), which means selecting a table or view in an extension connection does not highlight the active node in the sidebar tree.

Proposed Scope

  1. In SduiTreeBuilder:
    • Add selectedNodeId (or active selection predicate) parameter.
    • Forward selection from _ConnectionsTreeSelectionScope via _ExtensionConnectionTile.
    • Add animated selection container styling (subtle primary background tint, primary border outline, semibold typography) matching _PgTreeRow selection state.
  2. In connections_panel_extension.dart:
    • Forward active extension selection from _ConnectionsTreeSelectionScope to SduiTreeBuilder.
  3. Add widget tests verifying that selecting an extension node highlights the corresponding row in the SDUI tree.

Acceptance Criteria

  • Selecting a table or view in an extension connection visually highlights the active row in the sidebar tree.
  • The highlight styling matches the native tree row design tokens (120ms animation, primary background tint, subtle border).
  • Deselecting or switching objects updates or clears the highlight smoothly.
  • Widget tests pass for SduiTreeBuilder active node highlighting.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestfrontendTheme parser epic label: frontenduiUser interface components and widgets

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions