{"action":"created","issue":{"url":"https://api.github.com/repos/rstudio/htmltools/issues/13","repository_url":"https://api.github.com/repos/rstudio/htmltools","labels_url":"https://api.github.com/repos/rstudio/htmltools/issues/13/labels{/name}","comments_url":"https://api.github.com/repos/rstudio/htmltools/issues/13/comments","events_url":"https://api.github.com/repos/rstudio/htmltools/issues/13/events","html_url":"https://github.com/rstudio/htmltools/issues/13","id":39731092,"number":13,"title":"Support for carrying along external CSV/JSON files","user":{"login":"ramnathv","id":346288,"avatar_url":"https://avatars.githubusercontent.com/u/346288?v=3","gravatar_id":"","url":"https://api.github.com/users/ramnathv","html_url":"https://github.com/ramnathv","followers_url":"https://api.github.com/users/ramnathv/followers","following_url":"https://api.github.com/users/ramnathv/following{/other_user}","gists_url":"https://api.github.com/users/ramnathv/gists{/gist_id}","starred_url":"https://api.github.com/users/ramnathv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ramnathv/subscriptions","organizations_url":"https://api.github.com/users/ramnathv/orgs","repos_url":"https://api.github.com/users/ramnathv/repos","events_url":"https://api.github.com/users/ramnathv/events{/privacy}","received_events_url":"https://api.github.com/users/ramnathv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":16,"created_at":"2014-08-07T14:32:22Z","updated_at":"2016-11-08T13:50:02Z","closed_at":null,"body":"The idea would be to allow external CSV/JSON files to be copied to the temp directory in which the `html` file is generated so that the page can make use of it. This behavior is very beneficial especially when you are reading large `geojson` files and want to keep the file external to your html.\n"},"comment":{"url":"https://api.github.com/repos/rstudio/htmltools/issues/comments/259140804","html_url":"https://github.com/rstudio/htmltools/issues/13#issuecomment-259140804","issue_url":"https://api.github.com/repos/rstudio/htmltools/issues/13","id":259140804,"user":{"login":"jjallaire","id":104391,"avatar_url":"https://avatars.githubusercontent.com/u/104391?v=3","gravatar_id":"","url":"https://api.github.com/users/jjallaire","html_url":"https://github.com/jjallaire","followers_url":"https://api.github.com/users/jjallaire/followers","following_url":"https://api.github.com/users/jjallaire/following{/other_user}","gists_url":"https://api.github.com/users/jjallaire/gists{/gist_id}","starred_url":"https://api.github.com/users/jjallaire/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jjallaire/subscriptions","organizations_url":"https://api.github.com/users/jjallaire/orgs","repos_url":"https://api.github.com/users/jjallaire/repos","events_url":"https://api.github.com/users/jjallaire/events{/privacy}","received_events_url":"https://api.github.com/users/jjallaire/received_events","type":"User","site_admin":false},"created_at":"2016-11-08T13:50:02Z","updated_at":"2016-11-08T13:50:02Z","body":"I think there are a couple of issues to navigate here:\n\n1. I think the dependency needs to make a strong assertion that it's\nincompatible with self_contained: true and that needs to result in a clear\nerror message during rendering. This is especially so because\nself_contained is the default behavior.\n\n2. I don't know how this will work with Shiny applications which run in\nread-only directories (e.g. deployed to a server) as those applications are\nnot able to write to the filesystem. As a result Shiny \"resolves\" HTML\ndependencies by calling addResourcePath on the system.file pointed to by\nthe dependency. @jcheng5 what are the implications of dependencies that\n*must* be written to the filesystem.\n\n\nOn Tue, Nov 8, 2016 at 4:50 AM, hafen <notifications@github.com> wrote:\n\n> I have a use case that expands on this thread (and several other related\n> threads - this seemed like the most appropriate place to continue\n> discussion).\n>\n> I have an htmlwidget where the associated JS library requires files to be\n> written to disk and these files are later loaded dynamically based the\n> user's interactions with the app (using jsonp). Because of this approach,\n> any kind of dependency attachment or data attachment as has been proposed\n> will be inadequate. These are assets that need to be made available along\n> with the generated index.html, but that make no sense being embedded in the\n> page in script tags because that's not how the JS library that loads the\n> files on demand operates.\n>\n> Because of this, I need to be able to know the directory of html_print\n> beforehand so I know where to write these files. I want to be able to\n> specify this directory beforehand so that I can both print and potentially\n> modify these files in subsequent R actions prior to viewing.\n>\n> I made a slight modification to htmltools and htmlwidgets that allows meet\n> this need. Basically, I'm allowing www_dir to be an optional parameter to\n> html_print instead of it being hard coded inside html_print. The default\n> stays the same, and checking is done to make sure it's in the temporary\n> directory. In htmlwidgets, I modified it so you have the option to specify\n> www_dir at the time of creating the widget, and this is then passed to\n> html_print (should probably add in the same temp directory checking here\n> as well). Everything stays completely transparent to any other user, it's\n> just an extra internal option for an htmlwidget author to take advantage of\n> that has a use case like this. Any concerns about this?\n>\n> The one thing about this use case that might be bothersome is that there's\n> no way to have the standalone option in this case. But that's just how it\n> is and I'm sure there are other JS libraries that will have this same\n> requirement.\n>\n> Modifications:\n>\n> master...hafen:feature/customdir\n> <https://github.com/rstudio/htmltools/compare/master...hafen:feature/customdir>\n>\n> ramnathv/htmlwidgets@master...hafen:feature/customdir\n> <https://github.com/ramnathv/htmlwidgets/compare/master...hafen:feature/customdir>\n>\n> —\n> You are receiving this because you were mentioned.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/rstudio/htmltools/issues/13#issuecomment-259092492>,\n> or mute the thread\n> <https://github.com/notifications/unsubscribe-auth/AAGXx3Za109Jl3vtVG4FLnz5QAvyOaoNks5q8EX9gaJpZM4CVGuI>\n> .\n>\n"}}
{"actor":{"display_login":"jjallaire"}}