-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
Add Substeps #81
Comments
I kind of try to avoid that. It's so 'powerpointish' ;) But I understand that it's sometimes useful to reveal some additional information without the need to change to next step or slide. So I'll think about that :) |
Hehe, yes I do understand you :) Nevertheless as "traditional" slides are possible, this makes sense. My last presentation (the first one with impress.js) was kind of a hybrid and I could have used them, went well anyway though ;) 'action' may also a good candidate for this. And another extension which goes in combination for this, it's like adding a javascript call into the "keyboard navigation", which is kinda impossible in any of the html/javascript slides I've seen. Because something like this is not good:
Maybe something like this makes sense: What do you thing? |
Heh, I was actually thinking about such scripts, too. :) The The But I really can't promise if it will be solved any time soon. |
You could potentially add a "step" javascript event, so that you could do, for example: <div id="part5" class="step">
</div> $('#part5').step(function() {
alert('step 5 was shown');
}); A user could potentially then write handlers to attach to every step, or whatever jquery selectors they want. Going further, there could be a few events: beforeStepStart, afterStepStart, beforeStepEnd, afterStepEnd. Gives a javascript developer a lot of power, without actually baking much extra into impress.js itself. |
It doesn't have much to do with substeps described here, but yes, such events may be useful. It's partly discussed in issue about public API #9, but I think I'll probably develop it separately, to release simple API earlier. |
Another use-case for actions would be to run animations. At the moment animations are timed by a delay in the css. If you are running a presentation, open up a new step talk a bit and you will then run an animation I would like to trigger it by hitting the next button or click with the mouse. |
I just wanted to say that I would love to see substeps as well... I have a few slideshows that I would like to transform to impress.js, but they all have sort of substeps that appear only step by step (arrows, descriptions, instructions, etc...) |
The first problem I encountered was how to add substeps when I try to learn and make my first small presentation by impress.js today. It's better to show step by step sometimes. |
+1 on sub steps. Need them ASAP. |
Substeps indeed are mandatory (in my opinion) - as an option, so you can easily switch whether to use them or not, it's good to use them in presentation but later when you give a link to it, it may make no sense to show substeps. I've once written some quick implementation for impress.js, which worked quite well. I'll see if it can be easily ported now and eventually propose a pull request. |
I see your points guys I just want to make sure the solution is simple and possibly implemented outside of the core code. Cause let's be honest. Sub-steps have nothing to do with impress transitions. We simply want "some other action" to be triggered instead of So this can be a modification of But of course I understand that from a users perspective it doesn't really matter - you just want any way to use substeps, possibly as simple as adding some |
This was actually the first thing I realized I needed too - and I ended up implementing it before I found this issue. My implementation is a quick-and-simple one, but I thought I'd mention it here for, uhm, possible inspiration? Basically, when a step is activated I add a "hidden" classname to all sub-elements with the classname "point" (yeah, needs renaming), then when next() is called it removes that classname until there are no "hidden" elements left, then advances to the next step. This way you can do CSS animations etc, just like you would when the step is activated. Also, since "hidden" is added by impress.js, the elements will show up if it's not up-and-running. I set it up so that the sub-elements are only hidden when going forward, so when you go back a step ("oops") everything is showing. This has worked pretty nicely for my case, while being a quite minimal implementation. I'm guessing you'd want to modify my code, since I wanted to make really minimal changes and ended up adding a few lines to goto(), prev() and next(). It could be made more beautiful by adding the functionality 'deeper'. But having said that, I could provide the changes, if you want to take a look...? Awesome project, by the way - keep up the good work! |
I'm not sure if this concept is the same as what you call sub steps, but I'd love to be able to show a high level overview of a grouping of steps and then zoom in on them and start iterating through them one-by-one, with the ability to jump up a level as needed to remind the audience of where we are in the talk. That would be great for helping the audience follow my talk as I'm speaking. This seems like what sub steps would solve, but this idea doesn't seem "Powerpointish" at all. Quite the opposite in fact, transitioning from step to step in a liner fashion seems more Powerpointish than that. Am I misunderstanding something here? Can impress.js do this? |
@joefiorini I think that your idea can be implemented by adding arbitrary "sub-overview" steps in your presentation. As you can see in the demo source, the Hope it answers your question. |
+1 for substep usage like in the first comment here! |
I was looking into different other html5 presentation toolkits right now. Some things I really like in reveal.js that may be applicable to that use-case:
Reveal.JS: http://lab.hakim.se/reveal-js |
we use the attribute http://shama.github.com/jmpress.js/docs/#docs-animation |
I like the "fragment" class from reveal.js and I'm experimenting with it in impress.js as follow:
As the prev function is unaffected, calling prev will jump to the first state of a step, which makes more sense for me. I see 3 obvious improvements:
Does it make sense and more importantly, is there any chance for this or something similar to be integrated? |
I needed to trigger some functions when my presentation reached certain step, like start playing a video or something like that, but I didn't wanted to modify the library code, so I tried to use backbone.js's Router, and it works. I'm sure there may be better ways to do that, and with this solution you still can't have substeps. |
+1 Substeps |
You might want to give a try to #215 . |
+1. I have some huge UML diagram in |
+1 |
oh man, I know how much you want it :) And I even have an idea how I'd like to have it implemented... if only I had time for that :) |
Here's my two cents to handling this problem: Inside impress.js
var slidestates = slide.getAttribute('slide-states') ;
if (slidestates > 0) {
var evt = new CustomEvent("nextSlideState",
{ detail : { curSlide : slide, curState : slidestates },
bubbles: true, cancelable: true});
document.dispatchEvent(evt);
slidestates -= 1;
slide.setAttribute('slide-states', slidestates);
} else {
nextSlide();
} User code: <ul>
<li class="state1 hidden"> shows in state1 </li>
<li class="state2 hidden">shows in state2</li>
<li class="state1 hidden">shows in state1</li>
</ul> var nextState = function(e) {
var slide = e.detail.curSlide;
var remaining_states = e.detail.curState;
var thisState = ".state" + remaining_states;
var toBuild = slide.querySelectorAll(".hidden" + thisState);
for (var i = 0; i < toBuild.length; ++i) {
var toB = toBuild[i];
toB.classList.remove('hidden');
toB.classList.remove(thisState);
toB.classList.add('current');
}
};
document.addEventListener("nextSlideState", nextState); |
It would be great if there were a mailing list for this, since github's bugzilla doesn't even allow attachments, but this is how I did it: I used a different type of slide class called a build, which allows you to add stuff to an existing step, as many things as you want, including per build animations (like thinks flying in or rotating). The code is fairly easy for steps, but gets messy for disjoint navigation: |
I implemented substeps in a fork. I am trying to keep it current with impress.js as it make sense, with only my substep code added. You can see more, grab the code, or fork it here: You can see the diff of how I implemented substeps here: I don't expect the pull request to be merged, but it's a good reference for one approach to substeps. HTH :) |
I agree this would be a good feature :-) |
@tehfoo why you don not do a pull request ? |
I am working on a solution for this problem. Basically with this solution there is the possibility to add javascript functions as "tweensteps". In this functions you can do whatever you want. Also, there are functions for reverse the changes done by these step-functions. When the work and the testing is done, i will file a pull-request or create a fork. |
Tween not steps pls
|
@Announcement Thanks for the hint. My fault. I corrected it. |
We needed the "substep"-feature mentioned in the impress#81 issue. We implemented 4 API functions for assigning functions to the steps. Every mentioned API function takes two parameters: The id of the step and a function that should be executed on a given time. There can be one function per step for entering. There can be one function per step for leaving. There can be many functions per step that act as "substeps". The user can then modify everything he wants with simple js. These functions are called trough next(). The first defined function is executed first. There can be one function per step that allows resetting the changes done by the "substep-functions". Our changes are all backwards-compatible, so it will not break anything from anyone. We have tested it with a variety of browsers. We did this with 13 line html (demo), 10 line css (demo) and 46 lines js (framework). In total less than 70 lines of code added. If you have something you want to speak about or you are not happy with, feel free to contact us (info@patricebeeutler.ch).
We needed the "substep"-feature mentioned in the impress#81 issue. We implemented 4 API functions for assigning functions to the steps. Every mentioned API function takes two parameters: The id of the step and a function that should be executed on a given time. There can be one function per step for entering. There can be one function per step for leaving. There can be many functions per step that act as "substeps". The user can then modify everything he wants with simple js. These functions are called trough next(). The first defined function is executed first. There can be one function per step that allows resetting the changes done by the "substep-functions". Our changes are all backwards-compatible, so it will not break anything from anyone. We have tested it with a variety of browsers. We did this with 13 line html (demo), 10 line css (demo) and 46 lines js (framework). In total less than 70 lines of code added. If you have something you want to speak about or you are not happy with, feel free to discuss.
Hey people. If you need this now take a look at my fork: https://github.com/patricebeutler/impress.js. Its exactly the same beside the supsteps-feature. Let me know what you think. The demo is updated, so you can download it and take a look at it. Should be pretty straight-forward. |
Any chance this will be merged? |
Seems like @bartaz doesn't have much time for this project recently. However, it would be great if a solution could be found that this repository stays at least maintained. There are several forks of it currently, can't use them simultaneously. |
Hi @calebeby, @naraesk and others Thanks for pinging on this thread again. Like bartaz, I kinda felt this is a silly powerpoint feature, so it wasn't top of my priority list last year. At the same time, it is true this must be the most requested feature at this point. So I have implemented it in my fork today. (Demo).
Just to let everyone know, my fork:
|
@henrikingo Thanks for the update. That's good to hear that you are maintaining a fork. Thanks! |
@henrikingo - Thank you for the update. I also did some work on the sub-steps feature that was commonly requested. I did this by introducing two new functions (e.g. registerEnter and registerExit) that will allow the user to register any function as a sub-step inside a slide. The ability to introduce user defined functions as sub-steps gives the user the flexibility to do whatever they want as a sub-step (e.g. growing/shrinking text, transition opacity from 0 to 1, spinning text, etc). I committed the code to a fork of this project just for the sake of sharing this idea and the corresponding committed code (url provided below). I am not going to actively maintain the forked version - i just forked the project in order to provide the following url.
|
substep plugin is now merged to master. |
Hey there,
I would like to see "substeps". I don't know how to call those properly, I give a little description:
Imagine you have your presentation with some slides/steps. Now on one slide you have a list and you want to fly in the list items one-by-one each by a arrow right keystroke. I tried it that way:
It didn't worked, of course I didn't expected that. But would be cool to have something like that.
Thanks very much.
The text was updated successfully, but these errors were encountered: