Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(web): a leading spacer keeps folder row items right-aligned #46102

Opentarasmychats(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/46102/headopened View on GitHub

Showing 3 changed files with 78 additions and 23 deletions.

x
0 of 3 viewed, 3 left
11 additions and 23 deletionsapps/web/src/components/sidebar/SidebarThreadRow.tsxModified
View file
@@ -145,6 +145,7 @@
} from "./SidebarThreadHostPressure";
import { MiddleTruncate } from "../ui/middle-truncate";
import {
+ joinSidebarRowLines,
resolveSidebarRowLines,
sidebarRowItemFlexClassName,
type SidebarRowItemId,
@@ -747,18 +748,6 @@
​
-/** Lines joined into one keep a spacer only where it separates two items. */
-function withoutStraySpacers(tokens: ReadonlyArray<SidebarRowToken>) {
- return tokens.filter(
- (token, index) =>
- token.id !== "spacer" ||
- (index > 0 &&
- index < tokens.length - 1 &&
- tokens[index - 1]?.id !== "spacer" &&
- tokens.slice(index + 1).some((next) => next.id !== "spacer")),
- );
-}
-​
const NO_INTENT_PREFETCH = {
onPointerEnter: undefined,
onPointerLeave: undefined,
@@ -1645,25 +1634,24 @@