-
Notifications
You must be signed in to change notification settings - Fork 24
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
How can I use octane / glimmer components? #59
Comments
I haven’t used Ember Octane yet so I’m behind the curve here. Previously
you could invoke a nested component like this with a slash
“input/datetime”. Does that still work?
This is part of a growing list of items that may necessitate a major change
with how this library invokes components for newer version of Ember.
…On Wed, Mar 4, 2020 at 3:16 AM Bouke Haarsma ***@***.***> wrote:
I've been using ember-islands for some time now, with great success.
However with the advent of Octane / Glimmer components, I'm not use how to
use them with ember-islands. Suppose the following file structure:
- components
- input
- datetime.hbs
- datetime.ts (or .js for that matter)
In normal template use, I would invoke it like so:
<Input::Datetime />
However with ember-islands I've tried input::datetime and that results in
an error in the console: "fullname is required".
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#59?email_source=notifications&email_token=AAADWQM6UMYEI4TX4IZGB3TRFYE5PA5CNFSM4LA63DRKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4ISJCQCQ>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAADWQISHN72TSOTPDWUGCLRFYE5PANCNFSM4LA63DRA>
.
|
I couldn't get it to work with a slash ( |
I'm working on seeing what I can do to get this working, as it's blocking our ability to migrate to Template Colocation in our applications. So far, it's been a challenge to get things working with Template Colocation. Basically, the approach that If there is no JS file, there's actually no class at all to call If there is a JS file, calling One thing we might be able to support is template colocation only in cases where
I did attempt a large-scale refactor to use the
I'm going to keep working on this tomorrow, but wanted to leave some details around what I have tried and what I found. |
Thanks for the notes, @alexlafroscia. I also took a shot at getting glimmer components working back in March. I just pushed those changes and WIP commit for what I had in progress on my computer. It's been awhile but I think I came to similar conclusions. Since Octane landed, there is no longer a clear seam in Ember for creating components. Getting this to work seems possible but it's a question of how brittle we'll allow the implementation to be. You should also know that when moving to Ember 2, the core team was invested in making sure that Ember Islands kept working. Some tests from this work still exist in Ember. However, I think the tests as they stand today demonstrate an alternative proposal from @chancancode using
At this point I'm not opposed to a breaking change since moving to Octane is a large undertaking for most code bases. I'm not bothered by the append-to-marker vs replace-marker issue. It seems like something that could be managed by most consumers as long as they know it's coming. The |
The “ember-islands-only” component is an approach that I’m considering as well; that would also make it obvious why there’s a handful of components that can’t be updated to use the new features/patterns. Another thing I’m considering is whether something like this addon might be a better approach https://github.com/Ravenstine/ember-custom-elements It seems like a more “modern” approach using features that weren’t available when this addon was first written. I think I’m going to try that out and see if that could fit the use-case that we have instead.. |
I've been using ember-islands for some time now, with great success. However with the advent of Octane / Glimmer components, I'm not use how to use them with ember-islands. Suppose the following file structure:
In normal template use, I would invoke it like so:
However with ember-islands I've tried
input::datetime
and that results in an error in the console: "fullname is required".The text was updated successfully, but these errors were encountered: