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

Add a function in leanbuild for handling iframes aka leanbuild::include_iframe() #6

Closed
cansavvy opened this issue Aug 20, 2021 · 8 comments
Assignees

Comments

@cansavvy
Copy link
Contributor

There's a need for a include_iframe() function here. See https://github.com/jhudsl/leanbuild/pull/3/files#r692949964 for more context.

The idea would be to just supply an iframe link and turn it into something of this format:

{alt: "expectation document", height: "351", width: "568", align: "middle"}
![](https://widgets.figshare.com/articles/5427418/embed?show_title=1)

currently iframe links need to be supplied like:

<<p align="center"><iframe width="560" height="315" alt = "video of Russell McClain on biases and stereotypes" src="https://www.youtube.com/embed/yiZQaE0q9BY" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></p>

I'm adding these to our test_cases.Rmd in https://github.com/jhudsl/DaSL_Course_Template_Bookdown/blob/main/03-test_cases.Rmd

@carriewright11
Copy link
Member

carriewright11 commented Aug 20, 2021

I can edit the include_url() aspects of my scripts (which is currently supported) to also accommodate include_iframe().

For videos that would result in something like this:
{type: video, poster: 'http://img.youtube.com/vi/VOCYL-FNbr0/mqdefault.jpg',height: "400px", width: "100%", align: "middle"} ![Video](https://www.youtube.com/watch?v=yiZQaE0q9BY)

For embedded files it would result in:

Check out this [link](https://widgets.figshare.com/articles/5427418/embed?show_title=1)!

@cansavvy
Copy link
Contributor Author

What I'm trying to do is move the code from your scripts into the package itself so that we don't have to call those scripts but we still have the functionality from those scripts automatically when someone installs the leanbuild package. I think what you're describing would still require we use extra scripts.

@carriewright11
Copy link
Member

Yes, sorry I was in the middle of writing a new comment to say that I thought I misunderstood you. I thought you were talking about cases of include_iframe() instead of include_url.

@carriewright11
Copy link
Member

I agree that we want to allow people to just use leanbuild - that is what I was hoping for as well and planning to do but just hadn't done yet. I figured we could incorporate my scripts into the package to just see if this worked and then work to functionalize my scripts, but it's ok to skip that step.

@carriewright11
Copy link
Member

I don't think leanbuild does anything with iframes currently (not thinking about calling my scripts within it) so I got confused.

@cansavvy
Copy link
Contributor Author

Ah. Yeah that's my point. I think we should make it so leanbuild does handle iframes. I probably didn't describe this well but that was my intent of this issue.

@cansavvy cansavvy changed the title Add leanbuild::include_iframe() Add a function in leanbuild for handling iframes aka leanbuild::include_iframe() Aug 20, 2021
@cansavvy cansavvy self-assigned this Aug 22, 2021
@cansavvy
Copy link
Contributor Author

After chatting with @carriewright11 my understanding is that these are the things that are broken that I'm going to work on integrating fixes into the package:

  • instances of knitr::include_url do not render to markua friendly
  • youtube links need to be translated to watch links so they are clickable.
  • youtube tags need to have the youtube image bit

@cansavvy
Copy link
Contributor Author

This has been accomplished.

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

2 participants