Skip to content

feat: add issues property to CodeEditor for Python-side analysis#6407

Open
FeodorFitsner wants to merge 5 commits intorelease/v0.85.0from
code-editor-analyze
Open

feat: add issues property to CodeEditor for Python-side analysis#6407
FeodorFitsner wants to merge 5 commits intorelease/v0.85.0from
code-editor-analyze

Conversation

@FeodorFitsner
Copy link
Copy Markdown
Contributor

@FeodorFitsner FeodorFitsner commented Apr 10, 2026

Summary

  • Add Issue and IssueType types plus an issues property on CodeEditor so Python code can push error markers into the gutter
  • Disable the built-in Dart analyzer so user-controlled analysis (via on_change) is the source of truth
  • Fix CodeEditor background not filling the expanded area when expand=True
  • Add JSON and Python analyzer examples (example_4, example_5)

Test plan

  • Run examples/controls/code_editor/example_4 and verify JSON error markers appear, update on edit, and clear when JSON becomes valid
  • Run examples/controls/code_editor/example_5 and verify Python syntax error markers appear, update on edit, and clear when syntax becomes valid
  • Run examples/controls/code_editor/example_2 and verify the editor background fills the entire expanded area

Summary by Sourcery

Expose Python-driven analysis issues in CodeEditor and update examples and layout to showcase gutter error markers and correct expansion behavior.

New Features:

  • Add Issue and IssueType types and an issues property on CodeEditor to surface code analysis issues from Python into the editor gutter.
  • Introduce JSON and Python analyzer examples demonstrating debounced, Python-side validation that drives gutter error markers.

Bug Fixes:

  • Ensure CodeEditor correctly fills the available space when expand is enabled in the example layout.

Enhancements:

  • Disable the built-in Dart-side code analysis in favor of issues supplied from Python and wire them through the Flutter controller.
  • Adjust the CodeEditor example layout and styling to better demonstrate the expanded editor and associated controls.

When expand=True, use LayoutBuilder to measure available height and
ConstrainedBox to ensure CodeField stretches to fill the entire area.
Add Issue/IssueType types and an issues property that lets Python code
push error markers to the editor gutter. The built-in Dart analyzer is
disabled in favor of user-controlled analysis via on_change handlers.

Add JSON and Python analyzer examples.
Copy link
Copy Markdown
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We've reviewed this pull request using the Sourcery rules engine

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 10, 2026

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 17bc9ba
Status: ✅  Deploy successful!
Preview URL: https://488e6f91.flet-website-v2.pages.dev
Branch Preview URL: https://code-editor-analyze.flet-website-v2.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Apr 10, 2026

Deploying flet-examples with  Cloudflare Pages  Cloudflare Pages

Latest commit: 17bc9ba
Status: ✅  Deploy successful!
Preview URL: https://81712c1a.flet-examples.pages.dev
Branch Preview URL: https://code-editor-analyze.flet-examples.pages.dev

View logs

@FeodorFitsner FeodorFitsner mentioned this pull request Apr 10, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant