[EuiTour] Allow attaching tour steps via HTMLElement or DOM selector#5696
[EuiTour] Allow attaching tour steps via HTMLElement or DOM selector#5696thompsongl merged 19 commits intoelastic:mainfrom
Conversation
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
👋 @kertal @Heenawter @andreadelrio I was told that y'all would be interested in these changes. Before I formalize testing and documentation, does it seem like this addition will solve your case for |
|
@thompsongl Wow, this looks great!! Thanks so much for working on it :) I'm going to take some time today to test this locally and see what I can do with it - but from a code review only, it looks like exactly what we were looking for! |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
@thompsongl So far, it's definitely a whole lot easier to use!! I was able to add a two step tour to Discover with minimal effort to elements that I was unable to even target before, which is awesome! :) 2022-03-08_ShortDiscoverTour.mp4A few notes/ideas of things that would make it even easier to use:
This is so exciting!! I'm stoked to see where this goes 🔥 |
|
@Heenawter Happy to see that this helps! Thanks for awesome feedback, also. What I'll do is 1) round out the DOM selector feature in this PR and 2) open issues/PRs for your suggestions. I'd like to think through options for a single injection point (á la |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |
cee-chen
left a comment
There was a problem hiding this comment.
I have a some optional unit test feedback, but otherwise this LGTM!
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_5696/ |

Summary
Closes #5576.
Adds an
anchorprop toEuiTourStepthat accepts an HTMLElement or function returning an HTMLElement, or a DOM querySelector.anchorprop toEuiTourStepanchorinstead of supplyingchildrenEuiTourStepwill not wait for the element to exist before attempting to renderwindow.requestAnimationFramefindElementserviceChecklist