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

Conversation

@goderbauer
Copy link
Member

@goderbauer goderbauer commented Mar 2, 2023

Fixes flutter/flutter#121742.

To be submitted after flutter/flutter#121751 (framework tests will fail before that is submitted).

@flutter-dashboard flutter-dashboard bot added the platform-web Code specifically for the web engine label Mar 2, 2023
@goderbauer goderbauer marked this pull request as ready for review March 2, 2023 07:40
Copy link
Contributor

@gspencergoog gspencergoog left a comment

Choose a reason for hiding this comment

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

32384589-a60f0e74-c078-11e7-9bc1-e5b5287aea9d

@goderbauer
Copy link
Member Author

@ditman Could you take a look at the web_ui changes, when you have a chance? Thanks.

Copy link
Member

@ditman ditman left a comment

Choose a reason for hiding this comment

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

The changes look good to me. Especially removing the indirection between the base abstract class, and the implementation via the "configuration" object. That was something that always made me confused when I looked at the View class hierarchy on the web!

Locale get locale;

List<Locale> get locales => configuration.locales;
List<Locale> get locales;
Copy link
Member

Choose a reason for hiding this comment

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

Thanks for doing this, the indirection here with the configuration getter that was overridden in the "engine" platform dispatcher was very confusing!

EnginePlatformDispatcher.instance.configuration.accessibilityFeatures
as EngineAccessibilityFeatures;
final ui.PlatformConfiguration newConfiguration =
final PlatformConfiguration newConfiguration =
Copy link
Member

Choose a reason for hiding this comment

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

💯


part of ui;

abstract class FlutterView {
Copy link
Member

Choose a reason for hiding this comment

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

Again, thanks for making this fully abstract.

class PlatformConfiguration {
/// Const constructor for [PlatformConfiguration].
const PlatformConfiguration({
class _PlatformConfiguration {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we keeping the configurations and making them private instead of fully removing them? Same question for _ViewConfiguration.

Copy link
Member Author

Choose a reason for hiding this comment

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

I missed this comment just before I slapped the autosubmit label on. Sorry! You're right, though, we should be able to remove the private classes altogether now and store the values directly on the object. The only complication may be the window singleton, which currently makes use of the fact that two FlutterView instances can share the same ViewConfiguration. That could be resolved, though.

I may look at that clean-up in a follow-up.

@goderbauer goderbauer added the autosubmit Merge PR when tree becomes green via auto submit App label Mar 2, 2023
@auto-submit auto-submit bot merged commit 06ac179 into flutter:main Mar 2, 2023
@goderbauer goderbauer deleted the removeConfigs branch March 2, 2023 23:15
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
chinmaygarde pushed a commit to chinmaygarde/flutter_engine that referenced this pull request Mar 3, 2023
Remove PlatformConfiguration and ViewConfiguration
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Mar 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-web Code specifically for the web engine

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove ViewConfiguration and PlatformConfiguration from dart:ui

4 participants