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
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Package CI

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
package:
name: Flutter package quality
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Flutter 3.41.7
uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0
with:
flutter-version: 3.41.7
channel: stable
cache: true

- name: Verify pinned toolchain
shell: bash
run: |
flutter --version
flutter --version --machine | jq -e \
'.frameworkVersion == "3.41.7" and .dartSdkVersion == "3.11.5"'

- name: Run package release preflight
run: tool/release-preflight.sh

- name: Run Chrome text-transition contract tests
run: >-
flutter test --platform chrome
test/text_transition_test.dart
test/awesome_button_test.dart

- name: Upload informational Flutter coverage
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: flutter-awesome-button-coverage
path: coverage/lcov.info
if-no-files-found: ignore
retention-days: 14

portability:
name: Package host test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- name: Set up Flutter 3.41.7
uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0
with:
flutter-version: 3.41.7
channel: stable
cache: true

- name: Resolve package dependencies
run: flutter pub get --enforce-lockfile

- name: Run package-owned host tests
run: flutter test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
.pub/
build/
coverage/
temp/

# IDE
.idea/
Expand Down
21 changes: 21 additions & 0 deletions .pubignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
.dart_tool/
.github/
.pub/
api/
architecture/
build/
coverage/
DEVELOPMENT_ARCHITECTURE.md
doc/
temp/
test/
tool/

example/.dart_tool/
example/.flutter-plugins
example/.flutter-plugins-dependencies
example/.packages
example/build/
example/coverage/
example/test/
example/**/RunnerTests/
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## Unreleased

- Hardened callback freshness, terminal cancellation, progress completion, accessibility, Reduced Motion, large-text, RTL, validation, and theme resolution without selecting a release version.
- Added package-owned regressions and deterministic API, documentation, coverage, package-shape, and CI gates.
- Preserved explicitly requested flat visual styling while disabled; disabled state still blocks activation.
- Adopted the cross-platform text-transition contract with grapheme-aware
scrambling, measured frame publication, coordinated width timing, one-line
constrained fallback, stable target semantics, and Reduced Motion settlement.
- Prevented non-scrambled auto-width growth from publishing a longer label
before the face can fit it; shrink still swaps before contracting.
- Hardened final label settlement with conservative physical-pixel fit and a
generation-matched post-layout proof before stable wrapping resumes.
- Recorded the one-time `0.9.1` semantic comparison in
`tool/api/0.9.1-to-current.md`: it reports no breaking declarations and
classifies the new motion, accessibility, and canonical `x` fields as
additive changes, with `twitter` retained as a deprecated alias.

## 0.9.1

- Added API documentation across the public widget, theme, style, and helper
Expand Down
28 changes: 28 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Contributing

## Toolchain

- Flutter 3.41.7 (`cc0734ac71`)
- Dart 3.11.5
- `dart_apitool` 0.23.2 from the package lockfile

Bootstrap the package root with:

```sh
flutter pub get --enforce-lockfile
dart pub get --directory tool/dart_apitool --enforce-lockfile
```

The API tool uses an isolated package-owned manifest because its Analyzer dependency cannot share Flutter 3.41.7's SDK-pinned `meta` version. The isolation changes no library or publication dependency.

Run the complete non-publishing package gate with:

```sh
tool/release-preflight.sh
```

That command checks formatting, fatal analyzer diagnostics, package-owned tests and LCOV generation, the checked-in API model, public documentation with link validation in secure temporary storage, and the pub payload. It does not publish or mutate the reviewed API baseline.

To review an intentional public API change, run `dart run tool/update_api.dart`, inspect `tool/api/current.json`, and update `CHANGELOG.md` plus `tool/api/0.9.1-to-current.md` or later migration evidence. CI runs `tool/check-api-model.sh` and never rewrites the committed model.

Tests belong under `test/`. The source `example/` is part of the pub package and is a manual showcase, not an automated UI-test target. Platform assistive-technology, keyboard, RTL, large-text, and Reduced Motion checks remain manual runtime evidence.
17 changes: 17 additions & 0 deletions PERFORMANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Performance Evidence

Pass 5 treats performance evidence as informational and establishes no release threshold.

The package-owned benchmark mounts `AwesomeButton`, performs rapid callback, style, content, size, and progress-state replacements, and records the elapsed time for each deterministic update sequence. Run it with:

```sh
flutter test test/performance_baseline_test.dart --reporter expanded
```

Wall-clock values are emitted for declared local comparison only and are never asserted by CI. Future performance changes must retain the observable-behavior checks, rerun the same method on a declared host, and report before/after evidence. This baseline does not authorize a README frame-rate claim.

## Pass 5 local baseline

Recorded on 2026-08-30 using a 14-core Apple M3 Max MacBook Pro with 36 GB memory, macOS 26.6.2 (25G83), arm64, Flutter 3.41.7 (`cc0734ac71`), and Dart 3.11.5 in the Flutter widget-test environment. Reduced Motion was enabled to isolate configuration/update ownership from animation wall time.

After five unrecorded warm-up repetitions, 25 measured repetitions each mounted one package view and applied four callback/style/content/height/progress configurations. The median was 10.043 ms with a median absolute deviation of 0.787 ms. The benchmark also verifies that the final public widget owns the latest configuration before teardown. These values are informational and are not CI assertions.
Loading
Loading