Skip to content

test(flutter): add UI adapter and accessibility conformance for a2ui_flutter - #3586

Closed
gspencergoog wants to merge 17 commits into
mainfrom
test/flutter-adapter-conformance
Closed

gspencergoog wants to merge 17 commits into
mainfrom
test/flutter-adapter-conformance

Conversation

@gspencergoog

Copy link
Copy Markdown
Collaborator

Summary

Add declarative UI framework adapter conformance (conformance/core/adapter_conformance.yaml) and accessibility conformance (conformance/core/accessibility.yaml) coverage for a2ui_flutter (dart/a2ui_flutter).

What Changed

  • Flutter Adapter & Basic Catalog Refinements: Updated component_props.dart, node_view.dart, and catalog/basic/text_field.dart in dart/a2ui_flutter so ValidationResult error severity disables interactive controls while warning and info severities display non-blocking feedback without disabling controls, and aligned NodeView fallback widgets (pending, unknown-type, cyclic) and semantics metadata.
  • Declarative Adapter & Accessibility Conformance Runner: Added yaml: ^3.1.2 to dev_dependencies in dart/a2ui_flutter/pubspec.yaml and created dart/a2ui_flutter/test/adapter_conformance_test.dart executing all 6 cases of conformance/core/accessibility.yaml and all 13 cases of conformance/core/adapter_conformance.yaml against A2uiSurface.

Testing

  • cd dart/a2ui_flutter && flutter analyze && flutter test

🤖 Agent-generated

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces support for live, hidden, and dynamically bound accessibility attributes in NodeView, and exposes validationResults on ComponentProps to display non-blocking warning helper text in TextField. It also adds a comprehensive adapter conformance test suite. The reviewer feedback suggests retaining explicit type annotations on loop variables within the newly added test file to comply with Dart analyzer lints.

@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from f2b7622 to 6e8e62e Compare October 23, 2026 23:56
@gspencergoog
gspencergoog force-pushed the test/web-renderers-adapter-conformance branch from cc4abad to 34dd027 Compare October 23, 2026 23:56
…he schema

From v1.0 the validation functions return a ValidationResult rather than a
boolean, and the specification defines DynamicBoolean as a boolean, a path,
or a call returning a boolean or a validation result object, coerced to its
'valid' boolean. The SDKs applied that coercion only inside and, or and not,
by name, so any other DynamicBoolean argument that resolved to a
ValidationResult was handed to the function as an object, which is truthy
in JavaScript, Python and Dart alike: formatNumber(grouping: required(''))
grouped the digits, and Dart's Catalog.invoke rejected the argument as not
matching DynamicBoolean.

Each core SDK now reads a resolved ValidationResult by its validity wherever
the function's argument schema types the argument as DynamicBoolean, for
v1.0 and later catalogs, whether the function is defined in code or loaded
from a catalog document, and leaves every other value alone. Four
conformance cases in functions.yaml run on a v1.0 surface so the nested
validation call reaches the outer function through the engine.
@gspencergoog
gspencergoog force-pushed the test/web-renderers-adapter-conformance branch from 34dd027 to d243f7d Compare October 27, 2026 15:58
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 6e8e62e to 010a25e Compare October 27, 2026 15:58
@gspencergoog
gspencergoog removed this pull request from stack #3588 October 27, 2026 16:00
@gspencergoog
gspencergoog added this pull request to stack #3654 October 27, 2026 16:00
@gspencergoog
gspencergoog force-pushed the test/web-renderers-adapter-conformance branch from d243f7d to c9eeac1 Compare October 27, 2026 16:02
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 010a25e to 272ad43 Compare October 27, 2026 16:02
An optional list[DynamicBoolean] argument was left uncoerced because the
item annotation lookup did not look through the Optional. The member check
for DynamicBoolean is also bidirectional now, so a union with a repeated
member cannot match by length alone.
@gspencergoog
gspencergoog force-pushed the test/flutter-adapter-conformance branch from 272ad43 to ad6b9c3 Compare October 27, 2026 16:24
@gspencergoog
gspencergoog force-pushed the test/web-renderers-adapter-conformance branch from c9eeac1 to 5fbabe4 Compare October 27, 2026 16:24
Base automatically changed from test/web-renderers-adapter-conformance to main October 27, 2026 17:10
@gspencergoog
gspencergoog removed this pull request from stack #3654 October 27, 2026 17:10
@gspencergoog

Copy link
Copy Markdown
Collaborator Author

Consolidated into #3583, which now carries the shared suites and the adapter and accessibility conformance work for all five renderers (web, Flutter, SwiftUI). The commits and the resolved review threads from this PR are preserved there.

🤖 Agent-generated

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