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

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

Projects

None yet

4 participants

@cakenggt
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
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
Contributor
cmontella commented Jan 5, 2017 edited

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
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