- provide :title, @sweep.title

%ol.breadcrumb
  %li= link_to 'Projects', projects_path
  %li= link_to @project.name, @project
  %li= link_to 'Sweeps', project_sweeps_path(@project)
  %li= @sweep.title

%h1= yield :title
%p.help= simple_format @sweep.description

- if pending = @sweep.pending_snapshots.presence
  %h2 Pending
  %ul
    - pending.each do |snapshot|
      %li
        = link_to snapshot_path(snapshot), snapshot
        %small= snapshot.viewport.to_s

- if accepted = @sweep.accepted_snapshots.presence
  %h2 Accepted
  %ul
    - accepted.each do |snapshot|
      %li
        = link_to snapshot.title, snapshot
        %small= snapshot.viewport.to_s

- if rejected = @sweep.rejected_snapshots.presence
  %h2 Rejected
  = render rejected

- if needs_review = @sweep.under_review_snapshots.presence
  %h2 Needs review
  = render needs_review

- provide :title, @sweep.title

%ol.breadcrumb
  %li= link_to 'Projects', projects_path
  %li= link_to @project.name, @project
  %li= link_to 'Sweeps', project_sweeps_path(@project)
  %li= @sweep.title

%h1= yield :title
%p.help= simple_format @sweep.description

- if pending = @sweep.pending_snapshots.presence
  %h2 Pending
  = render pending

- if needs_review = @sweep.under_review_snapshots.presence
  %h2 Needs review
  = render needs_review

- if rejected = @sweep.rejected_snapshots.presence
  %h2 Rejected
  = render rejected

- if accepted = @sweep.accepted_snapshots.presence
  %h2 Accepted
  = render accepted

Unify and reorder snapshot rendering on sweep page
Unify and reorder snapshot rendering on sweep page

We used to render snapshots differently depending in what state they
were in. My initial thought was to save space on this page. I don't
think that's super important, so instead I render them all with the
snapshot card style. And by reordering them, we get the most important
states (the ones you need to do something about) up top.
