]> cat aescling's git repositories - mastodon.git/commitdiff
[Glitch] Minor scrollable list fixes
authorThibaut Girka <thib@sitedethib.com>
Mon, 17 Dec 2018 20:32:27 +0000 (21:32 +0100)
committerThibG <thib@sitedethib.com>
Mon, 17 Dec 2018 21:14:06 +0000 (22:14 +0100)
* Make sure loading indicator has enough vertical space
* Respect reduce_motion setting for loading indicator

Port 4ede51743e5b9121a49e9131f91cf012fab410f8 to glitch-soc

app/javascript/flavours/glitch/features/account_gallery/index.js
app/javascript/flavours/glitch/styles/components/index.scss

index 3f61af0e84c1ccf29fe7541afc9e04b0a13c1a8e..a5fa01444bbc54d2628229733bd4b61a08741ce5 100644 (file)
@@ -107,7 +107,7 @@ export default class AccountGallery extends ImmutablePureComponent {
       );
     }
 
-    if (hasMore) {
+    if (hasMore && !(isLoading && medias.size === 0)) {
       loadOlder = <LoadMore visible={!isLoading} onClick={this.handleLoadOlder} />;
     }
 
index 873dfa98d176a1179fd0c72a86273bd390832f36..8e90aa545b0fb05c6c83fd363045c3b6a900923b 100644 (file)
   &__append {
     flex: 1 1 auto;
     position: relative;
+    min-height: 120px;
   }
 }
 
     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);
   }
 }
 
   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);
 }