Skip to content

Commit

Permalink
Added loading state for messagecomposer; Improved threads layout;
Browse files Browse the repository at this point in the history
  • Loading branch information
stef-coenen committed Jan 7, 2025
1 parent f09f650 commit 8f3801d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,11 @@ export const MessageComposer = ({
}
}}
>
<Suspense>
<Suspense
fallback={
<div className="relative h-[119px] w-full border-t bg-background px-2 pb-1 dark:border-slate-800 md:rounded-md md:border" />
}
>
<RichTextEditor
className="relative w-8 flex-grow border-t bg-background px-2 pb-1 dark:border-slate-800 md:rounded-md md:border"
contentClassName="max-h-[50vh] overflow-auto"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,17 @@ export const CommunityThreadsCatchup = memo(() => {
{!flatThreadMetas?.length ? (
<p className="m-auto text-lg">{t('No threads found')}</p>
) : (
<div
className="relative flex h-20 flex-grow flex-col overflow-auto p-3"
ref={scrollRef}
>
<div className="relative h-20 flex-grow flex-col overflow-auto p-3" ref={scrollRef}>
<div
className="relative w-full flex-shrink-0 flex-grow-0 overflow-hidden"
className="relative w-full overflow-hidden"
style={{
height: virtualizer.getTotalSize(),
}}
>
<div
className="absolute left-0 top-0 flex h-full w-full flex-col"
className="absolute left-0 top-0 w-full"
style={{
transform: `translateY(${items[0]?.start ?? 0}px)`,
transform: `translateY(${items[0]?.start - virtualizer.options.scrollMargin}px)`,
}}
>
{items.map((item) => {
Expand All @@ -86,7 +83,7 @@ export const CommunityThreadsCatchup = memo(() => {
key={item.key}
data-index={item.index}
ref={virtualizer.measureElement}
className="flex-shrink-0 pb-3 last-of-type:pb-0"
className="pb-3 last-of-type:pb-0"
>
{threadMeta ? (
<CommunityThreadCatchup
Expand Down

0 comments on commit 8f3801d

Please sign in to comment.