Currently, the MySQL database sidebar tree (connections_panel_mysql.dart) hardcodes the "Tables" and "Views" lists as uncollapsible flat lists directly under the database node. This differs from the PostgreSQL implementation (connections_panel_pg_tree.dart), where objects are neatly grouped into collapsible folders (Tables, Views, Functions, etc.) using _PgObjectGroup.
Tasks to implement
- Create
_MysqlObjectGroup Widget: Create a new stateful widget in connections_panel_mysql.dart (analogous to _PgObjectGroup). It must maintain its own _expanded state and render a _PgTreeRow header with an expandable chevron (AnimatedRotation), followed by a QueryaAnimatedExpand containing the list of items.
- Refactor MySQL Database Node: In
_MysqlDatabaseNodeState.build(), replace the hardcoded "Tables" and "Views" _PgTreeRow + lazyConnectionTreeList blocks with instances of the new _MysqlObjectGroup.
- Unify Visual Styling: Update the item rows inside the new group to use the correct icon styling. In PG, items use
theme.colorScheme.primary.withValues(alpha: 0.5). In MySQL, they currently use mutedForeground. They should be updated to match the PG style.
- Context Menu Parity: Ensure that context menu parameters (
openSqlDatabase, openSqlName, openSqlKind) are properly wired up and passed to the child _PgTreeRow items within the group, so they support the "Open in SQL" action just like the PostgreSQL nodes do.
Currently, the MySQL database sidebar tree (
connections_panel_mysql.dart) hardcodes the "Tables" and "Views" lists as uncollapsible flat lists directly under the database node. This differs from the PostgreSQL implementation (connections_panel_pg_tree.dart), where objects are neatly grouped into collapsible folders (Tables, Views, Functions, etc.) using_PgObjectGroup.Tasks to implement
_MysqlObjectGroupWidget: Create a new stateful widget inconnections_panel_mysql.dart(analogous to_PgObjectGroup). It must maintain its own_expandedstate and render a_PgTreeRowheader with an expandable chevron (AnimatedRotation), followed by aQueryaAnimatedExpandcontaining the list of items._MysqlDatabaseNodeState.build(), replace the hardcoded "Tables" and "Views"_PgTreeRow+lazyConnectionTreeListblocks with instances of the new_MysqlObjectGroup.theme.colorScheme.primary.withValues(alpha: 0.5). In MySQL, they currently usemutedForeground. They should be updated to match the PG style.openSqlDatabase,openSqlName,openSqlKind) are properly wired up and passed to the child_PgTreeRowitems within the group, so they support the "Open in SQL" action just like the PostgreSQL nodes do.