Add Flutter DevTools extension for inspecting glade_forms models#97
Add Flutter DevTools extension for inspecting glade_forms models#97
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/netglade/glade_forms~97 Documentation is deployed and generated using docs.page. |
Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
…chitecture Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
…cript Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
|
@copilot glade_forms_devtools_extension/pubspec.yaml is included in the workspace from ./pubspec.yaml, but does not have |
Co-authored-by: tenhobi <5287596+tenhobi@users.noreply.github.com>
|
@copilot Improve docs pages with info about how to use new devtools |
Co-authored-by: petrnymsa <21087414+petrnymsa@users.noreply.github.com>
Enhanced in 4330c99 with comprehensive usage instructions including: docs/devtools.mdx:
docs/index.mdx:
README.md:
|
|
@copilot Extension does not provide any way to inspect glade forms, in UI there are only placeholders. Implement it again |
Co-authored-by: petrnymsa <21087414+petrnymsa@users.noreply.github.com>
Co-authored-by: petrnymsa <21087414+petrnymsa@users.noreply.github.com>
# Conflicts: # glade_forms/lib/src/model/glade_model.dart
|
It should work now. Need some final polishing |
glade_forms_devtools_extension/lib/src/widgets/detail/model_state_card.dart
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
This PR adds a comprehensive Flutter DevTools extension for the glade_forms package, enabling real-time inspection and debugging of form models during development. The extension follows industry-standard patterns (similar to drift and provider packages) with a separate extension package that builds and copies output to the main package.
Changes:
- Added DevTools extension infrastructure with service extension protocol for app-to-DevTools communication
- Implemented live model inspection UI with master-detail layout showing model state, input values, validation errors, and real-time updates
- Introduced breaking change requiring
GladeForms.initialize()call in app'smain()for DevTools integration
Reviewed changes
Copilot reviewed 69 out of 69 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| glade_forms/lib/src/glade_forms_api.dart | New API entry point with GladeForms.initialize() method |
| glade_forms/lib/src/devtools/devtools_registry.dart | Registry tracking active models and service extension protocol |
| glade_forms/lib/src/devtools/devtools_serialization.dart | JSON serialization extensions for models and inputs |
| glade_forms/lib/src/model/glade_model_base.dart | Added DevTools registration and debugKey property |
| glade_forms/lib/src/model/glade_model.dart | Auto-registers models with DevTools on construction |
| glade_forms/lib/src/model/glade_composed_model.dart | Registers composed models and fixes dispose logic |
| glade_forms_devtools_extension/* | Complete DevTools extension package with UI components |
| glade_forms/extension/devtools/config.yaml | Extension configuration for Flutter DevTools |
| glade_forms/CHANGELOG.md | Version 6.0.0 release notes with breaking changes |
| glade_forms/README.md | Documentation for DevTools extension usage |
| docs/* | Updated documentation with DevTools information |
| storybook/macos/Flutter/ephemeral/* | Generated Flutter files (should not be committed) |
| pubspec.yaml | Added workspace member and build scripts |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
DevTools integration for glade_forms
This PR adds a fully functional Flutter DevTools extension that provides real-time inspection and debugging of glade_forms models during development.
✅ Rebased on latest main - Now compatible with GladeModelBase architecture and all latest changes.
Architectural Decision:
Following the pattern used by drift and provider packages:
glade_forms_devtools_extension)glade_forms/extension/devtools/build/🎨 Extension Features (Fully Implemented):
🔧 Technical Implementation:
🚀 Ready to Build:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.