-
-
Notifications
You must be signed in to change notification settings - Fork 280
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
Ship remarkjs JavaScript dependencies for offline use #251
Comments
Hi @gadenbuie , just to be sure, do you consider here that Usually I use that when I want to be sure that it works offline and also to block the remark version in time. I guess offline mode is currently opt-in for user and not default, and one should not forget to summon its remark version 😄 I think one version included could be a way to help that, but one reason against I see is it would also means some more maintenance as the evolution of remark;js would need to be follow closely to decide when it should be updated. Currently, not being decoupled, offer the latests feature of remark.js, with the cost of fixing as needed when someone reports it 😅 |
I think that this is helpful for advanced users. On the other hand, I think the most user-friendly approach is to make the defaults easy and to allow advanced users to be the ones to opt-in to a different approach. This is the common across R Markdown packages — for example, pagedown ships its major dependencies. This is the argument I feel most strongly about. I think that shipping the dependency is best for xaringan users.
We've already pinned the default to remarkjs version 0.14 in #247. Given that remarkjs has been "stable" (as in, not changing) for so long, there are a lot of expectations around how xaringan works. Upstream changes are almost certainly not going to take into account our user base unless we start participating in the remarkjs repo more carefully. Overall, I see this point as being a positive: decoupling from the latest version of remarkjs gives xaringan time to react to upstream changes without having to worry about constantly needing to plug holes. |
It is the case also for @yihui, was there a specific reason you did not include a version of the library inside the 📦 ? |
Yes, it is common for R packages to bundle JS libraries. I guess xaringan is the only exception. The reasons why I didn't do it were:
Reasons 1 and 4 are minor. 2 and 3 are selfish: the work is hard for me (I don't even know how to write tests for newer versions of remark.js), but the workaround is relatively easy for users. I have added a note in the documentation to remind users of downloading a copy of remark.js via 9679396, but I doubt if any user would notice it on the help page. Perhaps we can emit a message (once per session) as a reminder?... |
I use xaringan for all my slides and I expect it to be reliable and stable. I welcome new features only if they don't break my existing slides. As xaringan gains popularity. I suspect people will demand more stability from xaringan. |
@tcgriffith I agree. |
I'm sure there would be people who would try this. Also in the end this is a task for maintainers (multiple people, not you alone) to move forward. If we keep pointing to remark-latest.js the next issue related to a remark release happening over night is just a matter of time. I'd highly prefer to point to a release version. |
I think they will be much more careful next time. I can pin the the version of remark.js to 0.14.1 again if anything breaks in |
Your choice in the end 😄 Just pointing out my concerns which only and always aim to make things better (for everyone hopefully) :) |
Thanks! Those are totally valid concerns. I promise I'll pin the version next time :) I just want to give the new remark.js maintainers one more chance. I believe they will become more professional. |
Hi guys, The pain is real, effectively working on planes or presenting as a guest in a place where you don´t have internet connection is more common than you think and a problem if you decide to incorporate equations... That really leads me to use LaTeX's prosper as I usually use maths on my presentations, but on the other hand I really like the simplicity of Xaringan... So... Any plan to add offline support for features that otherwise require an internet connection? Cheers, Jose |
I just want to add that this problem is not limited to people on a plane. I work within a corporate secure environment with no access to internet. Apart from downloading the package, I don't have access to internet, not even to use the function I would have loved to use xaringan to document my R analysis like I did before in an online environment. However, it's either impossible or too complicated. I just wanted to add my 2 cents here in case this discussion comes back up again. Thanks. |
Related to #245 and inspired by a recent cross-country flight, I propose that we include the remarkjs JavaScript dependencies in the package for offline use.
Maybe we should because:
Maybe we shouldn't because:
Any other reasons for/against?
And if it's agreeable, I'll be happy to take on the PR.
** I made this statistic up, but I think we all know it's true.
The text was updated successfully, but these errors were encountered: