Skip to content
Merged
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
6 changes: 4 additions & 2 deletions .github/workflows/current_results_ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@ jobs:

- run: flutter pub get

- name: Generate files
run: flutter pub run build_runner build --delete-conflicting-outputs

- run: flutter analyze --fatal-infos

- run: dart format --output=none --set-exit-if-changed .

# TODO: Write tests
# - run: flutter test
- run: flutter test
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
current_results/lib/src/generated/google
functions/node_modules
github-label-notifier/functions/node_modules

**/test/**.mocks.dart
24 changes: 22 additions & 2 deletions current_results_ui/.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
# This file should be version controlled and should not be manually edited.

version:
revision: 7c6f9dd2396dfe7deb6fd11edc12c10786490083
channel: dev
revision: "edada7c56edf4a183c1735310e123c7f923584f1"
channel: "stable"

project_type: app

# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: edada7c56edf4a183c1735310e123c7f923584f1
base_revision: edada7c56edf4a183c1735310e123c7f923584f1
- platform: macos
create_revision: edada7c56edf4a183c1735310e123c7f923584f1
base_revision: edada7c56edf4a183c1735310e123c7f923584f1

# User provided section

# List of Local paths (relative to this file) that should be
# ignored by the migrate tool.
#
# Files that are not part of the templates will be ignored by default.
unmanaged_files:
- 'lib/main.dart'
- 'ios/Runner.xcodeproj/project.pbxproj'
45 changes: 35 additions & 10 deletions current_results_ui/firebase.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,36 @@
{
"hosting": {
"target": "current-results",
"public": "build/web",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}]
}
}
"emulators": {
"auth": {
"port": 9099
},
"firestore": {
"port": 8080
},
"ui": {
"enabled": true,
"port": 4000
}
},
"hosting": {
"target": "current-results",
"public": "build/web",
"rewrites": [
{
"source": "**",
"destination": "/index.html"
}
]
},
"flutter": {
"platforms": {
"dart": {
"lib/firebase_options.dart": {
"projectId": "dart-ci",
"configurations": {
"web": "1:410721018617:web:4fd4f4d82de23478f53828"
}
}
}
}
}
}
40 changes: 23 additions & 17 deletions current_results_ui/lib/filter.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,17 @@ class _FilterUIState extends State<FilterUI> {
children: [
for (final term in filter.terms)
InputChip(
label: Text(term),
onDeleted: () {
pushRoute(context,
terms:
filter.terms.where((t) => t != term));
},
onPressed: () {
controller.text = term;
}),
label: Text(term),
onDeleted: () {
pushRoute(
context,
terms: filter.terms.where((t) => t != term),
);
},
onPressed: () {
controller.text = term;
},
),
],
),
),
Expand All @@ -80,18 +82,22 @@ class _FilterUIState extends State<FilterUI> {
child: TextField(
controller: controller,
decoration: const InputDecoration(
hintText: 'Test, configuration or experiment prefix'),
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));
bool isNotReplacedByNewTerm(String term) => !newTerms.any(
(newTerm) =>
term.startsWith(newTerm) || newTerm.startsWith(term),
);
controller.text = '';
pushRoute(context,
terms: filter.terms
.where(isNotReplacedByNewTerm)
.followedBy(newTerms));
pushRoute(
context,
terms: filter.terms
.where(isNotReplacedByNewTerm)
.followedBy(newTerms),
);
},
),
),
Expand Down
68 changes: 68 additions & 0 deletions current_results_ui/lib/firebase_options.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
// Copyright (c) 2025, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

// File generated by FlutterFire CLI.
// ignore_for_file: type=lint
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;

/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for android - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.iOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for ios - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}

static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyCOWP8dDmOzMdU3evqU-77HhvDAHD0kFU8',
appId: '1:410721018617:web:4fd4f4d82de23478f53828',
messagingSenderId: '410721018617',
projectId: 'dart-ci',
authDomain: 'dart-ci.firebaseapp.com',
databaseURL: 'https://dart-ci.firebaseio.com',
storageBucket: 'dart-ci.appspot.com',
);
}
50 changes: 26 additions & 24 deletions current_results_ui/lib/instructions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -16,39 +16,38 @@ class Instructions extends StatelessWidget {
'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(
'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'
'terms': 'language_2/,analyzer',
},
{
'description': 'service/de* tests on dartk- configurations',
'terms': 'dartk-,service/de'
'terms': 'dartk-,service/de',
},
{'description': 'analyzer unit tests', 'terms': 'pkg/analyzer/'},
{
'description':
'all tests on dart2js strong null-safe configuration',
'terms': 'dart2js-hostasserts-strong'
'terms': 'dart2js-hostasserts-strong',
},
{
'description':
'all tests that were run with experiment "test-experiment"',
'terms': 'test-experiment'
'terms': 'test-experiment',
},
{'description': 'null-safe language tests', 'terms': 'language/'},
]) ...[
const SizedBox(height: 12),
InkWell(
onTap: () {
Navigator.pushNamed(
context,
'/filter=${example['terms']}',
);
Navigator.pushNamed(context, '/filter=${example['terms']}');
},
child: Text.rich(
TextSpan(
Expand All @@ -60,26 +59,29 @@ class Instructions extends StatelessWidget {
color: Colors.blue[900],
decoration: TextDecoration.underline,
),
)
),
],
),
),
),
],
const SizedBox(height: 24.0),
const Text(
'About Current Results',
style: TextStyle(fontSize: 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.',
),
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.'),
],
),
);
Expand Down
Loading