Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 37 additions & 8 deletions packages/devtools_app/lib/src/framework/about_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,30 @@ class DevToolsAboutDialog extends StatelessWidget {
),
],
),
const SizedBox(height: defaultSpacing),
...dialogSubHeader(theme, 'Feedback'),
const SizedBox(height: denseSpacing),
Wrap(
children: const [
Text('Encountered an issue? Let us know at '),
_FeedbackLink(),
Text(','),
Text('.'),
],
),
const SizedBox(height: defaultSpacing),
...dialogSubHeader(theme, 'Contributing'),
Wrap(
children: const [
Text('Want to contribute to DevTools? Please see our '),
_ContributingLink(),
Text(' guide, or '),
],
),
Wrap(
children: const [
Text('or connect with us on '),
Text('connect with us on '),
_DiscordLink(),
Text('.'),
],
)
),
],
),
actions: const [
Expand All @@ -82,19 +90,40 @@ class _FeedbackLink extends StatelessWidget {
}
}

class _ContributingLink extends StatelessWidget {
const _ContributingLink({Key? key}) : super(key: key);

static const _contributingGuideUrl =
'https://github.com/flutter/devtools/blob/master/CONTRIBUTING.md';

@override
Widget build(BuildContext context) {
return RichText(
text: LinkTextSpan(
link: const Link(
display: 'CONTRIBUTING',
url: _contributingGuideUrl,
gaScreenName: gac.devToolsMain,
gaSelectedItemDescription: gac.contributingLink,
),
context: context,
),
);
}
}

class _DiscordLink extends StatelessWidget {
const _DiscordLink({Key? key}) : super(key: key);

static const _channelLink =
'https://discord.com/channels/608014603317936148/958862085297672282';
static const _discordWikiUrl = 'https://github.com/flutter/flutter/wiki/Chat';

@override
Widget build(BuildContext context) {
return RichText(
text: LinkTextSpan(
link: const Link(
display: 'Discord',
url: _channelLink,
url: _discordWikiUrl,
gaScreenName: gac.devToolsMain,
gaSelectedItemDescription: gac.discordLink,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const appDisconnected = 'appDisconnected';
// Main bar UX actions:
const feedbackLink = 'feedback';
const feedbackButton = 'feedbackButton';
const contributingLink = 'contributing';
const discordLink = 'discord';

// Inspector UX actions:
Expand Down
17 changes: 10 additions & 7 deletions packages/devtools_app/test/shared/about_dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,23 @@ void main() {
expect(find.text('About DevTools'), findsOneWidget);
});

testWidgets('DevTools section', (WidgetTester tester) async {
testWidgets('content renders correctly', (WidgetTester tester) async {
await tester.pumpWidget(wrap(aboutDialog));
expect(find.text('About DevTools'), findsOneWidget);
expect(findSubstring(aboutDialog, devtools.version), findsOneWidget);
expect(find.text('release notes'), findsOneWidget);
});

testWidgets('Feedback section', (WidgetTester tester) async {
await tester.pumpWidget(wrap(aboutDialog));
expect(find.text('Feedback'), findsOneWidget);
expect(find.textContaining('Encountered an issue?'), findsOneWidget);
expect(
findSubstring(aboutDialog, 'github.com/flutter/devtools/issues/new'),
findsOneWidget,
);
expect(find.text('Contributing'), findsOneWidget);
expect(
findSubstring(aboutDialog, 'github.com/flutter/devtools'),
find.textContaining('Want to contribute to DevTools?'),
findsOneWidget,
);
expect(findSubstring(aboutDialog, 'CONTRIBUTING'), findsOneWidget);
expect(find.textContaining('connect with us on'), findsOneWidget);
expect(
findSubstring(aboutDialog, 'Discord'),
findsOneWidget,
Expand Down