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

Fallback SVG #73

Closed
meowsus opened this issue Oct 10, 2017 · 2 comments
Closed

Fallback SVG #73

meowsus opened this issue Oct 10, 2017 · 2 comments
Labels

Comments

@meowsus
Copy link

meowsus commented Oct 10, 2017

Hey @jamesmartin.

This use case is a bit weird, but I wanted to get your take on it. I couldn't think of a way to solve it using a transformation, but I might have been missing something obvious.

In our platform, developers can use a custom DSL to create a specific type of object in the system called a Content Block. Each Content Block is graphically represented within the administration area of the site. A developer can upload an SVG so that the Content Block they created renders not only the name, but also a real nice icon as well.

The problem is that the icon isn't required, in a technical sense, which actually was the catalyst for the opening of that default CSS class PR i did.

Taking this one step further, I'm curious if you find it useful to offer a fallback SVG path as part of the API?

inline_svg('path/to/my/risky.svg, fallback: 'totally/safe/fallback.svg')
@jamesmartin
Copy link
Owner

@meowsus I'm not opposed to this idea. We would need to reserve the :fallback param in perpetuity, meaning no custom transformations named Fallback could be used, which doesn't seem like a huge problem but would be a breaking change.

I'd be happy to help you get a PR merged if you're keen to work on this feature.

meowsus pushed a commit to meowsus/inline_svg that referenced this issue Oct 10, 2017
Refactor placeholder method

Test

Re: jamesmartin#73
meowsus pushed a commit to meowsus/inline_svg that referenced this issue Oct 10, 2017
Refactor placeholder method

Test

Re: jamesmartin#73
meowsus pushed a commit to meowsus/inline_svg that referenced this issue Oct 10, 2017
Refactor placeholder method

Test

Re: jamesmartin#73
@meowsus
Copy link
Author

meowsus commented Oct 19, 2017

Closing, since the spike in #74 was merged.

@meowsus meowsus closed this as completed Oct 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants