fix: ui_playground#59
Conversation
# Conflicts: # .claude/settings.local.json
There was a problem hiding this comment.
Pull request overview
This PR introduces a UI Playground entry point in the example app (with generated component registrations) and adds a small CLI + shell scripts to automate formatting/analyzing/build_runner and scaffold new components/building blocks.
Changes:
- Add
ui_playgrounddependencies and a newUiPlaygroundScreen, linked from the home screen. - Commit a generated
*.ui_playground.dartaggregator and exclude these files from analyzer warnings. - Add
tools/shell scripts plus atools/cliDart CLI to scaffold component/building-block code and example library entries.
Reviewed changes
Copilot reviewed 7 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/packages_get.sh | Adds a helper script to fetch Flutter packages. |
| tools/format.sh | Adds a helper script to run dart format. |
| tools/cli/pubspec.yaml | Introduces a new Dart CLI package definition. |
| tools/cli/pubspec.lock | Locks dependencies for the CLI package. |
| tools/cli/bin/widget_library.dart | CLI entrypoint for scaffolding components/building blocks. |
| tools/cli/bin/src/utils.dart | String case conversion helpers for the scaffolder. |
| tools/cli/bin/src/component_library.dart | Scaffolds component + example component-library files. |
| tools/cli/bin/src/building_block_library.dart | Scaffolds building-block + example building-block library files. |
| tools/build_runner_build.sh | Adds a helper script to run build_runner in example/. |
| tools/analyze.sh | Adds a helper script to run flutter analyze. |
| example/pubspec.yaml | Adds UI Playground deps and build_runner; introduces dependency overrides. |
| example/pubspec.lock | Updates lockfile to include UI Playground + build_runner dependency graph. |
| example/lib/src/ui_playground/impaktfull_ui_components.ui_playground.dart | Adds generated UI Playground registry for components. |
| example/lib/src/ui_playground/impaktfull_ui_components.dart | Adds UI Playground annotation/config driving codegen. |
| example/lib/src/screen/ui_playground/ui_playground_screen.dart | Adds a screen hosting the UI Playground app/sections. |
| example/lib/src/screen/home/home_screen.dart | Adds navigation entry to UI Playground from the home screen. |
| analysis_options.yaml | Excludes *.ui_playground.dart files from analysis. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| dependency_overrides: | ||
| ui_playground: | ||
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground | ||
| ui_playground_annotations: | ||
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground_annotations | ||
| ui_playground_generator: | ||
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground_generator | ||
| impaktfull_ui: | ||
| path: .. | ||
|
|
There was a problem hiding this comment.
dependency_overrides contains absolute local paths under /Users/..., which will break for other developers and CI (pub get will fail and the lockfile will pin to non-existent paths). Replace these with hosted/git/relative path overrides appropriate for the repo, or remove overrides before merging and regenerate pubspec.lock.
| dependency_overrides: | |
| ui_playground: | |
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground | |
| ui_playground_annotations: | |
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground_annotations | |
| ui_playground_generator: | |
| path: /Users/vanlooverenkoen/work/open_source/impaktfull/flutter_ui_playground/ui_playground_generator | |
| impaktfull_ui: | |
| path: .. |
| cd example | ||
| flutter pub run build_runner build --delete-conflicting-outputs No newline at end of file |
There was a problem hiding this comment.
This script assumes it’s invoked from the repo root (cd example) and uses flutter directly while other tooling scripts use fvm. To make it robust, cd relative to the script location (or repo root) and consistently use fvm flutter pub run build_runner ...; also consider set -euo pipefail so failures don’t go unnoticed.
| cd example | |
| flutter pub run build_runner build --delete-conflicting-outputs | |
| set -euo pipefail | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| cd "${SCRIPT_DIR}/../example" | |
| fvm flutter pub run build_runner build --delete-conflicting-outputs |
No description provided.