From 0ee62fa0422529b8ddc54e5933a43d60ea2244bc Mon Sep 17 00:00:00 2001 From: DIYgod Date: Tue, 18 Nov 2025 14:14:33 +0800 Subject: [PATCH] feat: remove onboarding feed references and update settings --- .../modules/app-layout/MainDestopLayout.tsx | 4 +--- .../entry-column/hooks/useEntriesByView.ts | 4 ++++ .../entry-column/layouts/EntryItemWrapper.tsx | 3 --- .../subscription-column/FeedCategory.tsx | 24 +------------------ .../modules/subscription-column/FeedItem.tsx | 11 --------- apps/ssr/client/atoms/settings/general.ts | 2 +- .../internal/shared/src/settings/defaults.ts | 2 +- .../store/src/constants/onboarding.ts | 2 +- 8 files changed, 9 insertions(+), 43 deletions(-) diff --git a/apps/desktop/layer/renderer/src/modules/app-layout/MainDestopLayout.tsx b/apps/desktop/layer/renderer/src/modules/app-layout/MainDestopLayout.tsx index c44f1daaf..c9304811f 100644 --- a/apps/desktop/layer/renderer/src/modules/app-layout/MainDestopLayout.tsx +++ b/apps/desktop/layer/renderer/src/modules/app-layout/MainDestopLayout.tsx @@ -16,7 +16,7 @@ import { PlainModal } from "~/components/ui/modal/stacked/custom-modal" import { DeclarativeModal } from "~/components/ui/modal/stacked/declarative-modal" import { ROOT_CONTAINER_ID } from "~/constants/dom" import { EnvironmentIndicator } from "~/modules/app/EnvironmentIndicator" -import { APP_TIP_DEBUG_EVENT, AppTip } from "~/modules/app-tip" +import { APP_TIP_DEBUG_EVENT } from "~/modules/app-tip" import { LoginModalContent } from "~/modules/auth/LoginModalContent" import { DebugRegistry } from "~/modules/debug/registry" import { EntriesProvider } from "~/modules/entry-column/context/EntriesContext" @@ -166,8 +166,6 @@ export function MainDestopLayout() { - - {isAuthFail && !user && ( void }) => { if (!entry) { continue } + if (isOnboardingEntryUrl(entry.url)) { + continue + } const date = new Date(listId ? entry.insertedAt : entry.publishedAt).toDateString() if (date !== lastDate) { counts.push(1) diff --git a/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx b/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx index ead0be13a..4c8cb591c 100644 --- a/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx +++ b/apps/desktop/layer/renderer/src/modules/entry-column/layouts/EntryItemWrapper.tsx @@ -3,7 +3,6 @@ import { useMobile } from "@follow/components/hooks/useMobile.js" import { getMousePosition } from "@follow/components/hooks/useMouse.js" import { ActionButton } from "@follow/components/ui/button/action-button.js" import { FeedViewType } from "@follow/constants" -import { isOnboardingEntryUrl } from "@follow/store/constants/onboarding" import { useEntry } from "@follow/store/entry/hooks" import { unreadSyncService } from "@follow/store/unread/store" import { cn } from "@follow/utils/utils" @@ -44,7 +43,6 @@ export const EntryItemWrapper: FC< const { id, url } = state return { feedId, id, inboxId: inboxHandle, url } }) - const isOnboardingEntry = isOnboardingEntryUrl(entry?.url) const actionConfigs = useEntryActions({ entryId, view }) const isMobile = useMobile() @@ -159,7 +157,6 @@ export const EntryItemWrapper: FC< !isWide ? "rounded-none @[650px]:rounded-md" : "rounded-md", isAll && "!rounded-none", (isActive || isContextMenuOpen) && "!bg-theme-item-active", - isOnboardingEntry && "border-l-2 border-l-orange-500 bg-orange-500/10", itemClassName, )} onClick={handleClick} diff --git a/apps/desktop/layer/renderer/src/modules/subscription-column/FeedCategory.tsx b/apps/desktop/layer/renderer/src/modules/subscription-column/FeedCategory.tsx index c50576a04..99a3b9a64 100644 --- a/apps/desktop/layer/renderer/src/modules/subscription-column/FeedCategory.tsx +++ b/apps/desktop/layer/renderer/src/modules/subscription-column/FeedCategory.tsx @@ -3,17 +3,9 @@ import { useMobile } from "@follow/components/hooks/useMobile.js" import { MotionButtonBase } from "@follow/components/ui/button/index.js" import { LoadingCircle } from "@follow/components/ui/loading/index.jsx" import { useScrollViewElement } from "@follow/components/ui/scroll-area/hooks.js" -import { - Tooltip, - TooltipContent, - TooltipPortal, - TooltipTrigger, -} from "@follow/components/ui/tooltip/index.jsx" import type { FeedViewType } from "@follow/constants" import { getViewList } from "@follow/constants" import { useRefValue } from "@follow/hooks" -import { isOnboardingFeedUrl } from "@follow/store/constants/onboarding" -import { useFeedsByIds } from "@follow/store/feed/hooks" import { useOwnedListByView } from "@follow/store/list/hooks" import { useSubscriptionByFeedId, @@ -186,10 +178,6 @@ function FeedCategoryImpl({ const subscriptionCategoryExist = useSubscriptionCategoryExist(folderName) const isAutoGroupedCategory = !!folderName && !subscriptionCategoryExist - // Check if any feed in this category is an onboarding feed - const feeds = useFeedsByIds(ids, (feed) => feed.url) - const hasOnboardingFeed = useMemo(() => feeds.some((url) => isOnboardingFeedUrl(url)), [feeds]) - const { isOver, setNodeRef } = useDroppable({ id: `category-${folderName}`, disabled: isAutoGroupedCategory, @@ -326,7 +314,7 @@ function FeedCategoryImpl({ {...contextMenuProps} >