From ec64c9614360afc002b65a33ac15dd1e37e6fa67 Mon Sep 17 00:00:00 2001 From: Silberengel Date: Wed, 3 Jun 2026 00:22:25 +0200 Subject: [PATCH] fix lame feeds --- src/components/FeedFilterToolbarRow/index.tsx | 5 +- src/components/FeedRelaysIconRow/index.tsx | 17 +++++-- src/components/KindFilter/index.tsx | 16 ++---- src/components/NoteList/index.tsx | 44 +++++++++++----- src/i18n/locales/en.ts | 2 + src/pages/primary/NoteListPage/RelaysFeed.tsx | 51 +++++++++---------- src/pages/primary/SpellsPage/index.tsx | 11 ++++ .../primary/SpellsPage/useSpellsPageFeed.ts | 12 +++++ src/services/relay-info.service.ts | 4 +- 9 files changed, 100 insertions(+), 62 deletions(-) diff --git a/src/components/FeedFilterToolbarRow/index.tsx b/src/components/FeedFilterToolbarRow/index.tsx index b402f3cf..3beaf810 100644 --- a/src/components/FeedFilterToolbarRow/index.tsx +++ b/src/components/FeedFilterToolbarRow/index.tsx @@ -37,7 +37,10 @@ export default function FeedFilterToolbarRow({ {onRefresh != null ? : null} {includeFeedSearchSlot ? ( -
+
) : null}
) diff --git a/src/components/FeedRelaysIconRow/index.tsx b/src/components/FeedRelaysIconRow/index.tsx index b9118b82..3cc20637 100644 --- a/src/components/FeedRelaysIconRow/index.tsx +++ b/src/components/FeedRelaysIconRow/index.tsx @@ -9,18 +9,27 @@ import { useTranslation } from 'react-i18next' export function FeedRelaysIconRow({ urls, - className + className, + compact = false }: { urls: readonly string[] className?: string + /** Smaller icons for inline toolbar rows (e.g. next to the feed filter toggle). */ + compact?: boolean }) { const { t } = useTranslation() const { navigateToRelay } = useSmartRelayNavigation() if (urls.length === 0) return null + const buttonClass = compact + ? 'h-5 w-5 min-h-5 min-w-5 shrink-0 rounded-full p-0 hover:bg-muted/80' + : 'h-7 w-7 min-h-7 min-w-7 shrink-0 rounded-full p-0 hover:bg-muted/80' + const iconClass = compact ? 'h-4 w-4' : 'h-6 w-6' + const iconSize = compact ? 8 : 12 + return (
@@ -36,7 +45,7 @@ export function FeedRelaysIconRow({ type="button" variant="ghost" size="sm" - className="h-7 w-7 min-h-7 min-w-7 shrink-0 rounded-full p-0 hover:bg-muted/80" + className={buttonClass} title={title} aria-label={ isTrending @@ -45,7 +54,7 @@ export function FeedRelaysIconRow({ } onClick={() => navigateToRelay(toRelay(url))} > - + ) })} diff --git a/src/components/KindFilter/index.tsx b/src/components/KindFilter/index.tsx index a845f5ce..04c5decd 100644 --- a/src/components/KindFilter/index.tsx +++ b/src/components/KindFilter/index.tsx @@ -18,7 +18,6 @@ import { } from '@/lib/feed-kind-filter' import { LIVE_ACTIVITY_KINDS } from '@/lib/live-activities' import { cn } from '@/lib/utils' -import { useFontSize } from '@/providers/FontSizeProvider' import { useKindFilterOrDefaults } from '@/providers/KindFilterProvider' import { useScreenSize } from '@/providers/ScreenSizeProvider' import { ListFilter } from 'lucide-react' @@ -60,7 +59,6 @@ export default function KindFilter({ }) { const { t } = useTranslation() const { isSmallScreen } = useScreenSize() - const { fontSize } = useFontSize() const { showKinds: savedShowKinds, showKind1OPs: savedShowKind1OPs, @@ -170,7 +168,7 @@ export default function KindFilter({ size="titlebar-icon" aria-label={t('Filter')} className={cn( - 'relative h-8 w-fit shrink-0 px-1.5 text-xs focus:text-foreground', + 'relative shrink-0 focus:text-foreground', !isDifferentFromSaved && !feedKindFilterBypass && 'text-muted-foreground', feedKindFilterBypass && 'text-amber-600 dark:text-amber-400' )} @@ -180,17 +178,9 @@ export default function KindFilter({ } }} > - - - {t('Filter')} - + {isDifferentFromSaved && ( -
+
)} ) diff --git a/src/components/NoteList/index.tsx b/src/components/NoteList/index.tsx index c6c2144d..fe89ee37 100644 --- a/src/components/NoteList/index.tsx +++ b/src/components/NoteList/index.tsx @@ -4653,14 +4653,17 @@ const NoteList = forwardRef( ) + const feedRelayToolbarRow = + feedRelayUrls.length > 0 ? ( + + ) : null + const feedClientFilterPanel = feedClientFilterOpen ? (
- {feedRelayUrls.length > 0 ? ( -
-

{t('Feed relays', { defaultValue: 'Relays in this feed' })}

- -
- ) : null}