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

Unable to set 'tag' multiple times on entity #719

Open
cakenggt opened this issue Jan 2, 2017 · 3 comments
Open

Unable to set 'tag' multiple times on entity #719

cakenggt opened this issue Jan 2, 2017 · 3 comments

Comments

@cakenggt
Copy link

cakenggt commented Jan 2, 2017

If you download this gist: https://gist.githubusercontent.com/anonymous/abe3ec76cbaa3eca39cf54d7c1c3aa50

I am just committing 3 spans to the browser, each with an additional tag. I get the title warning in the console and none of them show up.

I can determine that the reason they don't show up is that they are added to the DOM as "filter" elements, which is actually the second tag on each span. If we reverse the order of the tags on the records, they will get added to the DOM, but the errors still appear in the console.

I thought from this line in the todo example that it was possible to set additional tags on records you commit to the browser. https://github.com/witheve/Eve/blob/master/examples/todomvc.eve#L61

@btheado
Copy link
Contributor

btheado commented Jan 5, 2017

I looked at this and noticed if you change the tag name to something other than "filter" then it works fine. I guess "filter" is a valid svg tag name. See https://github.com/witheve/Eve/blob/master/src/renderer.ts#L198

@cmontella
Copy link
Contributor

cmontella commented Jan 5, 2017

Right, this the renderer is choosing the type of the element based on the last valid tag, so when you reverse them, it's taking the span tag instead of the filter tag as the element.

The error in the console is unrelated to why the div is not displaying, in the first place (the reason being that it was a filter element, and not a span).

@joshuafcole
Copy link
Contributor

The error message technically is related in a very convoluted way. It's essentially the renderer throwing it's hands up in the air when it sees a situation it can't sanely resolve (that is, determining whether you meant the element to be a span tagged filter or a filter tagged span). That said, the tooling around the renderer is basically non-existent since it was written long before channels existed for that. Besides fixing the namespace collision issue, which we still need to do, we also need to catch renderer errors and display them in a human-readable way for users.

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

4 participants