:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(inbox): left-align search, right-align filters, drop filter banner (#72538)
Paul D'Ambra80ded834e9c4
diff --git a/frontend/src/scenes/inbox/components/InboxReportList.tsx b/frontend/src/scenes/inbox/components/InboxReportList.tsxindex 45edccdc084f..a79d566d404a 100644--- a/frontend/src/scenes/inbox/components/InboxReportList.tsx+++ b/frontend/src/scenes/inbox/components/InboxReportList.tsx@@ -1,8 +1,6 @@import { BindLogic, useActions, useValues } from 'kea'import { ComponentType, JSX, useEffect, useRef } from 'react'-import { LemonBanner } from '@posthog/lemon-ui'-import { captureInboxReportsImpressed, captureInboxViewed } from '../inboxAnalytics'import { inboxSceneLogic } from '../inboxSceneLogic'import { inboxFiltersLogic } from '../logics/inboxFiltersLogic'@@ -43,22 +41,6 @@ export function InboxReportList(props: InboxReportListProps): JSX.Element {)}-/** Sleek reminder that the list is filtered, with a one-click reset. Renders nothing when no filter is active. */-function ActiveFiltersBanner(): JSX.Element | null {- const { hasActiveFilters } = useValues(inboxFiltersLogic)- const { clearFilters } = useActions(inboxFiltersLogic)-- if (!hasActiveFilters) {- return null- }-- return (- <LemonBanner type="info" action={{ children: 'Clear', onClick: () => clearFilters() }}>- Filters are applied – some reports may be hidden.- </LemonBanner>- )-}-function InboxReportListInner({ tabKey, Card, emptyState }: InboxReportListProps): JSX.Element {const { reports, count, totalCount, hasMore, reportsResponseLoading, isLoaded, loadedQueryKey, loadedContext } =useValues(reportListLogic)@@ -162,7 +144,6 @@ function InboxReportListInner({ tabKey, Card, emptyState }: InboxReportListPropsreturn (<div className="@container mx-auto max-w-4xl flex flex-col gap-4 px-6 py-4"><InboxSearchFilterBar onRefresh={() => refresh()} refreshing={reportsResponseLoading} />- <ActiveFiltersBanner /><InboxBulkSelectionBar />{showSkeleton ? (diff --git a/frontend/src/scenes/inbox/components/shell/InboxSearchFilterBar.tsx b/frontend/src/scenes/inbox/components/shell/InboxSearchFilterBar.tsxindex 88bc29424f81..a1c9920ee487 100644--- a/frontend/src/scenes/inbox/components/shell/InboxSearchFilterBar.tsx+++ b/frontend/src/scenes/inbox/components/shell/InboxSearchFilterBar.tsx@@ -116,7 +116,7 @@ export function InboxSearchFilterBar({return (<div className="flex items-center gap-2 flex-wrap w-full"><LemonInput- className="flex-1 min-w-[220px]"+ className="min-w-[220px] max-w-[420px]"type="search"value={searchQuery}onChange={setSearchQuery}@@ -125,80 +125,85 @@ export function InboxSearchFilterBar({size="small"/>- <FilterPopover- label="Sort"- value={activeSort?.label ?? 'Priority first'}- icon={<IconSort />}- active={activeSortKey !== 'priority:asc'}- >- {INBOX_SORT_OPTIONS.map((option) => (- <FilterItem- key={inboxSortOptionKey(option.field, option.direction)}- icon={option.icon}- label={option.label}- active={sortField === option.field && sortDirection === option.direction}- onClick={() => setSort(option.field, option.direction)}- />- ))}- </FilterPopover>+ {/* ml-auto right-aligns the cluster; flex-wrap + max-w-full keep the controls from+ overflowing on narrow viewports — each can wrap within the group rather than the+ whole row clipping, the behavior the flat (ungrouped) layout had before. */}+ <div className="flex flex-wrap items-center justify-end gap-2 ml-auto max-w-full">+ <FilterPopover+ label="Sort"+ value={activeSort?.label ?? 'Priority first'}+ icon={<IconSort />}+ active={activeSortKey !== 'priority:asc'}+ >+ {INBOX_SORT_OPTIONS.map((option) => (+ <FilterItem+ key={inboxSortOptionKey(option.field, option.direction)}+ icon={option.icon}+ label={option.label}+ active={sortField === option.field && sortDirection === option.direction}+ onClick={() => setSort(option.field, option.direction)}+ />+ ))}+ </FilterPopover>- <FilterPopover- label="Source"- value={inboxSourceFilterLabel(sourceProductFilter)}- icon={<IconTarget />}- active={sourceProductFilter.length > 0}- >- {INBOX_SOURCE_OPTIONS.map((option) => (- <FilterItem- key={option.value}- icon={option.icon}- label={option.label}- active={sourceProductFilter.includes(option.value)}- onClick={() => toggleSourceProduct(option.value)}- />- ))}- </FilterPopover>+ <FilterPopover+ label="Source"+ value={inboxSourceFilterLabel(sourceProductFilter)}+ icon={<IconTarget />}+ active={sourceProductFilter.length > 0}+ >+ {INBOX_SOURCE_OPTIONS.map((option) => (+ <FilterItem+ key={option.value}+ icon={option.icon}+ label={option.label}+ active={sourceProductFilter.includes(option.value)}+ onClick={() => toggleSourceProduct(option.value)}+ />+ ))}+ </FilterPopover>- <FilterPopover- label="Priority"- value={inboxPriorityFilterLabel(priorityFilter)}- icon={<IconFlag />}- active={priorityFilter.length > 0}- >- {INBOX_PRIORITY_OPTIONS.map((priority) => (- <FilterItem- key={priority}- icon={- <span- className="size-2 rounded-full"- // eslint-disable-next-line react/forbid-dom-props- style={{ backgroundColor: PRIORITY_ACCENT[priority] }}- />- }- label={- <span>- {priority}- <span className="text-muted"> · {PRIORITY_MEANING[priority].label}</span>- </span>- }- active={priorityFilter.includes(priority)}- onClick={() => togglePriority(priority)}- />- ))}- </FilterPopover>+ <FilterPopover+ label="Priority"+ value={inboxPriorityFilterLabel(priorityFilter)}+ icon={<IconFlag />}+ active={priorityFilter.length > 0}+ >+ {INBOX_PRIORITY_OPTIONS.map((priority) => (+ <FilterItem+ key={priority}+ icon={+ <span+ className="size-2 rounded-full"+ // eslint-disable-next-line react/forbid-dom-props+ style={{ backgroundColor: PRIORITY_ACCENT[priority] }}+ />+ }+ label={+ <span>+ {priority}+ <span className="text-muted"> · {PRIORITY_MEANING[priority].label}</span>+ </span>+ }+ active={priorityFilter.includes(priority)}+ onClick={() => togglePriority(priority)}+ />+ ))}+ </FilterPopover>- {onRefresh && (- <LemonButton- type="secondary"- size="xsmall"- icon={<IconRefresh />}- loading={refreshing}- tooltip="Refresh"- aria-label="Refresh"- onClick={onRefresh}- className="bg-surface-primary ml-auto"- />- )}+ {onRefresh && (+ <LemonButton+ type="secondary"+ size="xsmall"+ icon={<IconRefresh />}+ loading={refreshing}+ tooltip="Refresh"+ aria-label="Refresh"+ onClick={onRefresh}+ className="bg-surface-primary"+ />+ )}+ </div></div>)}