-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Fix carousel transition duration #25218
Merged
Johann-S
merged 21 commits into
twbs:v4-dev
from
MartijnCuppens:fix-carousel-transition-duration
Feb 19, 2018
Merged
Changes from 4 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e84f92c
Fix carousel transition duration
MartijnCuppens 0a4967c
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 79b5335
Add visual test for changed transition-duration of carousel-item
MartijnCuppens 1e13251
Merge branch 'v4-dev' into fix-carousel-transition-duration
Johann-S 44fb2e9
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 1206b54
Carousel: transition duration documentation
MartijnCuppens bbc2d66
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens c385f68
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 86d3645
Remove newline
MartijnCuppens 7ba6e72
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 11460c4
Merge branch 'v4-dev' into fix-carousel-transition-duration
XhmikosR eeef19b
Update carousel.md
XhmikosR c6b721a
Break line.
XhmikosR cb2873a
adjust docs copy
mdo 39ca5be
shorter heading
mdo 7a4cc99
formatting of comment
mdo 5527e9c
Remove ES6
MartijnCuppens ce25310
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 463db01
Merge branch 'v4-dev' into fix-carousel-transition-duration
MartijnCuppens 3ff95f6
Merge branch 'v4-dev' into fix-carousel-transition-duration
XhmikosR fd9e5d4
Merge branch 'v4-dev' into fix-carousel-transition-duration
Johann-S 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,17 @@ | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||
<link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> | ||
<title>Carousel</title> | ||
<style> | ||
.carousel-item { | ||
transition: transform 2s ease, opacity .5s ease; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<h1>Carousel <small>Bootstrap Visual Test</small></h1> | ||
|
||
<p>Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p> | ||
<p>The transition duration should be around 2s. Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p> | ||
|
||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> | ||
<ol class="carousel-indicators"> | ||
|
@@ -46,9 +51,14 @@ <h1>Carousel <small>Bootstrap Visual Test</small></h1> | |
|
||
<script> | ||
$(function() { | ||
var t0, t1; | ||
|
||
// Test to show that the carousel doesn't slide when the current tab isn't visible | ||
$('#carousel-example-generic').on('slid.bs.carousel', function(event) { | ||
console.log('slid at ', event.timeStamp) | ||
t1 = performance.now() | ||
console.log(`transition-duration took ${t1 - t0}ms, slid at `, event.timeStamp) | ||
}).on('slide.bs.carousel', function() { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you remove the use of ES6 template here, we aren't in our code source |
||
t0 = performance.now() | ||
}) | ||
}) | ||
</script> | ||
|
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
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.
If you use
includes
here, does babel take care of it or do we need a polyfill?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.
Or even
endsWith
?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.
@XhmikosR, just tested this,
includes
andendsWith
are not polyfilled by babel.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.
Thanks for testing. Not sure if we need to enable something else in our babel config, but it gets out of this PRs scope anyway.