Skip to content

Commit

Permalink
chore: Release v0.2.0-beta.2 for hotfix (#1530)
Browse files Browse the repository at this point in the history
  • Loading branch information
DIYgod authored Nov 9, 2024
2 parents 612a6e8 + 673679e commit cafeb07
Show file tree
Hide file tree
Showing 15 changed files with 151 additions and 101 deletions.
13 changes: 11 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CHANGELOG

# [0.2.0-beta.0](https://github.com/RSSNext/follow/compare/v0.1.2-beta.0...v0.2.0-beta.0) (2024-11-08)
# [0.2.0-beta.2](https://github.com/RSSNext/follow/compare/v0.2.0-beta.1...v0.2.0-beta.2) (2024-11-09)


### Bug Fixes
Expand All @@ -14,23 +14,26 @@
* add Supsense wrapper for app upgrade provider ([58f1791](https://github.com/RSSNext/follow/commit/58f1791526620f470aa11c776fd7b245d54c45ab))
* add turbo build in ci ([7b848cd](https://github.com/RSSNext/follow/commit/7b848cd08aa4f97b1df35666166561d6fc30c5c9))
* adjust activation toast style ([e81245e](https://github.com/RSSNext/follow/commit/e81245e395ce1829f0c185a5a184c4cba8f8406c))
* allow select from all sidebar ([198bb17](https://github.com/RSSNext/follow/commit/198bb17d838729ec0c406a2c6eed2fba97b196b3))
* app upgrade toast open link should in new window ([fc81546](https://github.com/RSSNext/follow/commit/fc81546bed6b07626215a57543a735001728f520))
* app upgraded toast href error ([#1444](https://github.com/RSSNext/follow/issues/1444)) ([c875d69](https://github.com/RSSNext/follow/commit/c875d697b2a1cd9e49f3c91397531a82928e1bc8))
* assets rewrite ([#1204](https://github.com/RSSNext/follow/issues/1204)) ([488e8ef](https://github.com/RSSNext/follow/commit/488e8effc6f00769df7dbf68d4e6d1e4e950b8e7))
* auto archived list flash ([#1269](https://github.com/RSSNext/follow/issues/1269)) ([8d2478c](https://github.com/RSSNext/follow/commit/8d2478c6a93aa9f5a99fddc55bbb8e532e1a0fe1))
* auto load achieved entries when show achieved button is available ([074a60d](https://github.com/RSSNext/follow/commit/074a60d3cf93bcede88ea4d70b07cf7480be4229))
* **boost:** card text align center ([632d5d4](https://github.com/RSSNext/follow/commit/632d5d42d67999523e602fb18f59ca72543b7d7a))
* build ([740783a](https://github.com/RSSNext/follow/commit/740783a537f85e0bc215cd38ce37bf5bd6fc9b1a))
* build pre script ([8bd2de8](https://github.com/RSSNext/follow/commit/8bd2de84b898ffc1a4863d29d7056a0b9e7a9e2f))
* bump config ([117bd1b](https://github.com/RSSNext/follow/commit/117bd1ba08e4c287dc071669614567197e470d12))
* can not exit entry by close button ([e654c3a](https://github.com/RSSNext/follow/commit/e654c3ac165e5eb276ba51dc4ae0ab2da230a9d1)), closes [#1311](https://github.com/RSSNext/follow/issues/1311)
* can not play bilibili video ([11ff813](https://github.com/RSSNext/follow/commit/11ff813c450fb519292b187a15236abe7d900abb)), closes [#1376](https://github.com/RSSNext/follow/issues/1376)
* **ci:** concurrency group ([fb0152e](https://github.com/RSSNext/follow/commit/fb0152eaec76b28ed9fc26381917ca7ec2aecb0b))
* **ci:** forge build error ([#1500](https://github.com/RSSNext/follow/issues/1500)) ([a5e3e02](https://github.com/RSSNext/follow/commit/a5e3e0228c7088e78061801466267ebdbd288e2c))
* **ci:** turbo not found ([c812bd7](https://github.com/RSSNext/follow/commit/c812bd71aabc63b5c9ebbe032f25aba5ac51bd64))
* **ci:** windows build ([9f72c26](https://github.com/RSSNext/follow/commit/9f72c263a6945fe90899f85f732c0866c7f61b25))
* clear selection when pointer down, fixed [#1448](https://github.com/RSSNext/follow/issues/1448) ([33d3906](https://github.com/RSSNext/follow/commit/33d39067b5c5fdc8f302ca3ea13a740bbb014088))
* **cmdk:** change default cmdk search type to feed ([4a8fdea](https://github.com/RSSNext/follow/commit/4a8fdea84a4df90313f8c577d77d3944a34aa149))
* correct z-index in toast ([6507744](https://github.com/RSSNext/follow/commit/6507744847b6ceee093adb17076292993d525313))
* csrf token singleton ([b4e935f](https://github.com/RSSNext/follow/commit/b4e935fba0b2f874a5c24006d5afdd54f50f3e76))
* csrf token singleton ([#1463](https://github.com/RSSNext/follow/issues/1463)) ([16b5349](https://github.com/RSSNext/follow/commit/16b5349c3d4461356ef124c10df8c117fd3bac81))
* css editor lazy and input composition handler ([5c6004a](https://github.com/RSSNext/follow/commit/5c6004a0905c6207c6119de0d37e9a5baf744dab))
* ctx sub menu z-index higher than root ([8daec12](https://github.com/RSSNext/follow/commit/8daec12d2c1e61260b8917ee43066b752d4c9f06))
* debug html ([e9afc79](https://github.com/RSSNext/follow/commit/e9afc7944f4dc42be2ea530b4852e9c2f6207ac8))
Expand All @@ -39,7 +42,9 @@
* disable `pointerDownOutside` trigger `onDismiss` ([#1215](https://github.com/RSSNext/follow/issues/1215)) ([2bf5245](https://github.com/RSSNext/follow/commit/2bf5245126bc9ef890c06afe5a825d1e1ab4059c))
* disable auto load archive for inbox and list ([7825e16](https://github.com/RSSNext/follow/commit/7825e16b6d1230ba2c13e5ef00474fc05cc510e5))
* **discover:** card text truncate ([557e912](https://github.com/RSSNext/follow/commit/557e91228af27251663904dfd3211c535b5b5415))
* dnd and scroll ([#1528](https://github.com/RSSNext/follow/issues/1528)) ([b1e28be](https://github.com/RSSNext/follow/commit/b1e28be2b0049eae73d51a18cd9180b077a512ca))
* dnd responsive ([1f51abe](https://github.com/RSSNext/follow/commit/1f51abe3ed2fbca66e6d9ab2ab63ef71b7b9eda4))
* don't cache user session ([e8d7e6c](https://github.com/RSSNext/follow/commit/e8d7e6ce64d09bb1f2b8f3e26f7aba250c3cca84))
* entry action deps ([4eba28b](https://github.com/RSSNext/follow/commit/4eba28b76fc62133ecd0e4746b3bb0b4d341b338))
* entry thumbnail keep origin aspect ratio ([6e04e6e](https://github.com/RSSNext/follow/commit/6e04e6eacd6346bd2869c683ec417932a0d13807))
* entry title bar margin-left in zen mode ([25abd8f](https://github.com/RSSNext/follow/commit/25abd8ff1c42a37b741676e1b3a3312f99decb8a))
Expand Down Expand Up @@ -81,6 +86,7 @@
* optimize the animation of the Follow button on the User Profile Modal ([#1156](https://github.com/RSSNext/follow/issues/1156)) ([87717d6](https://github.com/RSSNext/follow/commit/87717d642607cca4254f11d673a8a910fc6ab076))
* pass a component for Trans ([7d38cb6](https://github.com/RSSNext/follow/commit/7d38cb6d2f814d3b6012b66ba6024c05b6edcf2d))
* pnpm lockfile ([fdc547a](https://github.com/RSSNext/follow/commit/fdc547a5aaeb11aa13d6321ea60f1d3a4e01a8b4))
* polling unread and add ua for electron api client ([549f10d](https://github.com/RSSNext/follow/commit/549f10d7ebb9e0eca9faa4d9cb27b7e448a8af0f))
* power icon align ([11059f6](https://github.com/RSSNext/follow/commit/11059f639ee955a0f10cbd97cb6eed85e335fed7))
* preferred title not working in entry column ([#1268](https://github.com/RSSNext/follow/issues/1268)) ([4bdf28e](https://github.com/RSSNext/follow/commit/4bdf28ea766242c74af051e36a9ef205f02eb874))
* prevent default for cmd+k ([81d49f0](https://github.com/RSSNext/follow/commit/81d49f0893100de85a22d114765f76e7c9dea36c))
Expand All @@ -93,8 +99,10 @@
* relogin ([80515f6](https://github.com/RSSNext/follow/commit/80515f67652a77fbdbe20a2a3298fd916515a8d7))
* remove `useSingleton` ([d1d3fcf](https://github.com/RSSNext/follow/commit/d1d3fcf493bf26ce58cd33fedd7320cfcfe8ef5f))
* remove cache-control header ([#1202](https://github.com/RSSNext/follow/issues/1202)) ([c683bda](https://github.com/RSSNext/follow/commit/c683bdaef63716659ca78875022ff38350e50b82))
* remove callbackUrl in electron ([10a217e](https://github.com/RSSNext/follow/commit/10a217e8c1262a7ab695f65e21087d96169930bb))
* remove gcore icon ([#1220](https://github.com/RSSNext/follow/issues/1220)) ([486fa20](https://github.com/RSSNext/follow/commit/486fa202ee9488981a733f235f95c90a073e7166))
* remove immer set to avoid object extensible ([7e5a791](https://github.com/RSSNext/follow/commit/7e5a79155a083a8242579dee18d019049b7ad6f5))
* remove vercel header rewrite ([#1463](https://github.com/RSSNext/follow/issues/1463)) ([#1480](https://github.com/RSSNext/follow/issues/1480)) ([94971da](https://github.com/RSSNext/follow/commit/94971dad4e1d828aa4c90d8f02445cc04a8500c9))
* remove vercel header rewrite for assets ([79e6f48](https://github.com/RSSNext/follow/commit/79e6f483265216773e0ccf5ac0690d06300d3e80))
* response error toast style ([7748588](https://github.com/RSSNext/follow/commit/77485886089e9faea54cf80a96a48a0bedd2a39e))
* scroll bar z index ([5057999](https://github.com/RSSNext/follow/commit/50579995367b871e84768c5983b3302f75f8e077)), closes [#1233](https://github.com/RSSNext/follow/issues/1233)
Expand Down Expand Up @@ -128,6 +136,7 @@
* **ui:** use safe inset top to fix windows overlays, fixed [#1184](https://github.com/RSSNext/follow/issues/1184) ([dc85570](https://github.com/RSSNext/follow/commit/dc855703289ac98db76f4a57760fcd66047b8dd1))
* **ui:** user profile follow button style ([d629215](https://github.com/RSSNext/follow/commit/d629215305a0ec9323dea0db929582e9609a82f6))
* update daily claim amount reference in tooltip ([#1487](https://github.com/RSSNext/follow/issues/1487)) ([3792c2d](https://github.com/RSSNext/follow/commit/3792c2d850d9fc3f96ea4591784b61c631ee7e86))
* update tray icon path for windows and improve tray behavior ([#1511](https://github.com/RSSNext/follow/issues/1511)) ([3706874](https://github.com/RSSNext/follow/commit/3706874e42c215a84df71eae1c135a114be8985a))
* update version toast ([25e7cea](https://github.com/RSSNext/follow/commit/25e7cea3c139335960c3de2922cf0ffa9c9c6c39)), closes [#1450](https://github.com/RSSNext/follow/issues/1450)
* **upgrade:** changelog container should w-full ([1551bf6](https://github.com/RSSNext/follow/commit/1551bf648c511cbf615f515b2e2d93077b0e42b4))
* vercel do not support `__` prefix for api route ([45a66e0](https://github.com/RSSNext/follow/commit/45a66e0f972d18831795d92b1d3c1f3893f396dc))
Expand Down
5 changes: 5 additions & 0 deletions apps/renderer/src/initialize/migrates/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const doMigration = async () => {

if (lastVersion === APP_VERSION) return

const lastVersionParts = lastVersion.split("-")
const lastVersionMajorMinor = lastVersionParts[0]
const currentVersionMajorMinor = APP_VERSION.split("-")[0]
if (lastVersionMajorMinor === currentVersionMajorMinor) return

// NOTE: Add migration logic here

if (!APP_VERSION.includes("nightly")) {
Expand Down
3 changes: 3 additions & 0 deletions apps/renderer/src/modules/feed-column/atom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ export const [
setSelectedFeedIds,
useSelectedFeedIdsSelector,
] = createAtomHooks(atom<string[]>([]))

export const [, , useFeedAreaScrollProgressValue, , , setFeedAreaScrollProgressValue] =
createAtomHooks(atom(0))
10 changes: 10 additions & 0 deletions apps/renderer/src/modules/feed-column/hook.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { useDndContext } from "@dnd-kit/core"

import { useFeedAreaScrollProgressValue } from "./atom"

export function useShouldFreeUpSpace() {
const dndContext = useDndContext()
const isDragging = !!dndContext.active
const scrollProgress = useFeedAreaScrollProgressValue()
return isDragging && scrollProgress === 0
}
105 changes: 42 additions & 63 deletions apps/renderer/src/modules/feed-column/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { DndContext, pointerWithin, useDroppable } from "@dnd-kit/core"
import { useDroppable } from "@dnd-kit/core"
import { ActionButton } from "@follow/components/ui/button/index.js"
import type { FeedViewType } from "@follow/constants"
import { Routes, views } from "@follow/constants"
import { useTypeScriptHappyCallback } from "@follow/hooks"
import { useRegisterGlobalContext } from "@follow/shared/bridge"
Expand All @@ -21,15 +20,15 @@ import { shortcuts } from "~/constants/shortcuts"
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
import { useReduceMotion } from "~/hooks/biz/useReduceMotion"
import { getRouteParams } from "~/hooks/biz/useRouteParams"
import { useBatchUpdateSubscription } from "~/hooks/biz/useSubscriptionActions"
import { useAuthQuery } from "~/hooks/common"
import { Queries } from "~/queries"
import { useSubscriptionStore } from "~/store/subscription"
import { useFeedUnreadStore } from "~/store/unread"

import { WindowUnderBlur } from "../../components/ui/background"
import { getSelectedFeedIds, setSelectedFeedIds, useSelectedFeedIds } from "./atom"
import { getSelectedFeedIds, setSelectedFeedIds } from "./atom"
import { FeedColumnHeader } from "./header"
import { useShouldFreeUpSpace } from "./hook"
import { FeedList } from "./list"

const lethargy = new Lethargy()
Expand Down Expand Up @@ -138,72 +137,52 @@ export function FeedColumn({ children, className }: PropsWithChildren<{ classNam
window.router.navigate(Routes.Discover)
})

const [selectedIds, setSelectedIds] = useSelectedFeedIds()

const { mutate } = useBatchUpdateSubscription()
const shouldFreeUpSpace = useShouldFreeUpSpace()

return (
<DndContext
collisionDetection={pointerWithin}
onDragEnd={(event) => {
if (!event.over) {
return
}

const { category, view } = event.over.data.current as {
category: string
view: FeedViewType
}

mutate({ category, view, feedIdList: selectedIds })

setSelectedIds([])
}}
<WindowUnderBlur
className={cn("relative flex h-full flex-col space-y-3 pt-2.5", className)}
onClick={useCallback(() => navigateBackHome(), [navigateBackHome])}
>
<WindowUnderBlur
className={cn("relative flex h-full flex-col space-y-3 pt-2.5", className)}
onClick={useCallback(() => navigateBackHome(), [navigateBackHome])}
>
<FeedColumnHeader />
<FeedColumnHeader />

<div
className="flex w-full justify-between px-3 text-xl text-theme-vibrancyFg"
onClick={stopPropagation}
>
<div
className="flex w-full justify-between px-3 text-xl text-theme-vibrancyFg"
onClick={stopPropagation}
>
{views.map((item, index) => (
<ViewSwitchButton
key={item.name}
item={item}
index={index}
active={active}
setActive={setActive}
useHotkeysSwitch={useHotkeysSwitch}
setUseHotkeysSwitch={setUseHotkeysSwitch}
/>
))}
</div>
<div
className={cn("relative flex size-full", !shouldFreeUpSpace && "overflow-hidden")}
ref={carouselRef}
onPointerDown={useTypeScriptHappyCallback((e) => {
if (!(e.target instanceof HTMLElement) || !e.target.closest("[data-feed-id]")) {
const nextSelectedFeedIds = getSelectedFeedIds()
setSelectedFeedIds(nextSelectedFeedIds.length === 0 ? nextSelectedFeedIds : [])
}
}, [])}
>
<SwipeWrapper active={active}>
{views.map((item, index) => (
<ViewSwitchButton
key={item.name}
item={item}
index={index}
active={active}
setActive={setActive}
useHotkeysSwitch={useHotkeysSwitch}
setUseHotkeysSwitch={setUseHotkeysSwitch}
/>
<section key={item.name} className="h-full w-feed-col shrink-0 snap-center">
<FeedList className="flex size-full flex-col text-sm" view={index} />
</section>
))}
</div>
<div
className="relative flex size-full"
ref={carouselRef}
onPointerDown={useTypeScriptHappyCallback((e) => {
if (!(e.target instanceof HTMLElement) || !e.target.closest("[data-feed-id]")) {
const nextSelectedFeedIds = getSelectedFeedIds()
setSelectedFeedIds(nextSelectedFeedIds.length === 0 ? nextSelectedFeedIds : [])
}
}, [])}
>
<SwipeWrapper active={active}>
{views.map((item, index) => (
<section key={item.name} className="h-full w-feed-col shrink-0 snap-center">
<FeedList className="flex size-full flex-col text-sm" view={index} />
</section>
))}
</SwipeWrapper>
</div>
</SwipeWrapper>
</div>

{children}
</WindowUnderBlur>
</DndContext>
{children}
</WindowUnderBlur>
)
}

Expand Down
33 changes: 31 additions & 2 deletions apps/renderer/src/modules/feed-column/list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { memo, useMemo, useRef, useState } from "react"
import { useTranslation } from "react-i18next"
import { Link } from "react-router-dom"
import Selecto from "react-selecto"
import { useEventListener } from "usehooks-ts"

import { IconOpacityTransition } from "~/components/ux/transition/icon"
import { FEED_COLLECTION_LIST } from "~/constants"
Expand All @@ -26,12 +27,14 @@ import { useFeedUnreadStore } from "~/store/unread"

import {
getFeedListSort,
setFeedAreaScrollProgressValue,
setFeedListSortBy,
setFeedListSortOrder,
useFeedListSort,
useSelectedFeedIds,
} from "./atom"
import { DraggableContext } from "./context"
import { useShouldFreeUpSpace } from "./hook"
import { SortableFeedList, SortByAlphabeticalInbox, SortByAlphabeticalList } from "./sort-by"
import { feedColumnStyles } from "./styles"
import { UnreadNumber } from "./unread-number"
Expand Down Expand Up @@ -161,6 +164,32 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
[attributes, listeners, style],
)

useEventListener(
"scroll",
() => {
const round = (num: number) => Math.round(num * 1e2) / 1e2
const getPositions = () => {
const el = scrollerRef.current
if (!el) return

return {
x: round(el.scrollLeft / (el.scrollWidth - el.clientWidth)),
y: round(el.scrollTop / (el.scrollHeight - el.clientHeight)),
}
}

const newScrollValues = getPositions()
if (!newScrollValues) return

const { y } = newScrollValues
setFeedAreaScrollProgressValue(y)
},
scrollerRef,
{ capture: false, passive: true },
)

const shouldFreeUpSpace = useShouldFreeUpSpace()

return (
<div className={cn(className, "font-medium")}>
<ListHeader view={view} />
Expand Down Expand Up @@ -207,8 +236,8 @@ function FeedListImpl({ className, view }: { className?: string; view: number })
}}
mask={false}
flex
viewportClassName={cn("!px-3", isDragging && "!overflow-visible")}
rootClassName={cn("h-full", isDragging && "overflow-visible")}
viewportClassName={cn("!px-3", shouldFreeUpSpace && "!overflow-visible")}
rootClassName={cn("h-full", shouldFreeUpSpace && "overflow-visible")}
>
<div
data-active={feedId === FEED_COLLECTION_LIST}
Expand Down
Loading

0 comments on commit cafeb07

Please sign in to comment.