Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

various UI changes; show fetch progress, use animation, ... #126

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions current_results_ui/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# The following line activates a set of recommended lints for Flutter apps,
# packages, and plugins designed to encourage good coding practices.
include: package:flutter_lints/flutter.yaml

linter:
rules:
# Disabled as there are currently many violations.
use_key_in_widget_constructors: false
# Disabled - currently one violation.
avoid_print: false

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
50 changes: 20 additions & 30 deletions current_results_ui/lib/filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class _FilterUIState extends State<FilterUI> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ConstrainedBox(
constraints: BoxConstraints(maxHeight: 100.0),
constraints: const BoxConstraints(maxHeight: 100.0),
child: Scrollbar(
child: SingleChildScrollView(
child: Container(
padding: EdgeInsets.only(left: 8.0, right: 8.0, top: 8.0),
padding: const EdgeInsets.only(top: 16.0),
alignment: Alignment.topLeft,
child: Wrap(
spacing: 8.0,
Expand All @@ -73,34 +73,24 @@ class _FilterUIState extends State<FilterUI> {
),
),
),
Divider(
color: Colors.grey[300],
height: 2,
thickness: 2,
),
Padding(
padding: EdgeInsets.only(left: 12.0),
child: SizedBox(
width: 300.0,
height: 36.0,
child: TextField(
controller: controller,
decoration: InputDecoration(
hintText: 'Test, configuration or experiment prefix'),
onSubmitted: (value) {
if (value.trim().isEmpty) return;
final newTerms = value.split(',').map((s) => s.trim());
bool isNotReplacedByNewTerm(String term) =>
!newTerms.any((newTerm) =>
term.startsWith(newTerm) ||
newTerm.startsWith(term));
controller.text = '';
pushRoute(context,
terms: filter.terms
.where(isNotReplacedByNewTerm)
.followedBy(newTerms));
},
),
SizedBox(
width: 300.0,
child: TextField(
controller: controller,
decoration: const InputDecoration(
hintText: 'Test, configuration or experiment prefix'),
onSubmitted: (value) {
if (value.trim().isEmpty) return;
final newTerms = value.split(',').map((s) => s.trim());
bool isNotReplacedByNewTerm(String term) =>
!newTerms.any((newTerm) =>
term.startsWith(newTerm) || newTerm.startsWith(term));
controller.text = '';
pushRoute(context,
terms: filter.terms
.where(isNotReplacedByNewTerm)
.followedBy(newTerms));
},
),
),
],
Expand Down
141 changes: 72 additions & 69 deletions current_results_ui/lib/instructions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,89 +3,92 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';

class Instructions extends StatelessWidget {
@override
Widget build(context) {
return SingleChildScrollView(
controller: ScrollController(),
child: Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
Text(
'Enter a query to see current test results',
style: TextStyle(fontSize: 24.0),
),
paragraph('Enter query terms that are prefixes of configuration, '
'experiment or test names.'
' Multiple terms can be entered at once, separated by commas.'),
paragraph('Some example queries are:'),
for (final example in [
{
'description': 'language_2/ tests on analyzer configurations',
'terms': 'language_2/,analyzer'
},
{
'description': 'service/de* tests on dartk- configurations',
'terms': 'dartk-,service/de'
},
{'description': 'analyzer unit tests', 'terms': 'pkg/analyzer/'},
{
'description':
'all tests on dart2js strong null-safe configuration',
'terms': 'dart2js-hostasserts-strong'
},
{
'description':
'all tests that were run with experiment "test-experiment"',
'terms': 'test-experiment'
},
{'description': 'null-safe language tests', 'terms': 'language/'},
]) ...[
SizedBox(height: 12),
InkWell(
onTap: () {
Navigator.pushNamed(
context,
'/filter=${example['terms']}',
);
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
const Text(
'Enter a query to see current test results',
style: TextStyle(fontSize: 24.0),
),
paragraph('Enter query terms that are prefixes of configuration, '
'experiment or test names.'
' Multiple terms can be entered at once, separated by commas.'),
paragraph('Some example queries are:'),
for (final example in [
{
'description': 'language_2/ tests on analyzer configurations',
'terms': 'language_2/,analyzer'
},
{
'description': 'service/de* tests on dartk- configurations',
'terms': 'dartk-,service/de'
},
{'description': 'analyzer unit tests', 'terms': 'pkg/analyzer/'},
{
'description':
'all tests on dart2js strong null-safe configuration',
'terms': 'dart2js-hostasserts-strong'
},
child: Text.rich(
TextSpan(
text: '${example['description']}: ',
children: [
TextSpan(
text: example['terms'],
style: TextStyle(
color: Colors.blue[900],
decoration: TextDecoration.underline,
),
)
],
{
'description':
'all tests that were run with experiment "test-experiment"',
'terms': 'test-experiment'
},
{'description': 'null-safe language tests', 'terms': 'language/'},
]) ...[
const SizedBox(height: 12),
InkWell(
onTap: () {
Navigator.pushNamed(
context,
'/filter=${example['terms']}',
);
},
child: Text.rich(
TextSpan(
text: '${example['description']}: ',
children: [
TextSpan(
text: example['terms'],
style: TextStyle(
color: Colors.blue[900],
decoration: TextDecoration.underline,
),
)
],
),
),
),
],
const SizedBox(height: 24.0),
const Text(
'About Current Results',
style: TextStyle(fontSize: 24.0),
),
paragraph('For each test, the results show how many '
'of the selected configurations are passing, failing, and flaky. '
'The item can be expanded to show which configurations are failing,'
' and the configuration names are links to the failure logs.'),
paragraph('The clock icon after each test name is a link to the '
'results feed, filtered to show just the history of that test.'),
paragraph('Results can be downloaded from the server using the '
'JSON link at the bottom of the page, or as comma-separated '
'text using the text link.'),
],
SizedBox(height: 24.0),
Text(
'About Current Results',
style: TextStyle(fontSize: 24.0),
),
paragraph('For each test, the results show how many '
'of the selected configurations are passing, failing, and flaky. '
'The item can be expanded to show which configurations are failing,'
' and the configuration names are links to the failure logs.'),
paragraph('The clock icon after each test name is a link to the '
'results feed, filtered to show just the history of that test.'),
paragraph('Results can be downloaded from the server using the '
'JSON link at the bottom of the page, or as comma-separated '
'text using the text link.'),
]),
),
);
}

Widget paragraph(String text) {
return Container(
constraints: BoxConstraints(maxWidth: 500.0),
padding: EdgeInsets.only(top: 12.0),
child: Text(text, style: TextStyle(height: 1.5)));
padding: const EdgeInsets.only(top: 12.0),
child: Text(text, style: const TextStyle(height: 1.5)),
);
}
}
Loading