-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Transitions #525
Merged
Merged
Transitions #525
Changes from 28 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
2784ae0
parse transition directives
Rich-Harris 4fa7765
failing test for intro transition
Rich-Harris 9df2243
Merge branch 'master' into gh-7
Rich-Harris d0c0fbc
add transitions property to default export, track intros/outros in Block
Rich-Harris 8ccad1f
first working intro transition, woooo
Rich-Harris 6ed2a6c
update tests
Rich-Harris 53c5c32
allow parameter-less transitions
Rich-Harris 2a5b0ee
support very basic outro transitions
Rich-Harris 7f76ab2
Merge branch 'master' into gh-7
Rich-Harris aa67f8b
abort transitions
Rich-Harris 45a9ce0
handle bidirectional transitions differently
Rich-Harris 806b098
CSS transitions
Rich-Harris d63f80f
never abort transitions, they are either bidi or non-abortable
Rich-Harris 5638a76
restart animations on secondary intro, various bits of cleanup
Rich-Harris 5bee31f
get basic intro transition test passing
Rich-Harris 26ed672
some more transition tests, albeit somewhat ugly
Rich-Harris dfe00d8
support dynamic simple if-blocks
Rich-Harris ec0e4a6
support transitions in compound if-blocks
Rich-Harris 07f6ec5
only apply easing function once!
Rich-Harris f5bc3e3
remove method is unused
Rich-Harris f76fac2
tighten up transition tests
Rich-Harris 65064cb
improve deindent slightly — allow inline false expressions (which get…
Rich-Harris a2cd983
intro transitions in each-blocks
Rich-Harris 2d533f9
remove redundant ternary
Rich-Harris 42af2bb
fix mount order of keyed each-block with intros
Rich-Harris f06eced
unkeyed each-blocks with outros
Rich-Harris 22ac50a
outros on keyed each-blocks
Rich-Harris b8affd4
simplify/unify transitions
Rich-Harris 8da7019
rename styles method to css - less ambiguity over what it returns, no…
Rich-Harris dee8694
merge master -> gh-7
Rich-Harris e796fef
stringify helpers before bundling
Rich-Harris bdfa01b
fix script path, duh
Rich-Harris d7b3f2e
lint after build
Rich-Harris 90adb3b
gah node 4
Rich-Harris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
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.
Since
.bind
is slower than pretty much every other option of calling a function later, we could do something likewhich would be slightly faster. Here's a test showing this: https://jsperf.com/bind-vs-self-closure (interestingly enough the calling of a
.bind
ed function is no slower than the closure in firefox, but in chrome it's 10x slower)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.
That's probably better, yeah. If we wanted to be really clever, the fastest way to run
oncreate
would probably be to rewrite references tothis
, the same way we do in non-hoisted event handlers:Or is that a terrible idea?
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.
(obviously that only works if
oncreate
is declared inline — if it's a reference we'd still need to.call
it)