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

Support tagless wormholes #70

Open
simonihmig opened this issue Sep 23, 2016 · 7 comments
Open

Support tagless wormholes #70

simonihmig opened this issue Sep 23, 2016 · 7 comments

Comments

@simonihmig
Copy link
Contributor

I was trying to create a tagless wormhole for not adding anything to the DOM where the wormhole is placed, like this: {{#ember-wormhole tagName="" to="..."}. This failed badly, both the wormholed content as well as I think the sibling nodes of the wormhole got screwed up badly.

I can try to bring up a more precise description of what the effect exactly is if needed, but it seems this just does not work at all. Without having looked too deeply into the implementation of ember-wormhole, I wonder is this known, or is there a good reason why this does not / cannot work?

I kind of feel like the wormhole should by tagless by default, or at least support this, because when you do not want to have your wormholed content to sit in the DOM where it logically belongs to (which is why you use the wormhole in the first place, right?), then you also do not want an empty, "orphaned" div to hang around. With some "loose" CSS selectors this empty div could actually get some styling applied and thus become visible.

If this use case has been overlooked so far, I might try to bring up a PR when I find the time...

Apart from that, this addon has been so useful in so many cases! 👍

@lukemelia
Copy link
Contributor

@krisselden should this be possible?

@urbany
Copy link

urbany commented Nov 14, 2016

I also wanted to know if this was possible. Any update on this @lukemelia ?
If not possible, maybe the default tagName should be span so it isn't an element with display: block.

@lukemelia
Copy link
Contributor

@urbany I haven't had time to look into this and don't have any short-term plans to do so. Happy for someone else to dig in, though.

@simonihmig
Copy link
Contributor Author

@lukemelia maybe I can try to do that...

However I wonder if there is some kind of major rewrite of ember-wormhole pending that would make tweaks like that obsolete? I am just guessing because of the other issue I filed (#66) and the PR (glimmerjs/glimmer-vm#331) that provided a better integration for Glimmer2.

If I understand correctly that better Glimmer2 integration has not been done yet, right? Would that support the tagless use case better, or even solve it naturally?

Just don't want to loose time on a very short term interim fix...

@lukemelia
Copy link
Contributor

There is work in progress for Glimmer2, most recently #75. @krisselden & @rwjblue may be able to provide more context as it relates to your possibly work.

@simonihmig
Copy link
Contributor Author

Yeah, I have seen this PR already, but it seems to have tackled some other problem. Not the new integration hook provided for Glimmer2 (the #-in-element thing). That is also already in the works?

@lukemelia
Copy link
Contributor

@simonihmig the in-element thing was worked on by @runspired but he discovered that the API was not yet sufficient to support wormhole's semantics.

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

3 participants