-
Notifications
You must be signed in to change notification settings - Fork 16
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
WIP - Add scripts support #24
WIP - Add scripts support #24
Conversation
.*ignore files are just hand written, may be missing a few things
Generally, I think issues are a great way to start the conversation. I'm happy to start on the PR. The big thing to consider with scripts is security. I think it's probably a bad default to run scripts, certainly from a different origin. Is there an attribute to run scripts? Then, how does this work with CSP? |
@@ -0,0 +1,47 @@ | |||
/** @type {import('eslint').Linter.BaseConfig} */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep the PR focused on one thing, and make project setup changes a different PR.
@@ -0,0 +1,122 @@ | |||
import React, { useEffect, useState } from 'react' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is there React code in this PR?
I didn't even include Lit in the first version because this component didn't need dependencies. I'd be very against including React. What's it for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR LLM spam?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too harsh Benny, IMO.
A React shim for seems like it should live in a separate package, and possibly not in the html-include-element git repo. As this is written, it seems that html-include would need to take a dependency on React, when currently it has zero deps.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Originally this was written in a react app, before I knew about html-include-element.
I'll use co-pilot for trivial suggestions, but that's it. I got burned a couple times on medium-size snippet suggestions and it was just the WORST!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Never intended to suggest this project add react, but I know there's a lot of goofs out there that may frolic along thinking adding react to everything is fine and normal lol.
I think a react-shim doesn't even need to use html-include per se.
I'm actually going in a different direction, creating my own soup-to-nuts react shim for my projects specific use case. In that shim, I may create some options around <ReactShadow>
, or let the consumer of some widget decide if they want to wrap it in <ReactShadow>
or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The shim will be for a solid-js based "micro-frontend"
17d7f00
to
d0aedcd
Compare
I won't delete this branch, in case anyone that stumbles upon this is also interested in adding some sort of scripts support. |
This is VERY much a work-in-progress.
Opening early for visibility/feedback/etc