willinteractive / will-style

WILL styles for webapps.
0 stars 0 forks source link

Code Example JS - We no longer want to show output HTML but the actual code used to create the element #27

Closed chorn99 closed 10 years ago

chorn99 commented 10 years ago

So If we have and are using a helper, we want to show the syntax for that helper and not the output HTML.

chadmoone commented 10 years ago

It's a good point that we want to show the helper methods, but I think we also need to show the actual HTML. We want it to be transparent exactly what the helpers are doing, and we may need to use the styles without the helpers available in some cases (static sites, landing pages, etc).

chorn99 commented 10 years ago

So probably both then.

dillonlucente commented 10 years ago

Yeah, this is a bit difficult since the code will be compiled before ruby can do anything about it. Let me see what I can come up with.

chadmoone commented 10 years ago

I think we may just need to move away from trying to render the actual source and instead write them both out.  I know it’s duplicative, but I think using the same source for display and examples is probably just a little too clever and rigid. If there’s multiple ways to do things, and especially if we’re using ruby helpers, we want to be able to show those.

-- Chad

On July 18, 2014 at 12:02:25 PM, Dillon Lucente (notifications@github.com) wrote:

Yeah, this is a bit difficult since the code will be compiled before ruby can do anything about it. Let me see what I can come up with.

— Reply to this email directly or view it on GitHub.

dillonlucente commented 10 years ago

Yeah, I just wanted to see if it was even possible to output a block call as a string. It looks like there are ways out there but I don't think it will handle ERB very well.

dillonlucente commented 10 years ago

Also, this is a style-guide only issue. I'm going to move it.