add a nice fade effect

This commit is contained in:
Nolan Lawson 2018-01-21 14:31:59 -08:00
parent ff6c370ef1
commit 75d78d44a2
2 changed files with 6 additions and 3 deletions

View file

@ -1,8 +1,10 @@
<:Window bind:online /> <:Window bind:online />
<div class="timeline" role="feed" aria-label="{{label}}" on:initialized > <div class="timeline" role="feed" aria-label="{{label}}" on:initialized>
<VirtualList component="{{StatusListItem}}" <VirtualList component="{{StatusListItem}}"
items="{{keyedStatuses}}" items="{{keyedStatuses}}"
on:scrollToBottom="onScrollToBottom()" /> on:scrollToBottom="onScrollToBottom()"
shown="{{initialized}}"
/>
</div> </div>
<style> <style>
.timeline { .timeline {

View file

@ -1,5 +1,5 @@
<!-- TODO: setting height is hacky, just make this element the scroller --> <!-- TODO: setting height is hacky, just make this element the scroller -->
<div class="virtual-list" style="height: {{$height}}px;"> <div class="virtual-list {{shown ? '' : 'hidden'}}" style="height: {{$height}}px;">
{{#each $visibleItems as item @key}} {{#each $visibleItems as item @key}}
<VirtualListItem :component <VirtualListItem :component
offset="{{item.offset}}" offset="{{item.offset}}"
@ -12,6 +12,7 @@
<style> <style>
.virtual-list { .virtual-list {
position: relative; position: relative;
transition: opacity 0.25s linear;
} }
</style> </style>
<script> <script>