Closed VitorVRS closed 3 years ago
That's such a good idea @VitorVRS, thanks for this.
Can you please share your thoughts on this? what kind of plugin do you need or let's say what you would like to do with a plugin?
Actually, i don't know how you could do that. But just reading some PR's i could see that people create a lot of "options" which, maybe, can be useful or not.
In my case, i modified IntroJS to work with iframes ( a very specifi way) and change do work dynamic elements for step ( i knew all of the steps, but the elements were not in DOM yet); And a lot of things.
I think you should review all PR's and analyse what is better to do. Maybe there is nothing.
Thanks for your project. :100:
Hi @VitorVRS,
may be you could explain more how did you do that ? I need to do something similar with iFrame as you explain.
thanks in advance.
@julienchepa in my case i used before and after callback to wait for the next element appear (iframe loading), unfortunately i did not created an fork :/ But my whole as based on this PR: https://github.com/usablica/intro.js/pull/596
Another thing what i did: i change most of the calculations for postioning to work with iframes.
I hope i was clear enough for you.
Might use more event-based logic in the library, and perhaps create some generic, class-like objects that can be extended.
I'm thinking of how extensible the LeafletJS library is (to which I've contributed a few plugins).
Basically, they have generic Layers (used to be Classes) that can be extended and have methods to listen to or trigger events. Because it's so generic, any Layer can be added to a Map, and when initialized, added, or any other event happens a plugin can execute custom code. The plugin code has access to helper functions as well, for element creation, classname manipulation, positioning, etc.
I would be interested to hear a few more cases in which plugins would make sense, and we could develop an extensible system with those cases in mind.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I suggest to implement some kind o plugin system for IntroJS, since there are a lot of pull requests sending new "options" adding new features, which doesn't seem necessary.
In my case, i had to fork project and add new options (just to solve my problem). I would enjoy to turn my changes into an plugin to avoid messing with IntroJS core.
Tks.