Skip to content

Commit 69038d6

Browse files
authored
feat: improve state management, interaction patterns, accessibility, and test coverage (#14)
1 parent ee3bd87 commit 69038d6

159 files changed

Lines changed: 30058 additions & 7489 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/semantics_reference.md

Lines changed: 675 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ jobs:
3838
uses: subosito/flutter-action@v2
3939
with:
4040
channel: 'stable'
41-
flutter-version: 3.32.0
4241
cache: true
4342

4443
- name: Install root dependencies
@@ -57,7 +56,7 @@ jobs:
5756
shell: bash
5857

5958
- name: Run root tests
60-
run: flutter test --coverage
59+
run: flutter test --coverage
6160

6261
- name: Setup LCOV
6362
uses: hrishikesh-kadam/setup-lcov@v1
@@ -70,4 +69,32 @@ jobs:
7069
coverage-files: coverage/lcov.info
7170
minimum-coverage: 85
7271
artifact-name: code-coverage-report
73-
github-token: ${{ secrets.GITHUB_TOKEN }}
72+
github-token: ${{ secrets.GITHUB_TOKEN }}
73+
74+
integration-tests:
75+
name: Integration Tests
76+
runs-on: macos-latest
77+
needs: test
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@v4
81+
82+
- name: Set up Flutter
83+
uses: subosito/flutter-action@v2
84+
with:
85+
channel: 'stable'
86+
cache: true
87+
88+
- name: Enable macOS desktop
89+
run: flutter config --enable-macos-desktop
90+
91+
- name: Install root dependencies
92+
run: flutter pub get
93+
94+
- name: Install example dependencies
95+
run: flutter pub get
96+
working-directory: example
97+
98+
- name: Run all integration tests
99+
working-directory: example
100+
run: flutter test -r compact -d flutter-tester integration_test/all_tests.dart

.github/workflows/deploy-web.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy Kitchen Sink (Web)
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: write
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build-deploy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-java@v4
21+
with:
22+
distribution: temurin
23+
java-version: '17'
24+
- uses: subosito/flutter-action@v2
25+
with:
26+
channel: 'stable'
27+
cache: true
28+
- run: flutter --version
29+
- run: flutter pub get
30+
- run: flutter pub get
31+
working-directory: example
32+
- name: Ensure web platform files
33+
run: |
34+
if [ ! -d "web" ]; then
35+
flutter create --platforms web .
36+
fi
37+
working-directory: example
38+
- run: flutter config --enable-web
39+
- run: flutter build web --release --base-href /naked_ui/
40+
working-directory: example
41+
- name: Deploy to GitHub Pages
42+
uses: peaceiris/actions-gh-pages@v4
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: example/build/web
46+
force_orphan: true
47+
publish_branch: gh-pages
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Android Integration Tests
2+
3+
on:
4+
workflow_dispatch:
5+
6+
# Avoid overlapping runs for same branch/PR
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
integration-tests-android:
13+
name: Run integration_test on Android emulator
14+
runs-on: ubuntu-latest
15+
timeout-minutes: 45
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
21+
- name: Set up Java 17
22+
uses: actions/setup-java@v4
23+
with:
24+
distribution: temurin
25+
java-version: '17'
26+
cache: gradle
27+
28+
- name: Set up Flutter
29+
uses: subosito/flutter-action@v2
30+
with:
31+
channel: 'stable'
32+
cache: true
33+
34+
- name: Flutter doctor
35+
run: flutter doctor -v
36+
37+
- name: Resolve root dependencies
38+
run: flutter pub get
39+
40+
- name: Resolve example dependencies
41+
run: flutter pub get
42+
working-directory: example
43+
44+
- name: Ensure Android platform files for example
45+
run: |
46+
if [ ! -d "android" ]; then
47+
flutter create --platforms android .
48+
fi
49+
working-directory: example
50+
51+
- name: Launch emulator and run integration tests
52+
uses: reactivecircus/android-emulator-runner@v2
53+
with:
54+
api-level: 34
55+
target: default
56+
arch: x86_64
57+
profile: pixel_6
58+
force-avd-creation: true
59+
disable-animations: true
60+
script: |
61+
adb devices -l
62+
cd example
63+
flutter test integration_test/all_tests.dart -d emulator-5554
64+

.github/workflows/release-please.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
name: Publish to pub.dev
22

33
on:
4-
workflow_dispatch:
5-
64
push:
75
tags:
86
- 'v[0-9]+.[0-9]+.[0-9]+*'
@@ -13,13 +11,20 @@ concurrency:
1311
jobs:
1412
publish:
1513
name: Publish to pub.dev
16-
environment: Production
14+
environment: Production
1715
runs-on: ubuntu-latest
16+
permissions:
17+
id-token: write
18+
1819

1920
steps:
2021
- name: Checkout repository
2122
uses: actions/checkout@v4
2223

24+
- name: Set up Dart (provision OIDC)
25+
uses: dart-lang/setup-dart@v1
26+
27+
2328
- name: Set up Flutter
2429
uses: subosito/flutter-action@v2
2530
with:
@@ -35,8 +40,8 @@ jobs:
3540
- name: Run tests
3641
run: flutter test
3742

38-
- name: 'Dart package'
39-
uses: k-paxian/dart-package-publisher@master
40-
with:
41-
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }}
42-
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }}
43+
- name: Publish - dry run
44+
run: dart pub publish --dry-run
45+
46+
- name: Publish to pub.dev (OIDC)
47+
run: dart pub publish --force

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,32 @@
1+
## [0.1.0] - 2025-08-27
2+
3+
### ⚠️ BREAKING CHANGES
4+
5+
- **API Change**: Standardized state callback naming convention across all components:
6+
- `onStateHover``onHoverChange`
7+
- `onStatePressed``onPressChange`
8+
- `onStateFocus``onFocusChange`
9+
- `onStateDragging``onDragChange` (NakedSlider)
10+
- `onStateSelected``onSelectChange` (NakedRadio, NakedSelectItem)
11+
- **Removed Callbacks**:
12+
- `onDisabledState` removed from NakedButton and NakedMenu (use `enabled` property instead)
13+
- **Migration Required**: Existing code using the old callback names will need updates
14+
- See [MIGRATION.md](./MIGRATION.md) for detailed migration instructions
15+
16+
### Added
17+
- Comprehensive migration guide (MIGRATION.md) for upgrading from pre-v0.1.0 versions
18+
19+
### Fixed
20+
- Inconsistent callback naming patterns across components
21+
- Updated outdated documentation to reflect current API conventions
22+
23+
### Documentation
24+
- Updated all widget documentation to match implemented API
25+
- Fixed outdated examples in documentation files
26+
- Ensured consistency between code and documentation
27+
28+
---
29+
130
## 0.0.1-dev.1
231

332
- **REFACTOR**: Select (#596).

0 commit comments

Comments
 (0)