Skip to content
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

Let's start a discussion #184

Open
wants to merge 394 commits into
base: master
Choose a base branch
from
Open

Let's start a discussion #184

wants to merge 394 commits into from

Conversation

burtlo
Copy link

@burtlo burtlo commented May 24, 2012

A few weeks ago I started look at ways I could improve upon Showoff by adding:

  • Github Flavored Markdown

    Syntax Highlighting through code fences instead of the strange
    additional construct of using @@@ LANGUAGE within the code samples.
    Essentially your markdown can now adhere to more accepted markdown
    standards.

  • Static HTML and PDF

    All javascript, stylesheets, and images are embedded into the static HTML
    and PDF output. This allows the static HTML to better represent the
    presentation. This includes any custom javascript, css, or images defined
    within the presentation. This also embeds locally defined images within the
    CSS.

I think after that I went off the deep end trying to clean up and refactor the monolith sinatra class that contained all the parsing and rendering logic. At some point I questioned the usefulness of a showoff.json file and replaced with a showoff file which contained a DSL that allowed you to define sections and slides.

The README describes in far greater detail this implementation.

Final Note

This pull request is unreasonable in size, scope, and change. It is likely near impossible to visibly inspect it to gain a sense of it. I am absolutely not sure if there is a home for this abomination. However, I felt like freeing this Frankenstein...

@goncalossilva
Copy link
Collaborator

Wow.

I really think we should join efforts into improving showoff (vs forking it). Thanks for all this!

First of all, I couldn't agree more regarding GitHub's flavored markdown. It's the way to go, imo. I also like the stuff you did with static page & PDF generation. And finally, great work shrinking showoff.rb!

Having said this, I see a few issues with this pull request:

  • I love the syntax of the new config file (I'm a ruby guy, after all), but I strongly believe the JSON config file should not be deprecated (for now). Besides the obvious advantage of not breaking previous presentations, I'd say it's easier on non-programmers... but I could be wrong.
  • The README file cannot be merged as is, since it compares the current showoff with these changes.
  • I believe you missed some recent additions to showoff, like presentation templates, markdown engine configurability, the pause screen and presenter view <—> presentation view 2-way sync. Am I wrong?

Let's discuss this a bit more!

@alexch
Copy link
Collaborator

alexch commented May 24, 2012

FYI I'm kinda doing some of this already with deck.rb, which is based on a cleaner JS presentation layer and an arguably cleaner and better tested Ruby tool. http://github.com/alexch/deck.rb

(I'm not using full GFM but I'd love to be, and I'm inlining a lot of the JS and CSS too. Also it should be drop-in-compatible with showoff since I support showoff.json files so I'd love for more people to just give it a try and tell me what breaks.)

@burtlo
Copy link
Author

burtlo commented May 24, 2012

@goncalossilva this is to start a conversation, so don't feel too bad about the work I have done on the fork coordinating with your work. Thanks for taking a look at it and your feedback.

Supporting showoff.json

I am fairly certain that I could build an adapter to parse the previous showoff.json format.

I think the new format, though Ruby, is a little easier to read and possibly to understand for non-developers. There are overall less symbols { , }, [, ], : in the new format.

README

That of course would change if you are seriously considering this monstrous body of work.

Missing Features

Markdown Engine Configurability

I likely have broken the markdown engine configurability because I have never navigated this minefield before and when it came time to get Github Flavored Markdown (GFM), I simply opted for a solution that I found that worked. Namely using Redcarpet with Pygments.rb. Perhaps there is a way to restore that functionality

Presenter View and Presentation View

That functionality still exists and is working but is indeed missing from the documentation I composed.

Presentation Templates

I'm not sure what you mean by presentation templates? Are those the classes that can be applied to slides? The ability to request hostname:9090/onepage or hostname:9090/pdf?

@burtlo
Copy link
Author

burtlo commented May 24, 2012

Alright, both the server and the static generation will look for a showoff then the original showoff.json.

Also I took a moment to make the server and the static generation use the full filepath provided and not simply a directory.

So you could do something like:

$ bin/showoff server examples/showon
$ bin/showoff server examples/custom.json

Which will add those files to the list of files to search for when creating the presentation.

@burtlo
Copy link
Author

burtlo commented May 27, 2012

@goncalossilva let's talk about what you would love to see in a series of smaller pull requests:

  • Server refactor into parsers and renderers
  • Onepage and PDF inlined assets
  • Showoff DSL support with backwards compatibility to still use the existing JSON format
  • Github Flavored Markdown

I am running into some problems pushing this functionality to Heroku because of some python issues. I'll see what I can do to make this work.

  • Multi-column layout

This was something that I was working on in the last few commits.

  • Updated Example Presentation

I wanted to update the example presentation so that it actually show-cased Showoff and the majority of it's features.

  • RSpec test suite

How do you feel about having an RSpec test suite backed with Guard?

  • Reduced showoff command

I removed a large set of the showoff commands so that showoff could focus ensuring high quality of core commands. I also made the showoff command work when simply given a directory or filepath.

@goncalossilva
Copy link
Collaborator

@burtlo In parts:

Markdown Engine Configurability
I'll try to take a deeper look into this in the near future.

Presentation Templates
I'm talking about this: https://github.com/schacon/showoff#templates

RSpec test suite
Any test suite is better than no test suite :p

The rest seems fine. Your PR breakdown looks good to me. After ironing out the questions about the MD engines and the templates, I think we're good to go.

I think this is the best approach:

  • Iron out the remaining questions
  • Release a new 0.7.X version of showoff
  • Merge most of this in smaller PR, if possible
  • Iron out some rough edges, make a pre release
  • Release 0.8

These are big changes. I'm strongly in favor of most of them. Let's see if @schacon can weigh in on this!

@burtlo
Copy link
Author

burtlo commented May 28, 2012

Oh templates! I must have forked before templates. I'll work on how that would integrate with the work I've done.

@goncalossilva
Copy link
Collaborator

There were a few commits after that one :|

Everything after 580c025 (https://github.com/schacon/showoff/commits/master?page=2).

@burtlo
Copy link
Author

burtlo commented May 28, 2012

Looking over the current template implementation, I'm not sure why the templates aren't simply using erb. Would you be opposed to using ERB?

<div style='background-color: red;' id='<%= id %>' class='slide <%= slide_classes %>' data-transition='<%= transition %>'>
  <div class='content <%= content_classes %>' ref='<%= reference %>'>
    <%= content_as_html %>
  </div>
</div>

Within the showoff file, a template name can be associated with a
template file. That name can be used within the slides to generate
a slide with that template file.
@goncalossilva
Copy link
Collaborator

Not at all. Did you check out the rest of the commits?

@burtlo
Copy link
Author

burtlo commented May 28, 2012

Yes, I'm looking them over.

Franklin Webber added 3 commits May 28, 2012 16:20
Presentations are able to define a pause message for the pause
screen. Unlike most features which is configurable per section,
this one is only valid on the top level showoff file
Franklin Webber and others added 30 commits April 12, 2013 19:46
because I got stuck thinking options were --thing=value
Added example generate presentation command
…er to user the correct renderer for content with caption
Allow the ability to define section specific slide styles and classes.

```
section "Iteration 0" do
  css_classes "greed-background"
  slides "iteration-zero.md"
end

section "Iteration 1" do
  css_classes "blue-background"
  slides "iteration-zero.md"
end
``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants