Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benjackwhite committed Dec 4, 2024
1 parent 6475d5d commit db0021c
Showing 1 changed file with 51 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -157,64 +157,62 @@ export const SidePanelActivity = (): JSX.Element => {
</div>

{/* Controls */}
<div className="px-2 pb-2 space-y-2 shrink-0">
{activeTab === SidePanelActivityTab.Unread ? (
<>
<LemonBanner type="info" dismissKey="notifications-introduction">
Notifications shows you changes others make to{' '}
<Link to={urls.savedInsights('history')}>Insights</Link> and{' '}
<Link to={urls.featureFlags('history')}>Feature Flags</Link> that you created. Come
join <Link to="https://posthog.com/community">our community forum</Link> and tell us
what else should be here!
</LemonBanner>
{activeTab === SidePanelActivityTab.Unread ? (
<div className="px-2 pb-2 space-y-2 shrink-0">
<LemonBanner type="info" dismissKey="notifications-introduction">
Notifications shows you changes others make to{' '}
<Link to={urls.savedInsights('history')}>Insights</Link> and{' '}
<Link to={urls.featureFlags('history')}>Feature Flags</Link> that you created. Come join{' '}
<Link to="https://posthog.com/community">our community forum</Link> and tell us what
else should be here!
</LemonBanner>

<div className="flex items-center justify-between gap-2">
{toggleExtendedDescription}
{hasUnread ? (
<LemonButton type="secondary" onClick={() => markAllAsRead()}>
Mark all as read
</LemonButton>
) : null}
</div>
</>
) : activeTab === SidePanelActivityTab.All ? (
<div className="flex items-center justify-between gap-2">
<div className="flex items-center gap-2">
{toggleExtendedDescription}
{allActivityResponseLoading ? <Spinner textColored /> : null}
</div>
{toggleExtendedDescription}
{hasUnread ? (
<LemonButton type="secondary" onClick={() => markAllAsRead()}>
Mark all as read
</LemonButton>
) : null}
</div>
</div>
) : activeTab === SidePanelActivityTab.All ? (
<div className="flex items-center justify-between gap-2 px-2 pb-2 space-y-2 shrink-0">
<div className="flex items-center gap-2">
{toggleExtendedDescription}
{allActivityResponseLoading ? <Spinner textColored /> : null}
</div>

<div className="flex items-center gap-2">
<span>Filter for activity on:</span>
<LemonSelect
size="small"
options={scopeMenuOptions}
placeholder="All activity"
value={(activeScopeMenuOption as ActivityScope) ?? undefined}
onChange={(value) =>
setFilters({
...filters,
scope: value ?? undefined,
item_id: undefined,
})
}
dropdownMatchSelectWidth={false}
/>
<div className="flex items-center gap-2">
<span>Filter for activity on:</span>
<LemonSelect
size="small"
options={scopeMenuOptions}
placeholder="All activity"
value={(activeScopeMenuOption as ActivityScope) ?? undefined}
onChange={(value) =>
setFilters({
...filters,
scope: value ?? undefined,
item_id: undefined,
})
}
dropdownMatchSelectWidth={false}
/>

<span>by</span>
<MemberSelect
value={filters?.user ?? null}
onChange={(user) =>
setFilters({
...filters,
user: user?.id ?? undefined,
})
}
/>
</div>
<span>by</span>
<MemberSelect
value={filters?.user ?? null}
onChange={(user) =>
setFilters({
...filters,
user: user?.id ?? undefined,
})
}
/>
</div>
) : null}
</div>
</div>
) : null}

<div className="flex flex-col flex-1 overflow-hidden" ref={contentRef} onScroll={handleScroll}>
<ScrollableShadows direction="vertical" innerClassName="p-2 space-y-px">
Expand Down

0 comments on commit db0021c

Please sign in to comment.