Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Use rotateplane cursor as spinner #7304

Merged
merged 1 commit into from
Apr 2, 2014

Conversation

marcelgerber
Copy link
Contributor

In this PR I took the bounce cursor from brackets.io and replaced the Brackets .spinner with a modified version of this cursor.
I think it suits better to such a modern UI, but it wouldn't be a problem to me to just use the current one furthermore.

@larz0 for UI review

@larz0
Copy link
Member

larz0 commented Mar 24, 2014

A new spinner would be great. Could we use the "flipping" one instead? (first spinner on http://tobiasahlin.com/spinkit/)

We could probably use .spinner:before and .spinner:after to build a rectangular brackets that flips; like this:

screen shot 2014-03-24 at 4 43 37 pm

@marcelgerber
Copy link
Contributor Author

To be honest, I don't know what to write into :before and :after to get this.

100% { background-position: -360px 0px; }
@-webkit-keyframes bounce {
0%, 100% { -webkit-transform: scale(0.1) }
50% { -webkit-transform: scale(1.0) }
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. I think we should rename this keyframes to something more specific.
  2. It might be nice to move this keyframes closer to the .spinner class, since there is the first time it is used.
  3. You should also add the unprefixed version of the keyframes and the animation.

@larz0
Copy link
Member

larz0 commented Mar 25, 2014

@SAplayer I should have time to take a look at this in two days. Would be nice if we can incorporate some Brackets branding in the spinner.

@marcelgerber
Copy link
Contributor Author

@TomMalbran I did these changes.

}
}
// Retina versions
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We don't need this any more, do we? (It was just for using a bigger image)

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, we shouldn't need it anymore.

@larz0
Copy link
Member

larz0 commented Mar 27, 2014

@SAplayer I finally had time to give this a crack. Could you try this one?

<html>
  <head>
    <title>Brackets Spinner</title>
    <style>
    .spinner {
      box-sizing: border-box;
      width: 60px;
      height: 60px;
      border-left: 15px solid #333;
      border-right: 15px solid #333;
      overflow: hidden;
      position: relative;

      -webkit-animation: rotateplane 1.2s infinite ease-in-out;
      animation: rotateplane 1.2s infinite ease-in-out;
    }

    .spinner:before,
    .spinner:after {
        border-left: 11px solid #333;
        border-right: 11px solid #333;        
        box-sizing: border-box;
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 15px;
    }

    .spinner:before {
        top: 0;
        left: 0;

    }

    .spinner:after {
        bottom: 0;
        left: 0;
    }

    @-webkit-keyframes rotateplane {
      0% { -webkit-transform: perspective(120px) }
      50% { -webkit-transform: perspective(120px) rotateY(180deg) }
      100% { -webkit-transform: perspective(120px) rotateY(180deg)  rotateX(180deg) }
    }

    @keyframes rotateplane {
      0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
      } 50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
      } 100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
      }
    }
    </style>
  </head>
  <body>
    <div class="spinner">
    </div>
  </body>
</html>

@marcelgerber
Copy link
Contributor Author

Thanks, I updated it. The only bug I'm still experiencing is a white gap while the icon is rotating.

@larz0
Copy link
Member

larz0 commented Mar 27, 2014

Awesome. Could you replace #333 with #78B2F2? The large spinner works (see Extension Manager) but the small one you'll need to use these values:

<html>
  <head>
    <title>Brackets Spinner</title>
    <style>

    .spinner {
      box-sizing: border-box;
      width: 14px;
      height: 14px;
      border-left: 3px solid #78B2F2;
      border-right: 3px solid #78B2F2;
      overflow: hidden;
      position: relative;

      -webkit-animation: rotateplane 1.2s infinite ease-in-out;
      animation: rotateplane 1.2s infinite ease-in-out;
    }

    .spinner:before,
    .spinner:after {
        border-left: 3px solid #78B2F2;
        border-right: 3px solid #78B2F2;        
        box-sizing: border-box;
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 3px;
    }

    .spinner:before {
        top: 0;
        left: 0;

    }

    .spinner:after {
        bottom: 0;
        left: 0;
    }

    @-webkit-keyframes rotateplane {
      0% { -webkit-transform: perspective(120px) }
      50% { -webkit-transform: perspective(120px) rotateY(180deg) }
      100% { -webkit-transform: perspective(120px) rotateY(180deg)  rotateX(180deg) }
    }

    @keyframes rotateplane {
      0% {
        transform: perspective(120px) rotateX(0deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(0deg) rotateY(0deg);
      } 50% {
        transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
        -webkit-transform: perspective(120px) rotateX(-180.1deg) rotateY(0deg);
      } 100% {
        transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
        -webkit-transform: perspective(120px) rotateX(-180deg) rotateY(-179.9deg);
      }
    }
    </style>
  </head>
  <body>
    <div class="spinner">
    </div>
  </body>
</html>

@marcelgerber marcelgerber changed the title Use bounce cursor as spinner Use rotateplane cursor as spinner Mar 27, 2014
@marcelgerber
Copy link
Contributor Author

Commit pushed. It fixes the StatusBar cursor as well.
But there's still the issue with the gap. If you don't know what I mean, just take a look at the big cursor:
image

@larz0
Copy link
Member

larz0 commented Mar 27, 2014

Could you try replacing width: 100% for spinner:before and spinner:after with width 30px and 8px respectively?

I'm not seeing that gap on the Mac.

@larz0
Copy link
Member

larz0 commented Mar 27, 2014

@SAplayer if that doesn't work then try this one. I've made it bleed a bit: http://cl.ly/1e1r1L1U2i25

@marcelgerber
Copy link
Contributor Author

Both don't work, but I don't think worth the effort fixing this. It's not noticeable unless you look specifically on the cursor.
But the weird thing is that basically the same code is working in the browser, but not in Brackets. Maybe a problem with Chrome 29?

@larz0
Copy link
Member

larz0 commented Mar 27, 2014

UX review done.

@larz0 larz0 removed their assignment Mar 28, 2014
@bchintx bchintx self-assigned this Mar 31, 2014
@marcelgerber
Copy link
Contributor Author

@larz0 Are you waiting for anything to be done?

@larz0
Copy link
Member

larz0 commented Apr 1, 2014

@bchintx will review this 👍

@bchintx
Copy link
Contributor

bchintx commented Apr 2, 2014

Changes look great. Updated spinning cursor works fine on my Win 7 status bar in Brackets. Merging.

bchintx added a commit that referenced this pull request Apr 2, 2014
Use rotateplane cursor as spinner
@bchintx bchintx merged commit 5f59180 into adobe:master Apr 2, 2014
@marcelgerber marcelgerber deleted the use-bounce-cursor branch April 2, 2014 11:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants