Skip to content

Commit

Permalink
Minor scrollable list fixes (mastodon#9551)
Browse files Browse the repository at this point in the history
* Make sure loading indicator has enough vertical space

* Respect reduce_motion setting for loading indicator
  • Loading branch information
ClearlyClaire authored and hiyuki2578 committed Oct 2, 2019
1 parent 55108e6 commit 9cf0120
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/javascript/mastodon/features/account_gallery/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class AccountGallery extends ImmutablePureComponent {
);
}

if (hasMore) {
if (hasMore && !(isLoading && medias.size === 0)) {
loadOlder = <LoadMore visible={!isLoading} onClick={this.handleLoadOlder} />;
}

Expand Down
15 changes: 12 additions & 3 deletions app/javascript/styles/mastodon/components.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2153,6 +2153,7 @@ a.account__display-name {
&__append {
flex: 1 1 auto;
position: relative;
min-height: 120px;
}
}

Expand Down Expand Up @@ -2946,7 +2947,6 @@ a.status-card.compact:hover {
transform: translateX(-50%);
margin: 82px 0 0 50%;
white-space: nowrap;
animation: loader-label 1.15s infinite cubic-bezier(0.215, 0.610, 0.355, 1.000);
}
}

Expand All @@ -2955,11 +2955,20 @@ a.status-card.compact:hover {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 0;
height: 0;
width: 42px;
height: 42px;
box-sizing: border-box;
background-color: transparent;
border: 0 solid lighten($ui-base-color, 26%);
border-width: 6px;
border-radius: 50%;
}

.no-reduce-motion .loading-indicator span {
animation: loader-label 1.15s infinite cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

.no-reduce-motion .loading-indicator__figure {
animation: loader-figure 1.15s infinite cubic-bezier(0.215, 0.610, 0.355, 1.000);
}

Expand Down

0 comments on commit 9cf0120

Please sign in to comment.