Skip to content

fix(ui): disable workspace Execute/Refresh when query cannot run (#266) - #291

Merged
ZhuchkaTriplesix merged 3 commits into
devfrom
issue/266-f5-button-disabled
Jul 10, 2026
Merged

fix(ui): disable workspace Execute/Refresh when query cannot run (#266)#291
ZhuchkaTriplesix merged 3 commits into
devfrom
issue/266-f5-button-disabled

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • Replace the noop onPressed: () {} on _RunButton with a disabled OutlineButton when no execute handler is available.
  • Show a tooltip (Select an active database connection to execute queries) on the disabled button.
  • Add widget tests: button hidden in empty state (no connection), button disabled in the generic workspace fallback.

Fixes #266.

Test plan

  • flutter test test/features/main_screen/workspace_panel_layout_test.dart
  • Launch app without a connection — Execute/Refresh should not appear on empty hero
  • Hover disabled Execute/Refresh in generic workspace — tooltip should explain why

Replace the noop onPressed handler with a disabled OutlineButton and
tooltip when no execute action is available. Add widget tests for the
hidden empty-state button and the disabled fallback workspace button.
@github-actions github-actions Bot added bug Something isn't working ui User interface components and widgets labels Jul 10, 2026
Remove unused onExecute parameter; keep onPressed null with tooltip.
Use a const StatelessWidget and drop unused AnimatedScale import.
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 2f9a469 into dev Jul 10, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/266-f5-button-disabled branch July 26, 2026 14:38
ZhuchkaTriplesix added a commit that referenced this pull request Jul 27, 2026
fix(ui): disable workspace Execute/Refresh when query cannot run (#266)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working ui User interface components and widgets

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant