: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
feat(today): move the space unread dot into the row icon slot (#109797)
Shy Alterf11a77e91da4
diff --git a/frontend/src/layout/today/TodaySpacesRow.tsx b/frontend/src/layout/today/TodaySpacesRow.tsxindex 84c51708468a..12127071d88e 100644--- a/frontend/src/layout/today/TodaySpacesRow.tsx+++ b/frontend/src/layout/today/TodaySpacesRow.tsx@@ -21,8 +21,6 @@ interface TodaySpacesRowProps {/** How many icon-sized slots `badge` takes, so the label truncates before them. */badgeCount?: 1 | 2 | 3unread?: boolean- /** Off when the row's icon already marks it unread. */- unreadDot?: boolean/** Fade a long label and scroll it on hover instead of cutting it with an ellipsis. */ticker?: boolean/** Part of a multi-session selection, so the row takes Desktop's selected tint. */@@ -42,7 +40,6 @@ export function TodaySpacesRow({badge,badgeCount = 1,unread = false,- unreadDot = true,ticker = false,selected = false,onClickCapture,@@ -51,10 +48,7 @@ export function TodaySpacesRow({const [hovered, setHovered] = useState(false)const [keyboardFocused, setKeyboardFocused] = useState(false)const badgeSlots = badge ? badgeCount : 0- const showUnreadDot = unread && unreadDot && !active- // Like PostHog Desktop, a row with badges shows its unread dot after them.- const trailingDot = showUnreadDot && !!badge- const restSlots = badgeSlots + (trailingDot ? 1 : 0)+ const showUnreadDot = unread && !activereturn (<divclassName="group/row relative flex min-w-0 items-center"@@ -81,7 +75,7 @@ export function TodaySpacesRow({details.length > 0 && 'h-auto py-1',// Like Desktop, the open row takes a stronger tint than the other selected rows.selected ? (active ? 'bg-primary/20' : 'bg-primary/10') : active && 'bg-fill-selected',- TRAILING_PADDING[restSlots]+ TRAILING_PADDING[badgeSlots])}><span@@ -90,7 +84,16 @@ export function TodaySpacesRow({details.length > 0 && 'self-start pt-0.5')}>- {icon}+ {showUnreadDot ? (+ <span+ role="img"+ aria-label="Unread"+ className="size-2 rounded-full bg-primary"+ data-attr="today-unread-dot"+ />+ ) : (+ icon+ )}</span><span className="flex min-w-0 flex-1 flex-col">{ticker ? (@@ -115,33 +118,11 @@ export function TodaySpacesRow({</span>)}</span>- {trailingDot ? (- <span className="sr-only">Unread</span>- ) : (- showUnreadDot && (- <span- role="img"- aria-label="Unread"- className="size-1.5 shrink-0 rounded-full bg-primary"- data-attr="today-unread-dot"- />- )- )}</Button>{badge && (// Like PostHog Desktop, the badges sit at the end of the row.<div className="absolute right-1 flex min-w-0 items-center gap-0.5">- {/* Desktop's spacing between the faces and the unread dot. */}- <span className="flex shrink-0 items-center gap-1.5">- {badge}- {trailingDot && (- <span- aria-hidden- className="mr-1 size-1.5 shrink-0 rounded-full bg-primary"- data-attr="today-unread-dot"- />- )}- </span>+ <span className="flex shrink-0 items-center gap-1.5">{badge}</span></div>)}</div>diff --git a/frontend/src/scenes/project-homepage/today/Today.stories.tsx b/frontend/src/scenes/project-homepage/today/Today.stories.tsxindex 3e025af13e93..1a0623a308ee 100644--- a/frontend/src/scenes/project-homepage/today/Today.stories.tsx+++ b/frontend/src/scenes/project-homepage/today/Today.stories.tsx@@ -554,7 +554,7 @@ export const SpacesPane: Story = {},}-// A hovered space row shows no buttons, so the faces and the unread dot keep their place.+// A hovered space row shows no buttons, so the faces keep their place.// Its actions, New session first, are in the hover card that opens beside it.export const SpacesPaneHoveringSpaceRow: Story = {play: async ({ canvasElement }) => {