Add ability to skip individual slides #185

Merged
merged 1 commit into from Jan 21, 2013

Conversation

Projects
None yet
4 participants
@rafmagana

Sometimes one wants to see how the presentation looks like without some slides (mostly when we are uncertain about keeping slide or not) but one don't want to delete them, here's an example:

!SLIDE bullets incremental transition=fade skip

# Bullet Points #

* first point
* second point
* third point

what do you think?

@goncalossilva

This comment has been minimized.

Show comment Hide comment
@goncalossilva

goncalossilva Jun 7, 2012

Collaborator

I like this. I'm not sure if skip is better than ignore, but it's not really that important.

We're in the middle of a big discussion at PR #184. Maybe @burtlo could take a look at this and merge it with his branch?

Thanks!

Collaborator

goncalossilva commented Jun 7, 2012

I like this. I'm not sure if skip is better than ignore, but it's not really that important.

We're in the middle of a big discussion at PR #184. Maybe @burtlo could take a look at this and merge it with his branch?

Thanks!

@goncalossilva

This comment has been minimized.

Show comment Hide comment
@goncalossilva

goncalossilva Jun 7, 2012

Collaborator

A note about this on the README would be pretty cool, too.

Collaborator

goncalossilva commented Jun 7, 2012

A note about this on the README would be pretty cool, too.

@rafmagana

This comment has been minimized.

Show comment Hide comment
@rafmagana

rafmagana Jun 7, 2012

Are you talking about this? rafmagana/showoff@81a5669#diff-0

Are you talking about this? rafmagana/showoff@81a5669#diff-0

@goncalossilva

This comment has been minimized.

Show comment Hide comment
@goncalossilva

goncalossilva Jun 7, 2012

Collaborator

Yes. I have no idea how I missed that.

Collaborator

goncalossilva commented Jun 7, 2012

Yes. I have no idea how I missed that.

@burtlo

This comment has been minimized.

Show comment Hide comment
@burtlo

burtlo Jun 7, 2012

I will definitely add this feature to the branch I have created.

burtlo commented Jun 7, 2012

I will definitely add this feature to the branch I have created.

@rafmagana

This comment has been minimized.

Show comment Hide comment
@rafmagana

rafmagana Jun 7, 2012

@burtlo are you gonna use my commits or make the change yourself? Thanks anyways

@burtlo are you gonna use my commits or make the change yourself? Thanks anyways

@burtlo

This comment has been minimized.

Show comment Hide comment
@burtlo

burtlo Jun 7, 2012

Most of the work on the branch is vastly different. So I will have to interpret and write the changes myself.

burtlo commented Jun 7, 2012

Most of the work on the branch is vastly different. So I will have to interpret and write the changes myself.

@goncalossilva

This comment has been minimized.

Show comment Hide comment
@goncalossilva

goncalossilva Jun 7, 2012

Collaborator

git commit --author="Rafael Magana <rafmagana@gmail.com>" works, too :)

Collaborator

goncalossilva commented Jun 7, 2012

git commit --author="Rafael Magana <rafmagana@gmail.com>" works, too :)

@rafmagana

This comment has been minimized.

Show comment Hide comment
@rafmagana

rafmagana Jun 7, 2012

That would be awesome, but I can add that functionality after your commits gets merged too. What do you think, @burtlo ?

That would be awesome, but I can add that functionality after your commits gets merged too. What do you think, @burtlo ?

@burtlo

This comment has been minimized.

Show comment Hide comment
@burtlo

burtlo Jun 7, 2012

@rafmagana currently the state of slide metadata has a poor implementation to support this feature.

I've updated the current implementation of Metadata.parse to use a list of parsers, which are simply classes that define the format of the metadata that is being captured.

Right now, there is no formal parsers registration, it's simply an entry in that list of classes.

So, if you would like to implement this functionality in the current setup I have you would:

  • Define a file in the lib/metadata folder, require it in the lib/metadata.rb file
  • Add it into the order of parsers, likely before CSSClasses, as that one swallows all terms to be CSS classes.
  • Add an attr_accessor for the skipping/ignoring

Then for the slide to be ignored/skipped, you will need to decide:

  • Do you want to have the slide ignored from the start, when it is parsed?

    Then you want to update the MarkdownSlideSplitter to simply not add slides with that metadata.

  • Do you want the slide to be included but simply not rendered?

    Then you want to likely create a new post renderer that could be initialized with the current state in the metadata and simply returns nil content. That will remote the content and that empty slide should be removed when the html content is compact'd and then join'd.

burtlo commented Jun 7, 2012

@rafmagana currently the state of slide metadata has a poor implementation to support this feature.

I've updated the current implementation of Metadata.parse to use a list of parsers, which are simply classes that define the format of the metadata that is being captured.

Right now, there is no formal parsers registration, it's simply an entry in that list of classes.

So, if you would like to implement this functionality in the current setup I have you would:

  • Define a file in the lib/metadata folder, require it in the lib/metadata.rb file
  • Add it into the order of parsers, likely before CSSClasses, as that one swallows all terms to be CSS classes.
  • Add an attr_accessor for the skipping/ignoring

Then for the slide to be ignored/skipped, you will need to decide:

  • Do you want to have the slide ignored from the start, when it is parsed?

    Then you want to update the MarkdownSlideSplitter to simply not add slides with that metadata.

  • Do you want the slide to be included but simply not rendered?

    Then you want to likely create a new post renderer that could be initialized with the current state in the metadata and simply returns nil content. That will remote the content and that empty slide should be removed when the html content is compact'd and then join'd.

@rafmagana

This comment has been minimized.

Show comment Hide comment
@rafmagana

rafmagana Jun 11, 2012

@burtlo Cool, I will check your code out and add the functionality, should I fork your code and make a pull request to your repository? or how do you recommend me to do it?

@burtlo Cool, I will check your code out and add the functionality, should I fork your code and make a pull request to your repository? or how do you recommend me to do it?

@burtlo

This comment has been minimized.

Show comment Hide comment
@burtlo

burtlo Jun 11, 2012

Yes, @rafmagana fork my code and send me a pull request. That would be awesome!

burtlo commented Jun 11, 2012

Yes, @rafmagana fork my code and send me a pull request. That would be awesome!

@rafmagana

This comment has been minimized.

Show comment Hide comment
@rafmagana

rafmagana Jun 11, 2012

@burtlo ok, I will do it as soon as I have time, thanks!

@burtlo ok, I will do it as soon as I have time, thanks!

matthewmccullough added a commit that referenced this pull request Jan 21, 2013

Merge pull request #185 from rafmagana/skip_slides
Add ability to skip individual slides

@matthewmccullough matthewmccullough merged commit e68a92b into schacon:master Jan 21, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment