A light-weight, no-dependency, vanilla JavaScript engine to drive user's focus across the page
22.66k
stars
1.01k
forks
source link
Add new overlay and popup configuration options, allow to pass function which returns Element in element step config #508
Open
enp-kbeda opened 2 months ago
Hello, I'd like to propose these new features:
overlayEnable
config option, enabled by default. This property allows library consumers to disable highlight overlay if they wish. (https://github.com/kamranahmedse/driver.js/commit/741f521a1548b294cab3c4ac0470ad26ecaf43de) To keep the functionality of closing highlight when user clicks away I needed to add new window click listener whenoverlayEnable
is set tofalse
(https://github.com/kamranahmedse/driver.js/commit/ffbe5050f9579b8996e40d75164775927e483b4e)popoverStickToViewport
config option, enabled by default. This property allows library consumers to disable popover viewport sticking. When it's set tofalse
popover always stays next to thestep.element
(https://github.com/kamranahmedse/driver.js/commit/7fd1726411501ac38b431bf99d58d93757b6d3c6)document.querySelector
(https://github.com/kamranahmedse/driver.js/commit/5d1ec417a9de44c18bc595872c6a406541e08b56)allowScroll
config option, enabled by default. This property allows library consumers to disable body scrolling when driver is active (https://github.com/kamranahmedse/driver.js/pull/508/commits/2d48c134db3efc2fc303fd289dedc96c8fd8f4aa)animateBetweenSameElements
config option, enabled by default. This property allows library consumers to disable popup animation when multiple steps are assigned to the same html element (https://github.com/kamranahmedse/driver.js/pull/508/commits/be29918ef80e982595898fd0b74b733b2b9dfd62)requireRefresh
calls which resulted in broken layout (video of the issue - https://drive.google.com/file/d/1JjQZuctRSwiBExAQDDFbALvIrsjdqHKK/view?usp=sharing) (https://github.com/kamranahmedse/driver.js/pull/508/commits/b11d4e22c811cd464ed51937a0a298e6acfa31cc)step.element
- this fixes the issue where user could make it soelement
is not visible at all on the page - https://drive.google.com/file/d/1FDr8yNEsNc6onkIVNBBykxwFU5uCDEdD/view?usp=sharing (https://github.com/kamranahmedse/driver.js/pull/508/commits/c86bf598f432cbc482752ad3296f2661f436103b)I've added interactive examples of config options in
index.html