Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@tugorez
Copy link
Contributor

@tugorez tugorez commented Jan 17, 2024

This change augments the platform dispatcher to allow the engine <===> framework to communicate flutter and platform focus changes.

Relevant Issues are:

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@tugorez tugorez marked this pull request as ready for review January 18, 2024 21:56
@tugorez tugorez changed the title Add the focus view change and focus state change classes Add the focus state related methods to the platform dispatcher Jan 18, 2024
@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact "@test-exemption-reviewer" in the #hackers channel in Chat (don't just cc them here, they won't see it! Use Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

I like the structure of this API now. I mostly have suggestions for improving the docs.

@gspencergoog Should also take a look at this in case he ends up implementing the framework side that will consume this API.

@github-actions github-actions bot added the platform-web Code specifically for the web engine label Jan 29, 2024
Copy link
Member

@goderbauer goderbauer left a comment

Choose a reason for hiding this comment

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

API LGTM


/// Represents the focus state of a given [FlutterView].
///
/// This enum will be associated with a [FlutterView] by instantiating a [ViewFocusEvent].

This comment was marked as resolved.

@zanderso
Copy link
Member

zanderso commented Feb 2, 2024

This PR is causing analysis to fail in snippet code on rolling to the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/73029/overview. I added the revert tag.

@zanderso
Copy link
Member

zanderso commented Feb 2, 2024

RUNNING: cd .; bin/cache/dart-sdk/bin/dart --enable-asserts /b/s/w/ir/x/w/flutter/dev/bots/analyze_snippet_code.dart --verbose
workingDirectory: /b/s/w/ir/x/w/flutter, executable: /b/s/w/ir/x/w/flutter/bin/cache/dart-sdk/bin/dart, arguments: [--enable-asserts, /b/s/w/ir/x/w/flutter/dev/bots/analyze_snippet_code.dart, --verbose]
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:320:7: The function 'ViewFocusEvent' isn't defined (expression) (undefined_function)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:322:16: Undefined name 'ViewFocusState' (expression) (undefined_identifier)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:323:20: Undefined name 'ViewFocusDirection' (expression) (undefined_identifier)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:338:7: The function 'ViewFocusEvent' isn't defined (expression) (undefined_function)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:340:16: Undefined name 'ViewFocusState' (expression) (undefined_identifier)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:341:20: Undefined name 'ViewFocusDirection' (expression) (undefined_identifier)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:376:16: Undefined name 'ViewFocusSate' (statement) (undefined_identifier)
bin/cache/pkg/sky_engine/lib/ui/platform_dispatcher.dart:377:20: Undefined name 'ViewFocusDirection' (statement) (undefined_identifier)
Found 8 snippet code errors.
See the documentation at the top of dev/bots/analyze_snippet_code.dart for details.

@auto-submit auto-submit bot removed the revert Label used to revert changes in a closed and merged pull request. label Feb 2, 2024
@tugorez
Copy link
Contributor Author

tugorez commented Feb 2, 2024

This PR is causing analysis to fail in snippet code on rolling to the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/73029/overview. I added the revert tag.

Oops, thanks for catching this. @zanderso is there any reason we don't have those linter checks enabled as part of the engine commit process?

@tugorez
Copy link
Contributor Author

tugorez commented Feb 2, 2024

This PR is causing analysis to fail in snippet code on rolling to the framework: https://ci.chromium.org/ui/p/flutter/builders/try/Linux%20analyze/73029/overview. I added the revert tag.

Oops, thanks for catching this. @zanderso is there any reason we don't have those linter checks enabled as part of the engine commit process?

Also is there an easy way to verify these things locally?

@zanderso
Copy link
Member

zanderso commented Feb 2, 2024

I'm not familiar with how the snippet analysis is implemented. I vaguely recall that @gspencergoog might know more about this.

@gspencergoog
Copy link
Contributor

Snippet analysis happens in dev/bots/analyze_snippet_code.dart in the flutter repo. You can run it locally, but you'd have to (manually?) put the engine artifacts into the cache directory of your local flutter repo for it to catch these.

Perhaps that script should be added as part of the presumbits that the engine runs on the Flutter repo?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants