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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Important changes to data models, configuration, and migrations between each
AppEngine version, listed here to ease deployment and troubleshooting.

## Next Release (replace with git tag when deployed)
* Enabled manual publishing settings on package admin UI.
* Note: new `Package.publishingConfig` field in Datastore, new `PUT /api/packages/<package>/publishing` endpoint.
* Note: Reverted public `cache-control` headers except for `/documentation/` pages.

Expand Down
3 changes: 0 additions & 3 deletions app/lib/frontend/handlers/experimental.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const _publicFlags = <PublicFlag>{

final _allFlags = <String>{
'dark-as-default',
'manual-publishing',
..._publicFlags.map((x) => x.name),
};

Expand Down Expand Up @@ -89,8 +88,6 @@ class ExperimentalFlags {

bool get isDarkModeDefault => isEnabled('dark-as-default');

bool get isManualPublishingConfigAvailable => isEnabled('manual-publishing');

String encodedAsCookie() => _enabled.join(':');

@override
Expand Down
9 changes: 2 additions & 7 deletions app/lib/frontend/templates/views/pkg/admin_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.

import 'package:_pub_shared/data/package_api.dart';
import 'package:pub_dev/frontend/request_context.dart';

import '../../../../account/models.dart';
import '../../../../package/models.dart';
Expand Down Expand Up @@ -36,10 +35,7 @@ d.Node packageAdminPageNode({
'Publishing',
href: '#publishing',
children: [
if (requestContext
.experimentalFlags
.isManualPublishingConfigAvailable)
TocNode('Manual publishing', href: '#manual-publishing'),
TocNode('Manual publishing', href: '#manual-publishing'),
TocNode(
'Automated publishing',
href: '#automated-publishing',
Expand Down Expand Up @@ -239,8 +235,7 @@ d.Node packageAdminPageNode({
],
d.a(name: 'publishing'),
d.h2(text: 'Publishing'),
if (requestContext.experimentalFlags.isManualPublishingConfigAvailable)
_manualPublishing(package),
_manualPublishing(package),
_automatedPublishing(package),
d.a(name: 'version-retraction'),
d.h2(text: 'Version retraction'),
Expand Down
29 changes: 29 additions & 0 deletions app/test/frontend/golden/pkg_admin_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,9 @@ <h3 class="detail-lead-title">Metadata</h3>
<div class="pub-toc-node pub-toc-node-0">
<a href="#publishing">Publishing</a>
</div>
<div class="pub-toc-node pub-toc-node-1">
<a href="#manual-publishing">Manual publishing</a>
</div>
<div class="pub-toc-node pub-toc-node-1">
<a href="#automated-publishing">Automated publishing</a>
</div>
Expand Down Expand Up @@ -409,6 +412,32 @@ <h3>Unlisted</h3>
</div>
<a name="publishing"></a>
<h2>Publishing</h2>
<a name="manual-publishing"></a>
<h3>Manual publishing</h3>
<p>
Manual publishing, using personal credentials for the
<code>pub</code>
client (
<code>pub login</code>
) .
</p>
<p>Disable to prevent accidental publication from the command line.</p>
<p>It is recommended to disable when automated publishing is enabled.</p>
<div class="-pub-form-checkbox-row">
<div class="mdc-form-field">
<div class="mdc-checkbox">
<input id="-pkg-admin-manual-publishing-enabled" class="mdc-checkbox__native-control" type="checkbox" checked="checked"/>
<div class="mdc-checkbox__background">
<svg class="mdc-checkbox__checkmark" viewBox="0 0 24 24">
<path class="mdc-checkbox__checkmark-path" fill="none" d="M1.73,12.91 8.1,19.28 22.79,4.59"/>
</svg>
<div class="mdc-checkbox__mixedmark"></div>
</div>
<div class="mdc-checkbox__ripple"></div>
</div>
<label for="-pkg-admin-manual-publishing-enabled">Enable manual publishing</label>
</div>
</div>
<a name="automated-publishing"></a>
<h3>Automated publishing</h3>
<p>
Expand Down
1 change: 0 additions & 1 deletion pkg/pub_integration/test/pkg_admin_page_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ void main() {

// disable manual publishing
await user.withBrowserPage((page) async {
await page.gotoOrigin('/experimental?manual-publishing=1');
await page.gotoOrigin('/packages/test_pkg/admin');

await page.waitAndClick('#-pkg-admin-manual-publishing-enabled');
Expand Down