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

Inline snippets not rendering #30

Closed
wireframe opened this issue Apr 14, 2016 · 15 comments
Closed

Inline snippets not rendering #30

wireframe opened this issue Apr 14, 2016 · 15 comments

Comments

@wireframe
Copy link

I've run the example "dummy" app multiple times and things work great, but when I use the addon generators w/ nearly the exact same markup, I don't see any of the inline rendered snippets for code/markup/etc.

I have this issue with my custom components as well as the default freestyle-palette components.

Any tips for how to debug/troubleshoot?

@chrislopresto
Copy link
Owner

@wireframe I'm happy to help out and see what's going on, but I'll need some details. Can you copy/paste code samples or share links to a public gist or repository?

@wireframe
Copy link
Author

I'll do my best to create a simple testcase. My guess at the moment is that it may have something to do with organizing my components into pods?

I'm using the ember-component-css addon which requires pods at the moment.

@chrislopresto
Copy link
Owner

You may need to specify snippetSearchPaths like this:

snippetSearchPaths: ['tests/dummy/app', 'app/styles']

By default, ember-freestyle looks in app. I obviously need to document this!

@chrislopresto
Copy link
Owner

FYI, the technique comes from https://github.com/ef4/ember-code-snippet

@chrislopresto
Copy link
Owner

@wireframe Let me know if this resolves things for you.

@wireframe
Copy link
Author

Thanks Chris. I'll try to test out this change today!


Ryan Sonnek
ryan.sonnek@gmail.com

On Apr 20, 2016, at 11:12 AM, Chris LoPresto notifications@github.com wrote:

@wireframe https://github.com/wireframe Let me know if this resolves things for you.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub #30 (comment)

@wireframe
Copy link
Author

Unfortunately, No :dice: using this approach. It could easily be user error, but I've been unable to trace down the root cause of this issue.

I'm going to have to table this issue for the time being, and you can feel free to close out this issue until I have time to revisit it further.

@mszoernyi
Copy link
Contributor

@wireframe Is you freestyle.hbs shareable? I'm using a pod structure as well with ember-component-css and I'm just about to setup everything. I could try your setting on the way and figure out what setting you need to set.

@mszoernyi
Copy link
Contributor

I would suggest we add some sane defaults for the snippet path based on the usePods flag.

snippetSearchPaths for pod structure: ['tests/dummy/app', 'app']
snippetSearchPaths for normal structure: ['tests/dummy/app/styles', 'app/styles']

@jeffsawatzky
Copy link

I think I am having a similar issue. I found that inline snippets in my scss files are not found, but if I put them in a js file (like the freestyle.js controller) then they are found.

The scss files are in the app folder, so I believe they should be in the snippetSearchPaths by default.

The example snippet that works in js but not scss is:

/* BEGIN-FREESTYLE-USAGE modules-buttons-normal:notes

Use these whenever you need some kind of clickable surface to afford an action that
isn't a boring, inconspicuous text link.

END-FREESTYLE-USAGE */

@chrislopresto
Copy link
Owner

@Niltz I just realized that I never wired up SCSS notes snippets. #63 will do the trick. I'll merge it and cut a new release.

@chrislopresto
Copy link
Owner

FYI, this whole setup needs to be cleaned up. I think these are the two next issues to focus on:

@chrislopresto
Copy link
Owner

@Niltz I just published v0.2.12, which supports SCSS note snippets. You can see it in action here:

Source

/* BEGIN-FREESTYLE-USAGE fpi:notes
# Markdown Notes In SCSS!
Hey look... these are `mardown` notes:
- coming from scss
- looking nice
END-FREESTYLE-USAGE */

/* BEGIN-FREESTYLE-USAGE fpi:notes
# Markdown Notes In SCSS!

Hey look... these are `markdown` notes:

- coming from scss
- looking nice

END-FREESTYLE-USAGE */

Rendered
http://chrislopresto.github.io/ember-freestyle/?f=fpi&m=false&s=Visual%20Style&ss=Color

@jeffsawatzky
Copy link

@chrislopresto v0.2.12 fixes my issue. Thanks!

@chrislopresto
Copy link
Owner

@wireframe I'm going to close this for now. Feel free to reopen or open a new issue if your problem persists.

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

No branches or pull requests

4 participants