-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(subscriptions/detail): introduce infinite scrolling
This will replace the "Load more" button with infinite scrolling.
- Loading branch information
Showing
10 changed files
with
65 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -68,7 +68,7 @@ | |
</div> | ||
</header> | ||
|
||
<main class="main"> | ||
<main class="main" id="scroll-container"> | ||
{{outlet}} | ||
</main> | ||
|
||
|
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,14 @@ | ||
import { modifier } from "ember-modifier"; | ||
|
||
export default modifier(function inViewport( | ||
element, | ||
_, | ||
{ onEnter = () => {}, onExit = () => {}, root = "#scroll-container" } | ||
) { | ||
const intersectionObserver = new IntersectionObserver( | ||
([{ isIntersecting }]) => (isIntersecting ? onEnter() : onExit()), | ||
{ root: root instanceof Element ? root : document.getElementById(root) } | ||
); | ||
intersectionObserver.observe(element); | ||
return () => intersectionObserver.disconnect(); | ||
}); |
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
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 |
---|---|---|
|
@@ -7230,7 +7230,7 @@ ember-cli-typescript@^3.0.0, ember-cli-typescript@^3.1.3, ember-cli-typescript@^ | |
stagehand "^1.0.0" | ||
walk-sync "^2.0.0" | ||
|
||
ember-cli-typescript@^4.0.0, ember-cli-typescript@^4.1.0: | ||
ember-cli-typescript@^4.0.0, ember-cli-typescript@^4.1.0, ember-cli-typescript@^4.2.1: | ||
version "4.2.1" | ||
resolved "https://registry.yarnpkg.com/ember-cli-typescript/-/ember-cli-typescript-4.2.1.tgz#54d08fc90318cc986f3ea562f93ce58a6cc4c24d" | ||
integrity sha512-0iKTZ+/wH6UB/VTWKvGuXlmwiE8HSIGcxHamwNhEC5x1mN3z8RfvsFZdQWYUzIWFN2Tek0gmepGRPTwWdBYl/A== | ||
|
@@ -7403,7 +7403,7 @@ ember-compatibility-helpers@^1.1.2, ember-compatibility-helpers@^1.2.0: | |
ember-cli-version-checker "^2.1.1" | ||
semver "^5.4.1" | ||
|
||
ember-compatibility-helpers@^1.2.1, ember-compatibility-helpers@^1.2.4: | ||
ember-compatibility-helpers@^1.2.1, ember-compatibility-helpers@^1.2.4, ember-compatibility-helpers@^1.2.5: | ||
version "1.2.5" | ||
resolved "https://registry.yarnpkg.com/ember-compatibility-helpers/-/ember-compatibility-helpers-1.2.5.tgz#b8363b1d5b8725afa9a4fe2b2986ac28626c6f23" | ||
integrity sha512-7cddkQQp8Rs2Mqrj0xqZ0uO7eC9tBCKyZNcP2iE1RxQqOGPv8fiPkj1TUeidUB/Qe80lstoVXWMEuqqhW7Yy9A== | ||
|
@@ -7656,6 +7656,17 @@ ember-modifier@^2.1.0: | |
ember-destroyable-polyfill "^2.0.2" | ||
ember-modifier-manager-polyfill "^1.2.0" | ||
|
||
ember-modifier@^3.1.0: | ||
version "3.1.0" | ||
resolved "https://registry.yarnpkg.com/ember-modifier/-/ember-modifier-3.1.0.tgz#ba5b0941302accd787ed3dcfc8d20400b77ffc41" | ||
integrity sha512-G5Lj9jVFsD2sVJcRNQfaGKG1p81wT4LGfClBhCuB4TgwP1NGJKdqI+Q8BW2MptONxQt/71UjjUH0YK7Gm9eahg== | ||
dependencies: | ||
ember-cli-babel "^7.26.6" | ||
ember-cli-normalize-entity-name "^1.0.0" | ||
ember-cli-string-utils "^1.1.0" | ||
ember-cli-typescript "^4.2.1" | ||
ember-compatibility-helpers "^1.2.5" | ||
|
||
[email protected]: | ||
version "9.0.1" | ||
resolved "https://registry.yarnpkg.com/ember-moment/-/ember-moment-9.0.1.tgz#fcf06cb8ef07c8d0108820c1639778590d613b38" | ||
|