huboard / huboard-web

GitHub issues made awesome
https://huboard.com
61 stars 26 forks source link

Milestone Card Layout #339

Closed discorick closed 8 years ago

discorick commented 8 years ago

Merges into https://github.com/huboard/huboard-web/pull/327

dahlbyk commented 8 years ago

Which repo are you using to test many task columns?

discorick commented 8 years ago

Checkout /discorick/repro-repo for many columns (8)

dahlbyk commented 8 years ago

The distribution doesn't look quite right:

firefox_2016-07-26_11-04-59

For eight columns I would expect:

0  ....
1  |...
2  |...
3  ||..
4  ||..
5  |||.
6  |||.
7  ||||
discorick commented 8 years ago

Whoa, @dahlbyk that styling is off, Firefox ?

dahlbyk commented 8 years ago

Whoa, @dahlbyk that styling is off, Firefox ?

Si

dahlbyk commented 8 years ago

Not quite there...

  1. With fewer than five columns we show an extra power bar:
  2. Distribution for mid-range counts looks good:
  3. I'm not super concerned about it, but it seems preferable for "extra" bars to appear in the middle (0,1,1,2,2,2,3,3,4) rather than on the end (0,1,1,2,2,3,3,3,4):
dahlbyk commented 8 years ago

Alright, I think I have the "right" algorithm:

excel_2016-07-27_00-06-41

As an annotated Excel formula, because I'm a Real Programmer™:

# $B$1 = this.powerBarLength  # rename as maxPowerBarLength?
# N$1 = total_length
# N$2 = MIN(N$1 - 1, $B$1)    # powerBarLength
# $A3 = powerbar_total
=IF($A3 = N$1 - 1,            # Last column?
    N$2,                      # Full bar!
    CEILING.MATH(
      (N$2 - 1) *             # Fill all but the last bar
      $A3 / (N$1 - 1)         # ...based on proportion of non-last bars
    )                         # ...rounded up
 )
dahlbyk commented 8 years ago

Alright, I think I have the "right" algorithm

Implemented and tested. I think we're good?

rauhryan commented 8 years ago

Wow! this is really cool!

đź‘Ť

discorick commented 8 years ago

Everything looks like its checking out!

dahlbyk commented 8 years ago

Alright, so...having focused obsessively on the power bars, what else do we need to look at here? What's a good example repo?

discorick commented 8 years ago

Checkout:

https://huboard-rails-pr-339.herokuapp.com/huboard-testing/card-designs-1#/milestones & https://huboard-rails-pr-339.herokuapp.com/huboard/huboard#/milestones

Everythings looking pretty solid to me at this point.

dahlbyk commented 8 years ago

Not sure if we want to tackle here or not, but I did notice that the power meter status icons seem a little off:

Curiously, Chrome Canary looks much better:

chrome_2016-07-27_15-12-30
discorick commented 8 years ago

Not sure if we want to tackle here or not, but I did notice that the power meter status icons seem a little off

Probably not here, these types of icons have trouble elsewhere in the app as well (see issue timeline icons), when we move to SVG icons that should fix all those inconsistencies between browsers.