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

Distribution questions #3

Open
dy opened this issue Dec 2, 2020 · 2 comments
Open

Distribution questions #3

dy opened this issue Dec 2, 2020 · 2 comments

Comments

@dy
Copy link
Owner

dy commented Dec 2, 2020

What's the format to declare/describe/deliver component - html, js?

There are reasonable discussions for HTML imports: this, this. There's also OOHTML include, HTML imports and others.
Basically now there's no non-JS mechanism to import HTML.

The point is the following: since we can't have purely declarative custom elements (we still require JS or faking declarativity), so then modules mechanism also can be done via JS, which is there already. Then the question is: to fake or not to fake (HTML imports)?

JS (not to fake)

👍🏼 js allows both import 'component.js' and <script src="component.js">
👍🏼 js relegates shared dependency problem to npm
👎🏼 how do we bundle element-defs HTML to JS?

If we stick to github elements convention https://github.com/github/auto-complete-element.
👎🏼 Then the point of element definition tag is reduced significantly.

HTML (to fake)

👎🏼 html requires <include-fragment>, then it's unclear what fragment must be included - whole <element-defs> or element inside <element-defs>? uce-template doesn't have that problem.
👎🏼 if <element-defs> is used per-package - how to resolve the shared element-defs dependency in HTML? we cannot imply that is being available globally.

Manual deps

👍🏼 From this thread: these components can be made snippets and inserted manually, as old-school jQuery plugins.
👎🏼 There's no apparent way to reuse components even within a project.

@dy
Copy link
Owner Author

dy commented Oct 8, 2021

On the other side, just consider .vue, .uce and other templates. It's complete madness, is it? They wire in CLI tools, compiling, own syntax, own imports and so on, ignoring what's there. Even something with minimal layer, hoping to become a standard thing one day is better. Then the question is what's that minimal layer to enable declarative components, aspiring to get erased in the future?

@dy
Copy link
Owner Author

dy commented Oct 11, 2021

From practical point, we maybe not need as much to have separate components at first, we could just start with template instantiation. That's still useful to create new content in DOM via instancing, rather than innerHTML or externalities.

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

1 participant