[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reland] - Enable explicitChildNodes for the AlertDialog content #149597

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

TahaTesser
Copy link
Member
@TahaTesser TahaTesser commented Jun 3, 2024

Relands #149130
(With no change for now, waiting for actual Google testing results to make any changes if needed)

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 Jun 3, 2024
@TahaTesser TahaTesser marked this pull request as ready for review June 3, 2024 15:09
@TahaTesser
Copy link
Member Author

@goderbauer
This was reverted when Google testing didn't run on the original PR and it was merged, see #149130 (comment)

Filed this reland without changes to find the cause for failures, if any.

@goderbauer
Copy link
Member

I requested a "Google testing" run. Let's see.

@TahaTesser
Copy link
Member Author
TahaTesser commented Jun 6, 2024

@goderbauer
Looks like it is indeed failing. Is this a breaking change? Should we introduce a bool for this in the AlertDialog?

Copy link
Contributor
@justinmc justinmc left a comment

Choose a reason for hiding this comment

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

I've rerun the Google tests since I think the force push lost the previous results and I couldn't see why it failed.

@TahaTesser TahaTesser requested a review from justinmc June 20, 2024 14:23
@justinmc
Copy link
Contributor

@TahaTesser Can you push another merge commit to kick the tests? I think there is an unrelated failure happening in the Google tests today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AlertDialog content semantics merged
3 participants