Skip to content

Conversation

@TahaTesser
Copy link
Member

fixes AlertDialog content semantics merged

Code sample

expand to view the code sample
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // showSemanticsDebugger: true,
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                const Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Text('Some text'),
                    Text('More text'),
                  ],
                ),
                Builder(builder: (BuildContext context) {
                  return ElevatedButton(
                    onPressed: () {
                      showDialog<void>(
                        context: context,
                        builder: (BuildContext context) {
                          return AlertDialog(
                            title: const Text('Dialog Title'),
                            content: const Column(
                              children: <Widget>[
                                Text('Some text'),
                                Text('More text'),
                              ],
                            ),
                            actions: <Widget>[
                              TextButton(
                                onPressed: () {
                                  Navigator.of(context).pop();
                                },
                                child: const Text('Close'),
                              ),
                            ],
                          );
                        },
                      );
                    },
                    child: const Text('Open Dialog'),
                  );
                }),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

Before vs After

Screenshot 2024-05-27 at 14 59 57

Screenshot 2024-05-27 at 14 56 04

Pre-launch Checklist

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

@github-actions github-actions bot added framework flutter/packages/flutter repository. See also f: labels. f: material design flutter/packages/flutter/material repository. labels May 27, 2024
@TahaTesser TahaTesser marked this pull request as ready for review May 27, 2024 12:11
@TahaTesser TahaTesser requested a review from goderbauer May 27, 2024 12:11
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.

LGTM

@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

For more guidance, visit Writing a golden file test for package:flutter.

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

Changes reported for pull request #149130 at sha c12ffd25509682378199294ecdca336ef856edc8

@flutter-dashboard flutter-dashboard bot added the will affect goldens Changes to golden files label May 29, 2024
@Piinks Piinks added the autosubmit Merge PR when tree becomes green via auto submit App label May 29, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label May 29, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented May 29, 2024

auto label is removed for flutter/flutter/149130, due to - The status or check suite Google testing has failed. Please fix the issues identified (or deflake) before re-applying this label.

@Piinks
Copy link
Contributor

Piinks commented May 30, 2024

Reason for revert: Google testing did not run on this PR and multiple semantics screen shots from internal testing look incorrect.

@Piinks Piinks added the revert Autorevert PR (with "Reason for revert:" comment) label May 30, 2024
auto-submit bot pushed a commit that referenced this pull request May 30, 2024
@auto-submit auto-submit bot removed the revert Autorevert PR (with "Reason for revert:" comment) label May 30, 2024
auto-submit bot added a commit that referenced this pull request May 30, 2024
…149130)" (#149333)

Reverts: #149130
Initiated by: Piinks
Reason for reverting: Google testing did not run on this PR and multiple semantics screen shots from internal testing look incorrect. 
Original PR Author: TahaTesser

Reviewed By: {goderbauer}

This change reverts the following previous change:
fixes [AlertDialog content semantics merged](#147574)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // showSemanticsDebugger: true,
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                const Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Text('Some text'),
                    Text('More text'),
                  ],
                ),
                Builder(builder: (BuildContext context) {
                  return ElevatedButton(
                    onPressed: () {
                      showDialog<void>(
                        context: context,
                        builder: (BuildContext context) {
                          return AlertDialog(
                            title: const Text('Dialog Title'),
                            content: const Column(
                              children: <Widget>[
                                Text('Some text'),
                                Text('More text'),
                              ],
                            ),
                            actions: <Widget>[
                              TextButton(
                                onPressed: () {
                                  Navigator.of(context).pop();
                                },
                                child: const Text('Close'),
                              ),
                            ],
                          );
                        },
                      );
                    },
                    child: const Text('Open Dialog'),
                  );
                }),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>

### Before vs After

![Screenshot 2024-05-27 at 14 59 57](https://github.com/flutter/flutter/assets/48603081/3b231a7a-db71-4dbf-bd4a-dd44a537cae8)

![Screenshot 2024-05-27 at 14 56 04](https://github.com/flutter/flutter/assets/48603081/219c1de5-ad35-49b3-a80f-4f036184e22b)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 30, 2024
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
…9130)

fixes [AlertDialog content semantics merged](flutter#147574)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // showSemanticsDebugger: true,
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                const Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Text('Some text'),
                    Text('More text'),
                  ],
                ),
                Builder(builder: (BuildContext context) {
                  return ElevatedButton(
                    onPressed: () {
                      showDialog<void>(
                        context: context,
                        builder: (BuildContext context) {
                          return AlertDialog(
                            title: const Text('Dialog Title'),
                            content: const Column(
                              children: <Widget>[
                                Text('Some text'),
                                Text('More text'),
                              ],
                            ),
                            actions: <Widget>[
                              TextButton(
                                onPressed: () {
                                  Navigator.of(context).pop();
                                },
                                child: const Text('Close'),
                              ),
                            ],
                          );
                        },
                      );
                    },
                    child: const Text('Open Dialog'),
                  );
                }),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>

### Before vs After

