Skip to content

web: striped animations and pause button colors - #3436

Merged
vito merged 7 commits into
masterfrom
issue/3185
Mar 14, 2019
Merged

vito merged 7 commits into
masterfrom
issue/3185

Conversation

@jamieklassen

Copy link
Copy Markdown

fixes #2520
fixes #3185

Closes the old animation pr because this is on top of that

Jamie Klassen and others added 4 commits February 21, 2019 12:32
select by color instead of class name

#2520

Signed-off-by: James Cooper <[email protected]>
Co-authored-by: Jamie Klassen <[email protected]>
…ground of the build header

Signed-off-by: James Cooper <[email protected]>
@jamieklassen

Copy link
Copy Markdown
Author

technically this PR was authored by @xtreme-james-cooper and @Lindsayauchin but created with my account -- looking over the changes I am very pleased. some particularly nice refactoring around colors generally!

@xtreme-james-cooper

Copy link
Copy Markdown
Contributor

Sorry about that, @pivotal-jamie-klassen XD

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😮 Looks cool! Kinda hard to read though - especially the timestamp. Maybe we can put a solid background behind the text?

Screenshot 2019-03-09 at 9 28 21 PM

Also, seems like it'll be difficult to align the background for these two elements - it's a small detail but it's easy to notice, so someone will probably open an issue as soon as this is released. 😅

Screenshot 2019-03-09 at 9 51 36 PM

I tried hacking on the background positioning to make it line up, but it's made even more difficult by the fact that the build number links start at different x-coordinates each time - even worse, that area is scrollable, so it'd always be possible to bring it out of alignment unless we do some trickery like restructuring the DOM so they share a common background.

Something like the dashboard UI's running indicator might be easier to work with - i.e. a smaller strip along one of the edges and a darker background. I always found the white-on-yellow pretty hard on the eyes even before the animation. 🤔 I tried it out briefly and it looked a little awkward though since it made the header look 'empty'.

Last bit of feedback: the normal/hover state for the trigger build button feels a little off; here's normal vs. hovered:

Screenshot 2019-03-09 at 10 02 36 PM
Screenshot 2019-03-09 at 10 02 42 PM

The normal state looks a little washed out (almost disabled?) and the hover state kind of looks like a normal state to me. I think the washed-outness is most noticeable with the green color. Red/brown seem OK. And I think what makes the hover state look 'normal' is that the background color turns into the same color as the rest of the header, so it kinda loses its emphasis rather than looking like the button itself is lighting up.

@jamieklassen

Copy link
Copy Markdown
Author

@Lindsayauchin tagging you in regrading the type/location of the stripes and impact of color contrast on readability. I'd be fine with a yellow/black striped line along the top or something similar, which, as stated, circumvents all the troubles around synchronized stripes and color contrast pretty neatly. I might still vote in favour of having the whole banner colorful rather than black/grey by default.

@Lindsayauchin

Copy link
Copy Markdown
Contributor

@pivotal-jamie-klassen @vito

Updated design of the running animation to the style used on the dashboard pipeline card.

Screen Shot 2019-03-11 at 11 16 53 AM

User feedback on the button with the status as the background colour was that it didn't look clickable.
If we make the background on the button the same as the status can we add in a border to the button to indicate to the user this is a button and teh secondary darker colour background as the hover state?

See examples:

Screen Shot 2019-03-11 at 11 25 52 AM

Screen Shot 2019-03-11 at 11 23 10 AM

@vito

vito commented Mar 11, 2019

Copy link
Copy Markdown
Contributor

@Lindsayauchin 👍 I find that button style clearer.

Now that the sawtooth pattern is up there it kind of encroaches on the header spacing, though I'm not sure how to avoid that since there's no space for the border otherwise. The dashboard doesn't have this problem because it always has a border up top, rather than filling in the header background. 🤔

The spacing is really only noticeable with the timestamps since they come closest to the edge. This is scope creeping a bit, but the timestamps were crammed up there back in 2014 without much thought and haven't moved since, so maybe it's time to finally move'em. 🙂

@Lindsayauchin

Copy link
Copy Markdown
Contributor

@pivotal-jamie-klassen I think we will have to either increase the overall height of that container by 8px

Screen Shot 2019-03-11 at 12 13 07 PM

Or we could change the layout of the time stamps like so..

Screen Shot 2019-03-11 at 2 07 59 PM

@jamieklassen

Copy link
Copy Markdown
Author

@Lindsayauchin +1 for horizontal layout of timestamps

darken on hover, icon always opaque, add border

#3185

Signed-off-by: James Cooper <[email protected]>
Co-authored-by: Jamie Klassen <[email protected]>
@jamieklassen

jamieklassen commented Mar 12, 2019 •

Copy link
Copy Markdown
Author

my guess at the right behaviour for the status bar:

