Skip to content

Commit

Permalink
keep the to classes for a smoother transition
Browse files Browse the repository at this point in the history
In the next transition we will remove _all_ classes provided and re-add
the once we need.
  • Loading branch information
RobinMalfait committed Apr 12, 2022
1 parent f65890b commit 265acfa
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter to\\"
+ class=\\"\\""
+ class=\\"to\\""
`)
})

Expand Down Expand Up @@ -525,7 +525,7 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter to\\"
+ class=\\"\\""
+ class=\\"to\\""
`)
})

Expand Down Expand Up @@ -573,7 +573,7 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter to\\"
+ class=\\"\\""
+ class=\\"to\\""
`)
})

Expand Down Expand Up @@ -622,7 +622,7 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter to\\"
+ class=\\"\\""
+ class=\\"to\\""
`)
})

Expand Down Expand Up @@ -724,7 +724,7 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"leave to\\"
+ class=\\"\\"
+ class=\\"to\\"
+ hidden=\\"\\"
+ style=\\"display: none;\\""
`)
Expand Down Expand Up @@ -794,10 +794,10 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter enter-to\\"
+ class=\\"\\"
+ class=\\"enter-to\\"
Render 4:
- class=\\"\\"
- class=\\"enter-to\\"
+ class=\\"leave leave-from\\"
Render 5:
Expand Down Expand Up @@ -883,10 +883,10 @@ describe('Transitions', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter enter-to\\"
+ class=\\"\\"
+ class=\\"enter-to\\"
Render 4:
- class=\\"\\"
- class=\\"enter-to\\"
+ class=\\"leave leave-from\\"
Render 5:
Expand All @@ -896,12 +896,12 @@ describe('Transitions', () => {
Render 6: Transition took at least 75ms (yes)
- class=\\"leave leave-to\\"
- style=\\"\\"
+ class=\\"\\"
+ class=\\"leave-to\\"
+ hidden=\\"\\"
+ style=\\"display: none;\\"
Render 7:
- class=\\"\\"
- class=\\"leave-to\\"
- hidden=\\"\\"
- style=\\"display: none;\\"
+ class=\\"enter enter-from\\"
Expand All @@ -913,7 +913,7 @@ describe('Transitions', () => {
Render 9: Transition took at least 75ms (yes)
- class=\\"enter enter-to\\"
+ class=\\"\\""
+ class=\\"enter-to\\""
`)
})
)
Expand Down Expand Up @@ -1174,10 +1174,10 @@ describe('Events', () => {
Render 3: Transition took at least 50ms (yes)
- class=\\"enter enter-to\\"
+ class=\\"\\"
+ class=\\"enter-to\\"
Render 4:
- class=\\"\\"
- class=\\"enter-to\\"
+ class=\\"leave leave-from\\"
Render 5:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export function transition(

waitForTransition(node, (reason) => {
if (reason === Reason.Ended) {
removeClasses(node, ...base, ...to)
removeClasses(node, ...base)
addClasses(node, ...classes.entered)
}

Expand Down

0 comments on commit 265acfa

Please sign in to comment.