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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ is not — the same rule the OpenTofu modules follow.
| [`app_report_client`](packages/app_report_client) | client half of [app-report-relay](https://github.com/DoYouHost/app-report-relay): ticket transport, on-disk outbox, log redaction |
| [`app_diagnostics`](packages/app_diagnostics) | the other half — the recording session, the log record and its file mirror, the cross-isolate merge, the review summary, and the probes over taps, routes, requests, errors and lifecycle |
| [`app_report_ui`](packages/app_report_ui) | the report screens — the guided flow, the recording bar that follows the user around the app, and the review that decides where the log goes |
| [`dash_ui`](packages/dash_ui) | the design system — tokens resolved per brightness and brand, the type scale, the screen chrome, the Material theme, and the contrast audit each app runs on its brand |
| [`dash_ui`](packages/dash_ui) | the design system — tokens resolved per brightness and brand, the type scale, the spacing scales (`DashSpace`, and Wear Material 3's `WearSpace` for a watch), the screen chrome, the Material theme, and the contrast audit each app runs on its brand |
| [`dash_kit`](packages/dash_kit) | the Dash widgets that name themselves in the diagnostic log — the confirmation dialog, the load-error and empty views, the bottom sheet, the snack bar, the width cap, the spinners, the button pair, the logged app bar, the form fields — the select, the filter select and the picker field — the date pickers, the segmented toggle, the settings rows, the search field and bar, the stepper, the progress bar, the inline note, the sheet surfaces and the refresh-on-return wrapper |
| [`app_guards`](packages/app_guards) | source scans that hold an application to the Dash standards, for its tests to assert on — spacing from `DashSpace`, a `Wrap` that sets `runSpacing`, no one-letter word at a line end, no finder spelling out the copy — and the tools both applications run from their `justfile`: the one-letter-word glue, the LanguageTool check, the log-coverage scan, the translation-sync report, the Play bundle versions, Google Play publishing and the commit-message hook — each configured by a file in the application |
| [`app_guards`](packages/app_guards) | source scans that hold an application to the Dash standards, for its tests to assert on — spacing from `DashSpace` (or, on a watch, `WearSpace`), a `Wrap` that sets `runSpacing`, no one-letter word at a line end, no finder spelling out the copy — and the tools both applications run from their `justfile`: the one-letter-word glue, the LanguageTool check, the log-coverage scan, the translation-sync report, the Play bundle versions, Google Play publishing and the commit-message hook — each configured by a file in the application |
| [`app_test_kit`](packages/app_test_kit) | the test harness both applications need the same way — a request log to assert on, an exact-body mock server, a scripted adapter, a clock and a timer the test drives, the diagnostic-id finders, a phone-shaped window and fixtures |
| [`app_util`](packages/app_util) | small things both apps need the same way — tolerant JSON coercion, user-typed numbers, text measurement, platform-channel queries, byte sizes and hex colours, the demo-mode HTTP adapter, the server address, the web-link filter, the reconnect backoff, server reachability, currency symbols, name ordering and a stable digest, and the classification of a failed request |

Expand Down
5 changes: 3 additions & 2 deletions packages/app_guards/lib/src/spacing.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ final _literal = RegExp(
final _number = RegExp(r'(?<![\w.])(\d+(?:\.\d+)?)(?![\w.])');

/// Every padding, margin and gap under [root] typed as a number rather than
/// taken from `DashSpace`. Zero is allowed: it is the absence of spacing, not a
/// value on the scale. Generated localizations are skipped.
/// taken from a scale: `DashSpace` on a phone, `WearSpace` — Wear Material 3's
/// own values — on a watch. Zero is allowed: it is the absence of spacing, not
/// a value on a scale. Generated localizations are skipped.
///
/// A value that is a size rather than spacing (room for a gauge, centring a
/// knob) belongs in a named constant next to the widget it measures; the scan
Expand Down
2 changes: 1 addition & 1 deletion packages/app_guards/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: >-
functions its own tests assert on: spacing from DashSpace, a Wrap that sets
runSpacing, no one-letter word at a line end, and no finder spelling out the
application's copy. Plus the tool that glues the one-letter words.
version: 0.1.0
version: 0.1.1
publish_to: none

environment:
Expand Down
6 changes: 5 additions & 1 deletion packages/app_guards/test/spacing_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,14 @@ final w = Wrap(spacing: 4, runSpacing: 4);
expect(hits.first, endsWith('a.dart:1 EdgeInsets.all(12)'));
});

test('the scale, zero and a size are not spacing', () {
test('either scale, zero and a size are not spacing', () {
final root = tree({
'a.dart': '''
const p = EdgeInsets.all(DashSpace.lg);
const b = EdgeInsets.symmetric(
horizontal: WearSpace.buttonHorizontal,
vertical: WearSpace.buttonVertical,
);
const z = EdgeInsets.zero;
const n = EdgeInsets.only(left: 0);
const box = SizedBox(width: double.infinity);
Expand Down
4 changes: 2 additions & 2 deletions packages/app_report_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies:
app_diagnostics:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/app_diagnostics
app_report_client:
git:
Expand All @@ -35,7 +35,7 @@ dependencies:
dash_kit:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/dash_kit
# Only `saveFile` is called here. The upper bound stops before 11, which
# replaced `FilePicker.platform.x()` with static methods and, in 13, dropped
Expand Down
2 changes: 1 addition & 1 deletion packages/app_test_kit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ dependencies:
app_diagnostics:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/app_diagnostics
clock: ^1.1.2
dio: ^5.10.0
Expand Down
2 changes: 1 addition & 1 deletion packages/app_util/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependencies:
app_diagnostics:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/app_diagnostics
# 5.10 is the first with `DioExceptionType.transformTimeout`, and the
# classification names every type so that the next one added is a compile
Expand Down
6 changes: 3 additions & 3 deletions packages/dash_kit/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,18 @@ dependencies:
app_diagnostics:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/app_diagnostics
# `ButtonPair` measures its labels with `textWidth`.
app_util:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/app_util
dash_ui:
git:
url: https://github.com/DoYouHost/app-shared.git
ref: v0.12.2
ref: v0.13.0
path: packages/dash_ui

dev_dependencies:
Expand Down
1 change: 1 addition & 0 deletions packages/dash_ui/lib/dash_ui.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ export 'src/dash_text.dart';
export 'src/dash_theme_data.dart';
export 'src/dash_tokens.dart';
export 'src/dash_widgets.dart';
export 'src/wear_space.dart';
26 changes: 26 additions & 0 deletions packages/dash_ui/lib/src/wear_space.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import 'dash_space.dart';

/// The spacing of a Wear OS screen that Google names: Wear Material 3's button
/// inset (compose-material3 1.7.1 `ButtonDefaults`), off the 4 dp grid, and the
/// gaps of the Wear OS list guidance. A watch screen takes these roles from
/// here; spacing the guidance gives no role stays on [DashSpace]'s 4 dp grid,
/// which is what it asks for ("spacing is set in multiples of 4 dp").
abstract final class WearSpace {
/// The content inset of every button variant, across and down
/// (`ButtonDefaults.ContentPadding`).
static const double buttonHorizontal = 14;
static const double buttonVertical = 6;

/// Between the elements of one group in a list.
static const double inGroup = 4;

/// Between groups within a slot of a list.
static const double betweenGroups = 8;

/// From a list's title to its content.
static const double titleToContent = 12;

/// Between the slots of a list, and between its top, middle and bottom
/// sections.
static const double betweenSections = 16;
}
2 changes: 1 addition & 1 deletion packages/dash_ui/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: >-
The Dash design system: colour tokens resolved per brightness and brand, the
type scale, the screen chrome, the Material theme built from them, and the
contrast audit a brand has to pass.
version: 0.3.2
version: 0.4.0
publish_to: none

environment:
Expand Down
15 changes: 15 additions & 0 deletions packages/dash_ui/test/wear_space_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import 'package:dash_ui/dash_ui.dart';
import 'package:flutter_test/flutter_test.dart';

void main() {
test("the watch's scale is Wear Material 3's", () {
// compose-material3 1.7.1: ButtonDefaults.ButtonHorizontalPadding,
// ButtonVerticalPadding; the Wear OS list guidance for the gaps.
expect(WearSpace.buttonHorizontal, 14);
expect(WearSpace.buttonVertical, 6);
expect(WearSpace.inGroup, 4);
expect(WearSpace.betweenGroups, 8);
expect(WearSpace.titleToContent, 12);
expect(WearSpace.betweenSections, 16);
});
}
Loading