feat: remove onboarding feed references and update settings

This commit is contained in:
DIYgod
2025-11-18 14:14:33 +08:00
parent 958e0a6d41
commit 0ee62fa042
8 changed files with 9 additions and 43 deletions
@@ -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() {
</main>
</EntriesProvider>
<AppTip />
{isAuthFail && !user && (
<RootPortal>
<DeclarativeModal
@@ -1,5 +1,6 @@
import { FeedViewType, getView } from "@follow/constants"
import { useCollectionEntryList } from "@follow/store/collection/hooks"
import { isOnboardingEntryUrl } from "@follow/store/constants/onboarding"
import {
useEntriesQuery,
useEntryIdsByFeedId,
@@ -283,6 +284,9 @@ export const useEntriesByView = ({ onReset }: { onReset?: () => 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)
@@ -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}
@@ -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}
>
<div
className={cn("flex w-full min-w-0 items-center", hasOnboardingFeed && "text-folo")}
className={cn("flex w-full min-w-0 items-center")}
onDoubleClick={toggleCategoryOpenState}
>
<button
@@ -365,16 +353,6 @@ function FeedCategoryImpl({
) : (
<Fragment>
<span className="grow truncate">{folderName}</span>
{hasOnboardingFeed && (
<Tooltip delayDuration={300}>
<TooltipTrigger>
<i className="i-mingcute-sparkles-line ml-1 shrink-0 text-base text-folo" />
</TooltipTrigger>
<TooltipPortal>
<TooltipContent>{t("feed_category.onboarding_feed")}</TooltipContent>
</TooltipPortal>
</Tooltip>
)}
<UnreadNumber unread={unread} className="ml-2" />
</Fragment>
)}
@@ -199,21 +199,10 @@ const FeedItemImpl = ({ view, feedId, className, isPreview }: FeedItemProps) =>
className={cn(
"flex min-w-0 items-center",
isFeed && feed.errorAt && !isOnboardingFeed && "text-red",
isOnboardingFeed && "text-folo",
)}
>
<FeedIcon fallback target={feed} size={16} />
<FeedTitle feed={feed} />
{isOnboardingFeed && (
<Tooltip delayDuration={300}>
<TooltipTrigger>
<i className="i-mingcute-sparkles-line ml-1 size-3 shrink-0 translate-y-0.5 text-base text-folo" />
</TooltipTrigger>
<TooltipPortal>
<TooltipContent>{t("feed_item.onboarding_feed")}</TooltipContent>
</TooltipPortal>
</Tooltip>
)}
{isFeed && !isOnboardingFeed && (
<ErrorTooltip errorAt={feed.errorAt} errorMessage={feed.errorMessage}>
<i className="i-mingcute-close-circle-fill ml-1 shrink-0 text-base" />
+1 -1
View File
@@ -17,7 +17,7 @@ const createDefaultSettings = (): Partial<GeneralSettings> => ({
renderMarkUnread: false,
// UX
// autoHideFeedColumn: true,
groupByDate: true,
groupByDate: false,
// Secure
jumpOutLinkWarn: true,
voice: "",
@@ -27,7 +27,7 @@ export const defaultGeneralSettings: GeneralSettings = {
hoverMarkUnread: false,
renderMarkUnread: false,
// timeline
groupByDate: true,
groupByDate: false,
autoExpandLongSocialMedia: false,
dimRead: false,
@@ -1,6 +1,6 @@
import { getEntry } from "../modules/entry/getter"
const ONBOARDING_ENTRY_URL_PREFIX = "follow://onboarding"
const ONBOARDING_ENTRY_URL_PREFIX = "folo://onboarding"
export const isOnboardingEntryUrl = (url?: string | null) => {
return typeof url === "string" && url.startsWith(ONBOARDING_ENTRY_URL_PREFIX)