-
Notifications
You must be signed in to change notification settings - Fork 73
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
Allow loading SVGs asynchronously and one by one #94
Comments
I would like this too. Probably so would #45. General idea:
Depends. I'd start with when the component is inserted, and not do anything smart unless the developer opts-in. For example giving them a service to preload particular svgs, so they can block and wait in their route's model hook. Or perhaps giving them a loadAll method they can put in their application route, if we can tell what "All" means – more below.
Does it need to? Preloading could be another approach: let developers load svgs in routes when they know they're going to need them. The previously mentioned service could handle this. It could also provide information about ongoing downloads without preloading, perhaps to implement a progress bar or similar.
Ember components and computed properties should handle this nicely? I wonder if there's a security issue though. Imaging the developer passes user data in. If Any URL, or just SVGs from sourceDirsThis last point brings up a point that seems like an important fork in the road. For preloading, if If just using SVGs from sourceDirs – like the other strategies do – it could create a manifest file listing which svgs it processed and where to find them (relative path or url, asset fingerprinting). That list defines "all SVGs" for a loadAll method. Manifest / any URL:
Or just let the browser do it for you?
|
Would be pretty sweet, if we could have a new loading strategy, that allows us to not bundle the SVGs into the JS or some joint SVG file.
This allows us to:
Problems:
{{svg-jar someVar}}
)The text was updated successfully, but these errors were encountered: