-
Notifications
You must be signed in to change notification settings - Fork 184
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
Allow RootElements and RootContainers to specify their node type #532
Conversation
if (k !== 'tagName') { | ||
root.setAttribute(k, v) | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit actually isn't necessary. The attributes we pass through are white listed in RootElement.js.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I hadn't gotten far enough... looks like it's being added as an attr there now. Hmm...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, its a kinda ugly bit of code. No harm arises by putting the attribute on the node, but its redundant information because the node with be of the type specified so I chose to exclude it.
I like this. It's going to be a cool improvement! |
🚀 i dig it |
Hi @kcjonson, I just took another pass through here and realized that the root elements created during client transitions will also need to respect It would be good to have a test page set up to play around with this. You could either create a new page, or modify an existing page like the navigation playground to use non-div root containers/elements. That could actually really simplify the playground, which is table-like, but uses CSS on divs to lay it out. The other benefit there is you can use it to test all of the navigation variants (client transitions with and without DOM reuse, etc). So, I think the remaining things I'd like to see here are:
BTW - You'll probably want to pull and bootstrap to pick up #533 before you work on test pages. |
Good catch on the transition bug, will address that and moving the tagName out of attrs which was a dubiously good decision to put them there in the first place. Will put some time into the playground too, as you know CSS/HTML is my jam. |
Kevin Jonson seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. |
…o root-node-tagnames
This reverts commit 9a6d065.
@kcjonson looks like you may have committed as a different user than your github user -- maybe as your work user? Its possible adding another email address to your gh profile would resolve this, or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kcjonson I'm really looking forward to this change! Can you review the issues previously brought up and rebase from the master branch to ensure all tests work properly? We'd love to get this integrated but the PR has been sitting out there for a while!
Closing this PR since there is no movement. |
tagName
attribute onRootElement
andRootContainer
that specifies what tag the element or container will render with.ClientController
to search for any node type with matching data attribute (not just div)Example usage: