Live data from Hacker News

Focusable – Set a spotlight focus on DOM element

github.com

21–28 of 28 posts

Re: Focusable – Set a spotlight focus on DOM element

#21

Since it's tangentially related, is anyone aware of a tool (browser based or Mac-supported) that would take a CSS selector and, rather than spotlight it, capture a screenshot of its bounding box? Ideally, capturing multiple screenshots if there are multiple matching elements?

I think that you're looking for is that http://html2canvas.hertzen.com/ :D

Re: Focusable – Set a spotlight focus on DOM element

#22
post #6

Earlier quoted context omitted.

You can find a live demo here ( https://github.com/zzarcon/focusable/tree/master/sample-app ). About adding a border-radius, I'll love that feature, in fact I was thinking about implement it, but isn't as easy as it seems. TLDR: Right now they are 4 divs for making the focus enable: 1- Fills the left part of the page. 2- Fills the top part of the page to the top part of the element. 3- Fills the bottom part of the el…

That isn't a live demo. Once again we find on HN a UI project with no link to a live demo on the project page.

Sorry man, you're right, I updated the Readme and put there a live demo link. Hope you like http://www.mrdrozdov.com/focusable/sample-app/index.html

Re: Focusable – Set a spotlight focus on DOM element

#23
post #14

This overlay technique works beautifully for guided, interactive tutorials. We've had great success using it in our tutorials to get users quickly up to speed with our product. It works better than the similar "show bubble beside dom element" technique[1] for a few reasons: 1) With bubbles, you need real estate next to the element to display the help text. This often doesn't exist, especially e.g. inside a frame in a…

I've used Intro.js[1] in the past for this technique, and I've been pretty happy with it. [1] http://usablica.github.io/intro.js/

Thanks!

Re: Focusable – Set a spotlight focus on DOM element

#24
post #20

Earlier quoted context omitted.

I've used Intro.js[1] in the past for this technique, and I've been pretty happy with it. [1] http://usablica.github.io/intro.js/

Yes, intro.js is a great lib, I know that, but for me has an important missing feature; you can't interact with the focused element, I mean, you don't have any mouse event or similar... this is the only bad thing I think.

Thanks for this feedback dude, I will concentrate to address remaining issues, including what you mentioned.

Cheers :)

Re: Focusable – Set a spotlight focus on DOM element

#27
post #6

I'd need to look into the code as I couldn't find a live demo to quickly noodle with, but my first thought was to add a border radius or some sort of blur filter to make it more spotlight-like? :)

You can find a live demo here ( https://github.com/zzarcon/focusable/tree/master/sample-app ). About adding a border-radius, I'll love that feature, in fact I was thinking about implement it, but isn't as easy as it seems. TLDR: Right now they are 4 divs for making the focus enable: 1- Fills the left part of the page. 2- Fills the top part of the page to the top part of the element. 3- Fills the bottom part of the el…

Here's kind of a way to do it:

  #overlay-layer .column:nth-child(2):after,
  #overlay-layer .column:nth-child(2):before,
  #overlay-layer .column:nth-child(3):after,
  #overlay-layer .column:nth-child(3):before {
    content: "";
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 5px;
  }

  #overlay-layer .column:nth-child(2):after {
    right: 0;
    bottom: -10px;
    box-shadow: 5px -5px 1px rgba(0,0,0,0.8);
  }

  #overlay-layer .column:nth-child(2):before {
    left: 0;
    bottom: -10px;
    box-shadow: -5px -5px 1px rgba(0,0,0,0.8);
  }

  #overlay-layer .column:nth-child(3):after {
    right: 0;
    top: -10px;
    box-shadow: 5px 5px 1px rgba(0,0,0,0.8);
  }

  #overlay-layer .column:nth-child(3):before {
    left: 0;
    top: -10px;
    box-shadow: -5px 5px 1px rgba(0,0,0,0.8);
  }

Re: Focusable – Set a spotlight focus on DOM element

#28
post #22

Earlier quoted context omitted.

That isn't a live demo. Once again we find on HN a UI project with no link to a live demo on the project page.

Sorry man, you're right, I updated the Readme and put there a live demo link. Hope you like http://www.mrdrozdov.com/focusable/sample-app/index.html

Awesome, thanks. After you focus a non-header area, how do you get back to a normal state? Clicking around doesn't remove the black area, ESC doesn't either. Mac/Chrome.
Post reply on HN