![Screenshot 2024-05-27 at 14 59 57](https://github.com/flutter/flutter/assets/48603081/3b231a7a-db71-4dbf-bd4a-dd44a537cae8)

![Screenshot 2024-05-27 at 14 56 04](https://github.com/flutter/flutter/assets/48603081/219c1de5-ad35-49b3-a80f-4f036184e22b)
victorsanni pushed a commit to victorsanni/flutter that referenced this pull request May 31, 2024
…lutter#149130)" (flutter#149333)

Reverts: flutter#149130
Initiated by: Piinks
Reason for reverting: Google testing did not run on this PR and multiple semantics screen shots from internal testing look incorrect. 
Original PR Author: TahaTesser

Reviewed By: {goderbauer}

This change reverts the following previous change:
fixes [AlertDialog content semantics merged](flutter#147574)

### Code sample

<details>
<summary>expand to view the code sample</summary> 

```dart
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @OverRide
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      // showSemanticsDebugger: true,
      home: Scaffold(
        body: SafeArea(
          child: Center(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.spaceEvenly,
              children: <Widget>[
                const Column(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Text('Some text'),
                    Text('More text'),
                  ],
                ),
                Builder(builder: (BuildContext context) {
                  return ElevatedButton(
                    onPressed: () {
                      showDialog<void>(
                        context: context,
                        builder: (BuildContext context) {
                          return AlertDialog(
                            title: const Text('Dialog Title'),
                            content: const Column(
                              children: <Widget>[
                                Text('Some text'),
                                Text('More text'),
                              ],
                            ),
                            actions: <Widget>[
                              TextButton(
                                onPressed: () {
                                  Navigator.of(context).pop();
                                },
                                child: const Text('Close'),
                              ),
                            ],
                          );
                        },
                      );
                    },
                    child: const Text('Open Dialog'),
                  );
                }),
              ],
            ),
          ),
        ),
      ),
    );
  }
}
```

</details>

### Before vs After

![Screenshot 2024-05-27 at 14 59 57](https://github.com/flutter/flutter/assets/48603081/3b231a7a-db71-4dbf-bd4a-dd44a537cae8)

![Screenshot 2024-05-27 at 14 56 04](https://github.com/flutter/flutter/assets/48603081/219c1de5-ad35-49b3-a80f-4f036184e22b)
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Jun 1, 2024
flutter/flutter@c85fa6a...7eebe29

2024-05-30 engine-flutter-autoroll@skia.org Roll Packages from 31d3329 to 910fabb (11 revisions) (flutter/flutter#149321)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from fb64b9a4e6f2 to 2fedfd3cc6e5 (2 revisions) (flutter/flutter#149320)
2024-05-30 yinxulolol@gmail.com Fix `Slider` throws an error when `_labelPainter` text is null (flutter/flutter#148462)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 5500c1a3969a to fb64b9a4e6f2 (1 revision) (flutter/flutter#149307)
2024-05-30 tessertaha@gmail.com Enable `explicitChildNodes` for the `AlertDialog` content (flutter/flutter#149130)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 0c95e85dfbf4 to 5500c1a3969a (1 revision) (flutter/flutter#149304)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 19707e811b60 to 0c95e85dfbf4 (1 revision) (flutter/flutter#149300)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 4adf453b6d68 to 19707e811b60 (1 revision) (flutter/flutter#149291)
2024-05-30 jonahwilliams@google.com disable Impeller on external texture test. (flutter/flutter#149292)
2024-05-30 engine-flutter-autoroll@skia.org Roll Flutter Engine from 8d5d14a1db95 to 4adf453b6d68 (12 revisions) (flutter/flutter#149290)
2024-05-30 kevinjchisholm@google.com Update 3.22.1 release notes to include missing fix. (flutter/flutter#148999)
2024-05-30 engine-flutter-autoroll@skia.org Manual roll Flutter Engine from 60968ee3bde7 to 8d5d14a1db95 (1 revision) (flutter/flutter#149263)
2024-05-29 98614782+auto-submit[bot]@users.noreply.github.com Reverts "Prevent LayoutBuilder from rebuilding more than once (#147856)" (flutter/flutter#149279)
2024-05-29 danny@tuppeny.com Unskip expression evaluation test (flutter/flutter#149253)
2024-05-29 yjbanov@google.com temporarily disable SemanticsAction tests to unblock engine change (flutter/flutter#149274)
2024-05-29 30870216+gaaclarke@users.noreply.github.com Adds benchmark for rrect_blur. (flutter/flutter#149261)
2024-05-29 31859944+LongCatIsLooong@users.noreply.github.com Prevent LayoutBuilder from rebuilding more than once (flutter/flutter#147856)
2024-05-29 32538273+ValentinVignal@users.noreply.github.com Add test for inherited_theme.0.dart (flutter/flutter#149120)
2024-05-29 73608287+ellet0@users.noreply.github.com Update progress_indicator.dart to indicate the adaptive option is for both macOS and iOS (flutter/flutter#145246)
2024-05-29 linxunfeng@yeah.net _ModalScopeStatus as InheritedModel (flutter/flutter#149022)
2024-05-29 32538273+ValentinVignal@users.noreply.github.com Add test for radio.toggleable.0.dart (flutter/flutter#149153)
2024-05-29 31859944+LongCatIsLooong@users.noreply.github.com Add a sentinel value for `TextStyle.height` (flutter/flutter#149049)
2024-05-29 katelovett@google.com Remove dynamic_layouts from issue template (flutter/flutter#149252)
2024-05-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from 30aa720d4999 to 60968ee3bde7 (1 revision) (flutter/flutter#149255)
2024-05-29 engine-flutter-autoroll@skia.org Roll Flutter Engine from b26e1b023cdb to 30aa720d4999 (7 revisions) (flutter/flutter#149249)
2024-05-29 engine-flutter-autoroll@skia.org Roll Packages from a933c30 to 31d3329 (6 revisions) (flutter/flutter#149246)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC camillesimon@google.com,rmistry@google.com,stuartmorgan@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 2, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jun 3, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. will affect goldens Changes to golden files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AlertDialog content semantics merged

3 participants