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 HTML component #237

Closed
wants to merge 2 commits into from
Closed

Add HTML component #237

wants to merge 2 commits into from

Conversation

wwwillchen
Copy link
Collaborator

There's a couple open questions on the implementation, I'd like to get your thoughts on:

  1. There's no styling inside the iframe. Should we inject the stylesheet in here?
  2. The iframe height is arbitrary (browser default). Should we try to automatically resize the iframe based on the content or should Mesop app developers set a height?

Closes #156.

@richard-to
Copy link
Collaborator

  1. There's no styling inside the iframe. Should we inject the stylesheet in here?

What do you mean by "inject the stylesheet"?

When using the iframe with source doc, is the user able to reference assets (Javascript, CSS) from other domains or would they need to reference from same domain? Or is that not allowed for security reasons?

I guess if linking to external resources is not allowed, then one could write the js/css in the html head. Probably not that user friendly, but since this is an advanced use case, probably ok. Although would be hard to manage.

  1. The iframe height is arbitrary (browser default). Should we try to automatically resize the iframe based on the content or should Mesop app developers set a height?

I think the app developer should able to set the height. So if there is auto resize as a default and the user could resize as an override, that may be more convenient.

Copy link
Collaborator

@richard-to richard-to left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM


## Examples

<iframe class="component-demo" src="https://mesop-y677hytkra-uc.a.run.app/link"></iframe>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit] Looks like these are pointing to "link" when it should be html?

@wwwillchen
Copy link
Collaborator Author

will re-open once I've been able to address the comments.

@wwwillchen wwwillchen closed this May 19, 2024
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

Successfully merging this pull request may close these issues.

Add a component to directly embed html
2 participants