Add support for data-transition attributes used by Push.js#7
Open
creature wants to merge 3 commits intojsdf:masterfrom
Open
Add support for data-transition attributes used by Push.js#7creature wants to merge 3 commits intojsdf:masterfrom
creature wants to merge 3 commits intojsdf:masterfrom
Conversation
If TableViewCell has an href prop, then the transition prop gets included as a data-transition attribute on the child <a href> tag. Push.js uses this attribute to transition views in and out.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I've been using React-ratchet to build an app that supports server-side rendering. One useful facility provided by Ratchet is Push.js, a tool that takes a page load and animates the transition between pages. To enable that, Push.js looks for a
data-transitionattribute on links.This changeset adds support for an optional
transitionprop on the<TableViewCell>and<NavButton>components, that get added as adata-attribute on the generated links. This is only strictly necessary on the<TableViewCell>because<NavButton>automatically copies all its props to attributes, but I thought it better to have a consistent interface. I've added tests too, but there's probably a neater way to write them.I also had to make some tweaks to the
package.jsonfile to make the test suite run (as I was hitting errors along these lines), but these could be backed out if they're not universally applicable.