-
Notifications
You must be signed in to change notification settings - Fork 430
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the history before rendering promoted frames (#618)
* Add a updateHistory check to visit * make frame change history before rendering * add frame fixture * extract history logic to History class * maintain the same restorationIdentifier * remove guard that was always true * lint * make history receive a method * lint * reset frame and action at each nav * udpate ids to reflect each link * extract getVisitAction and fix compiler issues * lint * add before-frame-render event and make the render pausable * Add test showcasing the URL being updated first * add pause/abort tests for frames * update ids to match initial page * remove before-frame-render event code since it was introduced in #431 * yarn.lock * yarn.lock
- Loading branch information
1 parent
975054b
commit 82937c6
Showing
9 changed files
with
129 additions
and
13 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Tabs</title> | ||
<script src="/dist/turbo.es2017-umd.js"></script> | ||
<script src="/src/tests/fixtures/test.js"></script> | ||
</head> | ||
<body> | ||
<h1>Tabs</h1> | ||
|
||
<turbo-frame id="tab-frame" data-turbo-action="advance"> | ||
<div> | ||
<a id="tab-1" href="/src/tests/fixtures/tabs.html">Tab 1</a> | ||
<a id="tab-2" href="/src/tests/fixtures/tabs/two.html">Tab 2</a> | ||
<a id="tab-3" href="/src/tests/fixtures/tabs/three.html">Tab 3</a> | ||
</div> | ||
|
||
<div id="tab-content">One</div> | ||
</turbo-frame> | ||
</body> | ||
</html> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<turbo-frame id="tab-frame" data-turbo-action="advance"> | ||
<div> | ||
<a id="tabs-1" href="/src/tests/fixtures/tabs.html">Tab 1</a> | ||
<a id="tabs-2" href="/src/tests/fixtures/tabs/two.html">Tab 2</a> | ||
<a id="tabs-3" href="/src/tests/fixtures/tabs/three.html">Tab 3</a> | ||
</div> | ||
|
||
<div id="tab-content">Three</div> | ||
</turbo-frame> |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<turbo-frame id="tab-frame" data-turbo-action="advance"> | ||
<div> | ||
<a id="tab-1" href="/src/tests/fixtures/tabs.html">Tab 1</a> | ||
<a id="tab-2" href="/src/tests/fixtures/tabs/two.html">Tab 2</a> | ||
<a id="tab-3" href="/src/tests/fixtures/tabs/three.html">Tab 3</a> | ||
</div> | ||
|
||
<div id="tab-content">Two</div> | ||
</turbo-frame> |
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