Revisit publishing of changesets from batch spec preview page
Created by: mrnugget
Deliverables
We're going to add publish from UI support to the batch spec preview page using the following flow, for specs that don't have explicit published states:
- On page load, the user's attention is drawn to the checkboxes that allow them to publish/draft each changeset. Users may select visible/all via the header checkbox.
- Once one or more changesets are selected, the apply button is temporarily disabled and a new primary dropdown button is added like the bulk operations button, replacing the filter/search bar. This button allows publishing, publishing as draft, or not publishing (to allow returning to the default state before applying the batch spec). Once clicked, the apply button will be enabled once more, and the filter/search bar returns.
- As publication decisions are made, the changeset actions are updated to show what will now happen, along with the stats bar at the top of the preview page.
- Application works the same way as before.
Out of scope
We've had considerable discussion of what to do when the user selects all changesets, but some (presumably off screen) changesets are unselectable due to their current state. The desired option in the longer term is to inform the user of this situation, most likely through a new banner, and allow them to filter down to the affected changesets.
This has been explicitly descoped from this project and is tracked by #23379.
Tasks
-
#23380 (closed) -
#23381 (closed) -
#23382 (closed) -
#23383 (closed) -
#23384 (closed) -
#22179 (closed) -
#22180 (closed)
Resources
Background
In this PR https://github.com/sourcegraph/sourcegraph/pull/22658 we came to the conclusion that we don't want to move forward with the implemented UI and user flow. See these comments and their replies for more context:
- https://github.com/sourcegraph/sourcegraph/pull/22658#pullrequestreview-707258984
- https://github.com/sourcegraph/sourcegraph/pull/22658#issuecomment-880664017
A possible solution was proposed by @rrhyne here: https://github.com/sourcegraph/sourcegraph/pull/22658#issuecomment-880672656