- scale_to ||= run.duration_ms(timing)
- overlap ||= false
.timeline style="margin-top: .75em;" class=(overlap ? 'absolute' : '')
  - run.collapsed_segments(timing).each_with_index do |segment, index|
    .pure-u.inspect id="#{run.id36}-inspect-#{index}" style="width: #{segment.duration_ms(timing).to_f / scale_to * 100}%; visibility: hidden;"
      .bar
        p
      div class="#{"mx-2" if segment.first? || segment.last?} #{"second-half" if segment.second_half?(timing)}"
        div = segment.name
        .text-light-50 #{format_ms(segment.duration_ms(timing))} duration
        .text-light-50 #{format_ms(segment.end_ms(timing))} finished
        - if segment.gold?(timing) || run.has_skipped_splits?(timing) || !run.has_golds?(timing) || segment.duration_ms(timing) == segment.shortest_duration_ms(timing)
          .text-gold Best!
        - else
          .text-success
            | #{format_ms_casual(segment.duration_ms(timing) - segment.shortest_duration_ms(timing), 1)} potential save

- scale_to ||= run.duration_ms(timing)
- overlap ||= false
.timeline style="margin-top: .75em;" class=(overlap ? 'absolute' : '')
  - run.collapsed_segments(timing).each_with_index do |segment, index|
    .pure-u.inspect id="#{run.id36}-inspect-#{index}" style="width: #{segment.duration_ms(timing).to_f / scale_to * 100}%; visibility: hidden;"
      .bar
        p
      div class="#{"mx-2" if segment.first? || segment.last?} #{"second-half" if segment.second_half?(timing)}"
        div = segment.name
        .text-light-50 #{format_ms(segment.duration_ms(timing))} duration
        .text-light-50 #{format_ms(segment.end_ms(timing))} finished
        - if segment.gold?(timing)
          .text-gold Best!
        - else
          - unless run.has_skipped_splits?(timing) || !run.has_golds?(timing) || segment.duration_ms(timing) == segment.shortest_duration_ms(timing)
            .text-success
              | #{format_ms_casual(segment.duration_ms(timing) - segment.shortest_duration_ms(timing), 1)} potential save

Fix showing "Best!" too much
Fix showing "Best!" too much

BatedUrGonnaDie/splits-io,glacials/splits-io,BatedUrGonnaDie/splits-io,glacials/splits-io,glacials/splits-io,BatedUrGonnaDie/splits-io,BatedUrGonnaDie/splits-io,glacials/splits-io