From 1b9ec31d84469f830fe4e25630eef0211eda81b2 Mon Sep 17 00:00:00 2001 From: hunteraraujo Date: Tue, 26 Sep 2023 16:34:15 -0700 Subject: [PATCH] Add tooltip for LeaderboardSubmissionButton --- .../task_queue/leaderboard_submission_button.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/frontend/lib/views/task_queue/leaderboard_submission_button.dart b/frontend/lib/views/task_queue/leaderboard_submission_button.dart index 9a99201fac98..dfa9d917b3a3 100644 --- a/frontend/lib/views/task_queue/leaderboard_submission_button.dart +++ b/frontend/lib/views/task_queue/leaderboard_submission_button.dart @@ -10,7 +10,7 @@ class LeaderboardSubmissionButton extends StatelessWidget { @override Widget build(BuildContext context) { - return SizedBox( + final button = SizedBox( height: 50, child: ElevatedButton( style: ElevatedButton.styleFrom( @@ -44,5 +44,13 @@ class LeaderboardSubmissionButton extends StatelessWidget { ), ), ); + + return isDisabled + ? Tooltip( + message: + "You must complete a test suite before submitting to the leaderboard.", + child: button, + ) + : button; } }