@@ -31,8 +31,18 @@ exports[`ChannelListMessenger when \`error\` prop is true, \`LoadingErrorIndicat
exports[`ChannelListMessenger when \`loading\` prop is true, \`LoadingIndicator\` should be rendered 1`] = `
-
- Loading Indicator
+
+
+
+ Loading Indicator
+
+
`;
diff --git a/src/components/Loading/LoadingChannels.tsx b/src/components/Loading/LoadingChannels.tsx
index 1aae3ab268..2d24a5d5b7 100644
--- a/src/components/Loading/LoadingChannels.tsx
+++ b/src/components/Loading/LoadingChannels.tsx
@@ -1,24 +1,26 @@
import React from 'react';
const LoadingItems = () => (
-
-
-
-
-
+
);
-const UnMemoizedLoadingChannels = () => (
+export const LoadingChannels = () => (
+
+
);
-
-/**
- * Loading indicator for the ChannelList
- */
-export const LoadingChannels = React.memo(UnMemoizedLoadingChannels);
diff --git a/src/components/Loading/__tests__/__snapshots__/LoadingChannels.test.js.snap b/src/components/Loading/__tests__/__snapshots__/LoadingChannels.test.js.snap
index c4c3d26c0f..41c61bf903 100644
--- a/src/components/Loading/__tests__/__snapshots__/LoadingChannels.test.js.snap
+++ b/src/components/Loading/__tests__/__snapshots__/LoadingChannels.test.js.snap
@@ -6,54 +6,113 @@ exports[`LoadingChannels should render component with default props 1`] = `
class="str-chat__loading-channels"
>
+ aria-hidden="true"
+ class="str-chat__channel-preview str-chat__channel-preview--loading"
+ >
+
+
+
+
+
+
diff --git a/src/components/Loading/styling/LoadingChannels.scss b/src/components/Loading/styling/LoadingChannels.scss
new file mode 100644
index 0000000000..4ae6bf967a
--- /dev/null
+++ b/src/components/Loading/styling/LoadingChannels.scss
@@ -0,0 +1,87 @@
+@mixin channel-preview-shimmer {
+ background-color: var(--str-chat__channel-preview-loading-state-color);
+ background-image: linear-gradient(
+ 90deg,
+ var(--skeleton-loading-base) 0%,
+ var(--skeleton-loading-highlight) 50%,
+ var(--skeleton-loading-base) 100%
+ );
+ background-repeat: no-repeat;
+ background-size: 200% 100%;
+ animation: loading-channels-shimmer 1.2s linear infinite;
+}
+
+.str-chat {
+ /* The color of the loading indicator while initializing the channel list */
+ --str-chat__channel-preview-loading-state-color: var(--slate-100);
+}
+
+.str-chat__loading-channels {
+ display: flex;
+ flex-direction: column;
+}
+
+.str-chat__channel-preview--loading {
+ cursor: default;
+ pointer-events: none;
+}
+
+.str-chat__channel-preview--loading,
+.str-chat__channel-preview-data--loading {
+ min-width: 0;
+}
+
+.str-chat__channel-preview-data--loading {
+ justify-content: center;
+}
+
+.str-chat__loading-channels-avatar,
+.str-chat__loading-channels-username,
+.str-chat__loading-channels-status {
+ @include channel-preview-shimmer;
+}
+
+.str-chat__loading-channels-avatar {
+ flex-shrink: 0;
+ width: calc(var(--str-chat__spacing-px) * 48);
+ height: calc(var(--str-chat__spacing-px) * 48);
+ border-radius: 50%;
+}
+
+.str-chat__loading-channels-username,
+.str-chat__loading-channels-status {
+ height: calc(var(--str-chat__spacing-px) * 20);
+ border-radius: 999px;
+ -webkit-mask-image: linear-gradient(
+ 90deg,
+ #000 0%,
+ #000 94%,
+ rgba(0, 0, 0, 0.7) 98%,
+ transparent 100%
+ );
+ mask-image: linear-gradient(
+ 90deg,
+ #000 0%,
+ #000 94%,
+ rgba(0, 0, 0, 0.7) 98%,
+ transparent 100%
+ );
+}
+
+.str-chat__loading-channels-username {
+ width: min(62%, calc(var(--str-chat__spacing-px) * 180));
+}
+
+.str-chat__loading-channels-status {
+ width: min(84%, calc(var(--str-chat__spacing-px) * 244));
+}
+
+@keyframes loading-channels-shimmer {
+ from {
+ background-position: 200% 0;
+ }
+
+ to {
+ background-position: -200% 0;
+ }
+}
diff --git a/src/components/Loading/styling/index.scss b/src/components/Loading/styling/index.scss
index b21157113e..1a37d43288 100644
--- a/src/components/Loading/styling/index.scss
+++ b/src/components/Loading/styling/index.scss
@@ -1 +1,2 @@
+@use 'LoadingChannels';
@use 'LoadingIndicator';