Skip to content

SSBC-EM2.4: User workflows for create/edit are modeled

Created by: courier-new

Outcome

  • "Empty" batch change model from RFC is implemented
  • Users can get back to their unapplied batch specs
  • User can update an existing batch change from SSBC UI

Scope

  • Implement empty batch change model (~2d)
    • Make last_applied_at nullable in DB (<0.5d)
    • Implement resolver for new mutation createEmptyBatchChange (1d)
    • Update docs to better draw analogy between Batch Changes and GitHub repos (0.5d)
  • Change default access to batch changes in connection resolver to owner/admin-only for shallow batch changes (~1d)
    • Comment Thorsten: We need to check whether user is site-admin, and if not we need to filter our batch changes that are (a) shallow and (b) have a different author
  • Updated "Create" flow (~2d)
    • Require (unique) name and namespace to create a new batch change, use createEmptyBatchChange (0.5d)
    • Add basic UI to set the batch change name and namespace before SSBC editor view (0.5d)
    • Strip name from the batch spec YAML shown from the client UI from GraphQL layer (automatically insert for backend/DB) (0.5d)
      • (Punting this to later because it'll require AST parsing and manipulation on the backend to safely remove name when it's requested from the frontend, which blows the estimate of 0.5d by quite a bit)
    • Validate that if name is entered in SSBC editor, it matches the batch change name, otherwise show an error (0.5d)
  • Updated "Edit" flow (~2d)
    • Add "Edit" button to get back to editor UI for a batch change from its details page (0.5d)
    • Add basic UI to enable updating the batch change name with moveBatchChange (0.5d)
      • (Deferred because moveBachChange actually needs some love so that the batch specs stay associated)
    • Update createBatchSpecFromRaw mutation to take required arg batch change id (<0.5d)
    • Use createBatchSpecFromRaw to create a new batch spec for an existing batch change (<0.5d)