Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
8 changes: 0 additions & 8 deletions app/lib/frontend/templates/package_misc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,6 @@ final nameMatchBadgeNode = packageBadgeNode(
color: 'name-match',
);

/// Renders the null-safe badge used by package listing and package page.
d.Node nullSafeBadgeNode({String? title}) {
return packageBadgeNode(
label: 'Null safety',
title: title ?? 'Supports the null safety language feature.',
);
}

/// Renders the Dart 3 compatible badge.
final dart3CompatibleNode = packageBadgeNode(
label: 'Dart 3 compatible',
Expand Down
1 change: 0 additions & 1 deletion app/lib/frontend/templates/views/pkg/header.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ d.Node packageHeaderNode({
d.span(child: d.xAgoTimestamp(published)),
d.text(' '),
if (publisherId != null) ..._publisher(publisherId),
if (isNullSafe && !isDart3Compatible) nullSafeBadgeNode(),
if (isDart3Compatible) dart3CompatibleNode,
if (isDart3Incompatible) dart3IncompatibleNode,
if (releases != null) ..._releases(packageName, releases),
Expand Down
3 changes: 0 additions & 3 deletions app/lib/frontend/templates/views/pkg/package_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ d.Node _sdkLibraryItem(SdkLibraryHit hit) {
text: sdkDict.libraryTypeLabel,
),
coreLibraryBadgeNode,
nullSafeBadgeNode(),
]),
tagsNode: null,
replacedBy: null,
Expand All @@ -94,7 +93,6 @@ d.Node _packageItem(
required bool isLiked,
}) {
final isFlutterFavorite = view.tags.contains(PackageTags.isFlutterFavorite);
final isNullSafe = view.tags.contains(PackageVersionTags.isNullSafe);
final isDart3Compatible = view.tags.contains(
PackageVersionTags.isDart3Compatible,
);
Expand Down Expand Up @@ -157,7 +155,6 @@ d.Node _packageItem(
if (licenseNode != null)
d.span(classes: ['packages-metadata-block'], child: licenseNode),
if (isFlutterFavorite) flutterFavoriteBadgeNode,
if (isNullSafe && !isDart3Compatible) nullSafeBadgeNode(),
if (isDart3Compatible) dart3CompatibleNode,
if (isDart3Incompatible) dart3IncompatibleNode,
]);
Expand Down
10 changes: 1 addition & 9 deletions app/lib/frontend/templates/views/pkg/versions/version_row.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import '../../../../../package/model_properties.dart';
import '../../../../../shared/urls.dart' as urls;
import '../../../../dom/dom.dart' as d;
import '../../../../static_files.dart';
import '../../../package_misc.dart';

d.Node versionRowNode(
String package,
Expand All @@ -29,14 +28,7 @@ d.Node versionRowNode(
title: 'Visit $package ${version.version} page',
),
),
d.td(
classes: ['badge'],
child: pubspec.hasOptedIntoNullSafety
? nullSafeBadgeNode(
title: 'Package version is opted into null safety.',
)
: null,
),
d.td(classes: ['badge'], child: null),
d.td(
classes: ['sdk'],
child: sdk != null
Expand Down
1 change: 0 additions & 1 deletion app/test/frontend/golden/pkg_index_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ <h3 class="packages-title pub-monochrome-icon-hoverable">
<p class="packages-metadata">
<span class="packages-metadata-block">Dart SDK library</span>
<span class="package-badge">Core library</span>
<span class="package-badge" title="Supports the null safety language feature.">Null safety</span>
</p>
</div>
</div>
Expand Down
12 changes: 3 additions & 9 deletions app/test/frontend/golden/pkg_versions_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -249,9 +249,7 @@ <h2 id="stable">Stable versions of oxygen</h2>
<td class="version">
<a href="/packages/oxygen/versions/1.2.0" title="Visit oxygen 1.2.0 page">1.2.0</a>
</td>
<td class="badge">
<span class="package-badge" title="Package version is opted into null safety.">Null safety</span>
</td>
<td class="badge"></td>
<td class="sdk">3.0</td>
<td class="uploaded">
<a class="-x-ago" href="" title="%%version-created-date%%" role="button" data-timestamp="%%millis%%">%%x-ago%%</a>
Expand All @@ -271,9 +269,7 @@ <h2 id="stable">Stable versions of oxygen</h2>
<td class="version">
<a href="/packages/oxygen/versions/1.0.0" title="Visit oxygen 1.0.0 page">1.0.0</a>
</td>
<td class="badge">
<span class="package-badge" title="Package version is opted into null safety.">Null safety</span>
</td>
<td class="badge"></td>
<td class="sdk">3.0</td>
<td class="uploaded">
<a class="-x-ago" href="" title="%%version-created-date%%" role="button" data-timestamp="%%millis%%">%%x-ago%%</a>
Expand Down Expand Up @@ -316,9 +312,7 @@ <h2 id="prerelease">Prerelease versions of oxygen</h2>
<td class="version">
<a href="/packages/oxygen/versions/2.0.0-dev" title="Visit oxygen 2.0.0-dev page">2.0.0-dev</a>
</td>
<td class="badge">
<span class="package-badge" title="Package version is opted into null safety.">Null safety</span>
</td>
<td class="badge"></td>
<td class="sdk">3.0</td>
<td class="uploaded">
<a class="-x-ago" href="" title="%%version-created-date%%" role="button" data-timestamp="%%millis%%">%%x-ago%%</a>
Expand Down
2 changes: 1 addition & 1 deletion app/test/task/end2end_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import '../shared/utils.dart';
const String goldenDir = 'test/task/testdata/goldens';

// TODO: generalize golden testing, use env var for regenerating all goldens.
final _regenerateGoldens = false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Please change back :)

final _regenerateGoldens = true;

// We use a small test profile without flutter packages, because we have to
// run pana+dartdoc for all these package versions, naturally this is slow.
Expand Down
8 changes: 2 additions & 6 deletions app/test/task/testdata/goldens/packages/oxygen/versions.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,7 @@ <h2 id="stable">Stable versions of oxygen</h2>
<td class="version">
<a href="/packages/oxygen/versions/2.0.0" title="Visit oxygen 2.0.0 page">2.0.0</a>
</td>
<td class="badge">
<span class="package-badge" title="Package version is opted into null safety.">Null safety</span>
</td>
<td class="badge"></td>
<td class="sdk">3.0</td>
<td class="uploaded">
<a class="-x-ago" href="" title="%%short-dateformat%%" role="button" data-timestamp="%%time-ago-millis%%">%%time-ago%%</a>
Expand All @@ -257,9 +255,7 @@ <h2 id="stable">Stable versions of oxygen</h2>
<td class="version">
<a href="/packages/oxygen/versions/1.0.0" title="Visit oxygen 1.0.0 page">1.0.0</a>
</td>
<td class="badge">
<span class="package-badge" title="Package version is opted into null safety.">Null safety</span>
</td>
<td class="badge"></td>
<td class="sdk">3.0</td>
<td class="uploaded">
<a class="-x-ago" href="" title="%%short-dateformat%%" role="button" data-timestamp="%%time-ago-millis%%">%%time-ago%%</a>
Expand Down