GeezerVison is showing github.com — feat(web): boring sidebar can show folder threads on two lines by t3dotgg · Pull Request #26463 · pingdotgg/t3code
feat(web): boring sidebar can show folder threads on two lines
#26463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement . We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Uh oh!
There was an error while loading. Please reload this page.
Show file tree
Hide file tree
Changes from all commits
Commits
File filter
Filter by extension
.ts
(3)
.tsx
(3)
All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Hide whitespace
Diff view
Hide whitespace
There are no files selected for viewing
Original file line number
Diff line number
Diff line change
Expand Up
@@ -63,6 +63,7 @@ const clientSettings: ClientSettings = {
sidebarProjectSortOrder: "manual",
sidebarThreadSortOrder: "created_at",
boringSidebarEnabled: false,
boringSidebarMultilineRows: false,
legacySidebarEnabled: false,
sidebarWorkingShelfEnabled: false,
loadBalancingEnabled: false,
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -962,6 +962,7 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
},
});
const boringSidebarEnabled = useBoringSidebarEnabled();
const folderRowsMultiline = useClientSettings((settings) => settings.boringSidebarMultilineRows);
const newThreadContext = useHandleNewThread();
// Row callbacks capture only the handler; the rest of the context changes with the route.
const { handleNewThread } = newThreadContext;
Expand Down
Expand Up
@@ -3168,7 +3169,13 @@ export default function Sidebar({ routeReveal }: { routeReveal: SidebarRouteReve
);
const isCard =
section === "active" || section === "pinned" || section === "working";
const rowVariant = folderRow ? "folder" : isCard ? "card" : "slim";
const rowVariant = folderRow
? folderRowsMultiline
? "folder-multiline"
: "folder"
: isCard
? "card"
: "slim";
return (
<SortableThreadRow
key={threadKey}
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -17,6 +17,7 @@ export function LabsSettingsPanel() {
<SettingsPageContainer>
<SettingsSection id="beta" title="Beta">
<BoringSidebarRow />
<BoringSidebarMultilineRow />
{/* Clerk is only mounted when this build has T3 Connect. */}
{hasCloudPublicConfig() ? <GuestLinksRowWithSignIn /> : <GuestLinksRow />}
<LinkedEnvironmentsRow />
Expand Down
Expand Up
@@ -47,6 +48,26 @@ function BoringSidebarRow() {
);
}
function BoringSidebarMultilineRow() {
const settings = useScopedSettings();
const updateSettings = useUpdateScopedSettings();
return (
<SettingsRow
{...searchableSetting("boring-sidebar-multiline")}
description="In the boring sidebar, show folder threads on two lines: the title, then the branch, pull request, and agent."
control={
<Switch
checked={settings.boringSidebarMultilineRows}
onCheckedChange={(checked) =>
updateSettings({ boringSidebarMultilineRows: Boolean(checked) })
}
aria-label="Two-line folder rows"
/>
}
/>
);
}
/** Signed out of T3 Connect, the row offers to sign in instead of its switch. */
function GuestLinksRowWithSignIn() {
const { isSignedIn } = useAuth();
Expand Down
Original file line number
Diff line number
Diff line change
Expand Up
@@ -431,6 +431,12 @@ export const SETTINGS_SEARCH_ITEMS = [
to: "/settings/labs",
searchTerms: ["beta folders project tree legacy old classic sidebar"],
},
{
id: "boring-sidebar-multiline",
Comment thread
macroscopeapp[bot] marked this conversation as resolved.
Resolved
Uh oh!
There was an error while loading. Please reload this page.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
Uh oh!
There was an error while loading. Please reload this page.
title: "Two-line folder rows",
to: "/settings/labs",
searchTerms: ["beta boring sidebar folder rows multiline branch pull request details"],
},
{
id: "guest-links",
title: "Guest links",
Expand Down
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Loading
Oops, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.