Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add https://github.com/peterflynn/everyscrub extension #843

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

humphd
Copy link

@humphd humphd commented Jul 17, 2017

While discussing the idea of adding more inline editors, I came across this cool everyscrub extension. It basically adds a listener for you holding down Alt + mousedown scrubbing on a number, and then increases or decreases it. Here is what it looks like:

everyscrub

It's fun, and makes it easy to try things. What isn't great about it is that it's yet another UI tool that is impossible to self-discover. @flukeout maybe you have ideas for how we could modify it slightly to have it show up for users in a way that makes it obvious how to use?

Not sure if we want this or not, but I thought I'd do a PR to experiment with it.

@humphd humphd requested a review from flukeout July 17, 2017 16:25
@flukeout
Copy link

flukeout commented Jul 17, 2017

Hey, I'll check it out. Are we able to wrap the 'editable' things in some kind of span / character wrapper that we can then apply CSS to?

Agreed tho, this is super sweet.

@humphd
Copy link
Author

humphd commented Jul 17, 2017

On mousedown we can do something here: https://github.com/mozilla/brackets/pull/843/files#diff-c0ef5bd688a422279dd0e1b5c0b4713eR164. Is that useful? You don't have a global, static view of all the editable things, no. It's opportunistic based on where you point your mouse.

@humphd
Copy link
Author

humphd commented Jul 17, 2017

NOTE: #844 is doing some custom cursor overlay stuff we might be able to steal for this.

@flukeout
Copy link

flukeout commented Jul 19, 2017

There is some built in behavior in brackets that shows a little popup when you have your cursor within a color value...

We could look where that is happening and try to add something for scrubbable values too. This all lives in the QuickView feature. So I'll dig into that tomorrow.

@flukeout
Copy link

Some thoughts on this

  • Would be nice to be able to set the increment unit depending on unit type, there's a big range...
    • 1 for px
    • .01 for opacity
    • ...
  • You can scrub color values with this, which we should probably also remove

@humphd
Copy link
Author

humphd commented Jul 20, 2017

I'm pretty sure that code lives in https://github.com/mozilla/brackets/blob/master/src/extensions/default/QuickView/main.js. We could borrow from that to show the scrubber arrow and unit stuff.

@hkirat
Copy link

hkirat commented Jul 24, 2017

This is what I did in #844 : https://github.com/mozilla/brackets/pull/844/files#diff-172c2aa71bb7326386a85125ccd13603R145
Would be good to reuse something if it already exists in brackets though.

@flukeout
Copy link

flukeout commented Aug 2, 2017

Here are some ideas for adding an affordance to this cool feature: a little pop-up bubble (similar to what we do for the colorpicker. It would appear when the text cursor is on an editable-property.

Here's an option above the code, and beside the line of code it affects (with a highlight on the number it will change)

image

I like the first option better as it requires a smaller mouse movement to use. In addition, we could delay the appearance of this bubble a little bit so that it's not distracting. We could also clear out the bubble if someone starts editing the value by typing.

cc @humphd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants