Skip to content

armgit / dify

Public Imported from GitHub
0

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype to production without rebuilding the stack.

fix: keep pagination skeletons in app grid (#41175)

yyh09b199b28049
diff --git a/web/app/components/apps/app-list-catalog.tsx b/web/app/components/apps/app-list-catalog.tsx
index 3d3ba81e0b3..97d7fa36fbc 100644
--- a/web/app/components/apps/app-list-catalog.tsx
+++ b/web/app/components/apps/app-list-catalog.tsx
@@ -15,7 +15,6 @@ import { keepPreviousData, useInfiniteQuery, useQuery } from '@tanstack/react-qu
import { useMemo } from 'react'
import { useTranslation } from 'react-i18next'
import { InfiniteScrollSentinel } from '@/app/components/base/infinite-scroll-sentinel'
-import { MAIN_NAV_APP_CARD_GRID_CLASS_NAME } from '@/app/components/main-nav/app-card-grid'
import { STEP_BY_STEP_TOUR_TARGETS } from '@/app/components/step-by-step-tour/target-registry'
import { systemFeaturesQueryOptions } from '@/features/system-features/client'
import { consoleQuery } from '@/service/client'
@@ -209,35 +208,34 @@ function AppListCatalogContent({
/>
)}
{hasNextPage && (
- <div className="relative col-span-full">
+ <>
+ <AppCardSkeleton count={3} />
+ {isFetchNextPageError && (
+ <div
+ className="absolute inset-x-0 bottom-0 flex h-40 items-center justify-center gap-2 bg-background-body system-xs-regular text-text-tertiary"
+ role="alert"
+ >
+ <span>{t(($) => $['errorBoundary.title'], { ns: 'common' })}</span>
+ <Button
+ loading={isFetchingNextPage}
+ size="small"
+ variant="secondary"
+ onClick={() => void onFetchNextPage()}
+ >
+ {t(($) => $['operation.retry'], { ns: 'common' })}
+ </Button>
+ </div>
+ )}
<InfiniteScrollSentinel
canLoadMore={!isFetching && !isFetchNextPageError}
+ className="absolute inset-x-0 bottom-0"
onLoadMore={() => {
void onFetchNextPage()
}}
preloadDistance={getPreloadDistance}
scrollContainerRef={scrollViewportRef}
/>
- <div className={cn('relative gap-2.5', MAIN_NAV_APP_CARD_GRID_CLASS_NAME)}>
- <AppCardSkeleton count={3} />
- {isFetchNextPageError && (
- <div
- className="absolute inset-0 flex items-center justify-center gap-2 bg-background-body system-xs-regular text-text-tertiary"
- role="alert"
- >
- <span>{t(($) => $['errorBoundary.title'], { ns: 'common' })}</span>
- <Button
- loading={isFetchingNextPage}
- size="small"
- variant="secondary"
- onClick={() => void onFetchNextPage()}
- >
- {t(($) => $['operation.retry'], { ns: 'common' })}
- </Button>
- </div>
- )}
- </div>
- </div>
+ </>
)}
</div>
</>