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

Wrong position on fixed element and inside fixed element. #6

Open
Narretz opened this issue Nov 17, 2016 · 5 comments
Open

Wrong position on fixed element and inside fixed element. #6

Narretz opened this issue Nov 17, 2016 · 5 comments

Comments

@Narretz
Copy link

Narretz commented Nov 17, 2016

I've tried to use it on a fixed position element and on the first child of a fixed position element.
Fixed position doesn't work at all (element is skipped?) and inside fixed position, the positioning is wrong.

@Narretz
Copy link
Author

Narretz commented Nov 18, 2016

I've tried document.getBoundingClientRect() to get the correct "hole", and this seems to work quite well

@johanlahti
Copy link
Owner

Thanks a lot for the feedback. I had a quick look at it and getBoundingClient seems to work fine. However, fixed elements are skipped because of the way the visibility of elements is determined. I might borrow this logic from jquery instead (or elsewhere… open for suggestions).

I will look at the other issues when I have some time over.

johanlahti added a commit that referenced this issue Nov 18, 2016
@Narretz
Copy link
Author

Narretz commented Nov 18, 2016

Great to hear. Tbh, I think the developer should make sure his tour elements are visible / can be scrolled to.

I think this library is very promising, although I've had to make a lot of modifications locally to make it suit my requirements. I hope to give something back in the form of pull requests. :D Alas, the time is the problem ...

@johanlahti
Copy link
Owner

It would be great with some contributions or even re-writes of some parts. I must admit the library is very "shaky" at the moment and not ready for use (should maybe emphasise this in the Readme).

Regarding the visibility, I agree the developer should make sure elements are visible. However, when applying responsive design patterns with CSS breakpoints, elements can be hidden on some screen sizes or hidden/shown on resize. In those cases it would be nice to skip to the next/previous slide.

Happy to hear you also see the potential in this library. You may have come across Intro.js which is very nice but in my opinion:

  • Is limited by its license in some cases
  • Design and interaction feels slightly old already (even though I bet it can be customised)
  • A little too complex (or too many features?)
  • It manipulates the rendered elements, raising z-index and changing style

The latter is avoided by adding a canvas on top. From my point of view, the library should be:

  1. As minimalistic as possible but do only what it's supposed to really well (i.e. introduce the site/app to the user)
  2. Easily extensible as opposed to offering many options
  3. Not modify the elements being visualised (unless it's part of the tutorial)

I think and hope point 1 and 2 goes inline with the limited time… :D

@Narretz
Copy link
Author

Narretz commented Nov 22, 2016

I absolutely agree with all your points! Like I described in the other issue I would also extend the minimalistic part to the use of the templates / elements.

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

No branches or pull requests

2 participants