<div id="build-header" class="build-header" style="
  display: flex;
  justify-content: space-between;
  background: rgb(17, 197, 96);">
  <div style="display: flex;">
    <div style="
      border-width: 0 1px 0 0;
      border-color: #3d3c3c;
      border-style: solid;
      padding: 10px;
      font-size: 24px;
      font-weight: 300;
      display: flex;
      align-items: center;
      margin-left: 8px;">
      <a href="/teams/main/pipelines/states/jobs/resource-metadata">
        <span class="build-name">resource-metadata</span> #1
      </a>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #3d3c3c;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding: 10px;
      width: 100px;">
      <div style="text-transform: uppercase; font-size: 10px;">started</div>
      <div style="font-size: 18px;">6m 28s ago</div>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #3d3c3c;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding: 10px;
      width: 100px;">
      <div style="text-transform: uppercase; font-size: 10px;">finished</div>
      <div style="font-size: 18px;">6m 28s ago</div>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #3d3c3c;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding: 10px;
      width: 100px;">
      <div style="text-transform: uppercase; font-size: 10px;">duration</div>
      <div style="font-size: 18px;">1h 2m</div>
    </div>
  </div>
  <div style="display: flex;">
    <button role="button" tabindex="0" aria-label="Trigger Build" title="Trigger Build" style="
      cursor: pointer;
      position: relative;
      background-color: rgb(17, 197, 96);
      padding: 10px;
      outline: none;
      margin: 0px;
      border-width: 0px 0px 0px 1px;
      border-color: rgb(61, 60, 60);
      border-style: solid;">
      <div style="
        width: 40px;
        height: 40px;
        background-position: 50% 50%;
        background-image: url("/public/images/ic-add-circle-outline-white.svg");
        background-repeat: no-repeat;">
      </div>
    </button>
  </div>
</div>

which looks like
Screen Shot 2019-03-12 at 2 48 19 PM

salient points are:

  • each child of the left-aligned container has
    • 1px grey border on the right
    • 10px padding
  • first child of the left-aligned container (perhaps we call it the 'name section') also has
    • extra 8px margin-left
    • font-size 24px, font-weight 300
    • vertically centers contents (display:flex + align-items:center in this case)
  • every child of the left-aligned container after the first (they might well be called 'timestamp sections') has the same layout:
    • fixed width of 100px
    • aligns contents vertically, equalizing space on either side of each child
    • first child is all caps, font size 10px
    • second child has font size 18px

I'm dubious about the 100px fixed width in the interest of preserving the changes from #3333
It looks a bit like we should be willing to vary the width and/or the font size of the timestamp itself depending on whether it is relative or verbose. For example, a verbose timestamp at 18px, if required to stay on one line, can force the width all the way to 225px:
Screen Shot 2019-03-12 at 3 05 15 PM

Here we find ourselves quickly running out of horizontal real estate, even with a moderate-length job name and only one of the timestamps being verbose.

Another idea, if we're willing to make some alignment and font size compromises (10px is probably getting into truly inaccessible territory):
Screen Shot 2019-03-12 at 3 17 03 PM

@Lindsayauchin I liked the idea at first, but it gives us a real yak to shave. Maybe increasing the height of the status bar (and therefore the size of the buttons, if keeping them square) is simpler in the short run. Obviously every pixel of sticky header eats at mobile real estate too, but I think that is a problem for another day.

@vito you might be interested to weigh in here too.

@jamieklassen

Copy link
Copy Markdown
Author

another draft after pairing with @Lindsayauchin

<div id="build-header" class="build-header" style="
  display: flex;
  justify-content: space-between;
  background: rgb(17, 197, 96);">
  <div style="display: flex;">
    <div style="
      border-width: 0 1px 0 0;
      border-color: #419867;
      border-style: solid;
      padding: 10px;
      font-size: 24px;
      font-weight: 300;
      display: flex;
      align-items: center;
      margin-left: 8px;
      ">
      <a href="/teams/main/pipelines/states/jobs/resource-metadata">
        <span class="build-name">resource-metadata-resource-metadata-resource-metadata</span> #1
      </a>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #419867;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-around;
      padding: 5px 10px;
      width: 100px;
      ">
      <div style="text-transform: uppercase;font-size: 12px;">started</div>
      <div style="font-size: 12px;line-height: 1;">Feb 13 2019</div><div style="
    font-size: 16px;
"> 04:35:51 PM</div>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #419867;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 5px 10px;
      width: 100px;
      ">
      <div style="text-transform: uppercase;font-size: 12px;">finished</div>
      <div style="font-size: 16px;">6m 28s ago</div>
    </div>
    <div style="
      border-width: 0 1px 0 0;
      border-color: #419867;
      border-style: solid;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      padding: 5px 10px;
      width: 100px;
      ">
      <div style="text-transform: uppercase;font-size: 12px;">duration</div>
      <div style="font-size: 16px;">1h 2m</div>
    </div>
  </div>
  <div style="display: flex;">
    <button role="button" tabindex="0" aria-label="Trigger Build" title="Trigger Build" style="
      cursor: pointer;
      position: relative;
      background-color: rgb(17, 197, 96);
      padding: 10px;
      outline: none;
      margin: 0px;
      border-width: 0px 0px 0px 1px;
      border-color: rgb(61, 60, 60);
      border-style: solid;">
      <div style="
        width: 40px;
        height: 40px;
        background-position: 50% 50%;
        background-image: url(" public="" images="" ic-add-circle-outline-white.svg");="" background-repeat:="" no-repeat;"="">
      </div>
    </button>
  </div>
</div>

Jamie Klassen added 2 commits March 12, 2019 16:29
made it too hard to read

#2520

Signed-off-by: Jamie Klassen <[email protected]>

@vito vito left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 looks great!

@vito
vito merged commit 3d499f4 into master Mar 14, 2019
@vito
vito deleted the issue/3185 branch March 14, 2019 17:59
@vito vito added the release/documented Documentation and release notes have been updated. label Apr 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/documented Documentation and release notes have been updated. web-ui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Trigger and abort button feedback The "errored current" colour and "started" colour are very similar

4 participants