Skip to content

Commit 90286dc

Browse files
committed
refactor(web): always inset scrollbars, drop the setting
1 parent 3f0b13c commit 90286dc

8 files changed

Lines changed: 4 additions & 53 deletions

File tree

‎apps/web/src/appInit.tsx‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ function startClientAppearance(): void {
7878
if (previous?.chatWidth !== settings.chatWidth) {
7979
root.dataset.chatWidth = settings.chatWidth;
8080
}
81-
if (previous?.insetScrollbars !== settings.insetScrollbars) {
82-
root.toggleAttribute("data-inset-scrollbars", settings.insetScrollbars);
83-
}
8481
if (previous?.appearanceContrast !== settings.appearanceContrast) {
8582
applyAppearanceContrast(root, settings.appearanceContrast);
8683
}

‎apps/web/src/components/chat/ThreadDetailsCard.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ export function ThreadDetailsCard({
115115
const card = (
116116
<div
117117
className={cn(
118-
// Shifts with inset scrollbars so the card keeps its gap from the chat's scrollbar.
118+
// Keeps the card's gap from the chat's inset scrollbar.
119119
"dropdown-glass relative right-(--app-scrollbar-edge-inset) isolate contain-paint grid max-h-full grid-rows-[minmax(0,1fr)] overflow-hidden rounded-2xl",
120120
mode === "popover" &&
121121
"max-h-[min(calc(100dvh-6.5rem),calc(var(--available-height,100dvh)-1rem))]",

‎apps/web/src/components/settings/AppearanceSettingsPanel.tsx‎

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -481,30 +481,6 @@ export function AppearanceSettingsPanel() {
481481
</SettingsSection>
482482

483483
<TypographySection />
484-
485-
<SettingsSection id="appearance-accessibility" title="Accessibility">
486-
<SettingsRow
487-
{...searchableSetting("inset-scrollbars")}
488-
description="Move vertical scrollbars away from the right edge so they are easier to grab."
489-
resetAction={
490-
settings.insetScrollbars !== DEFAULT_UNIFIED_SETTINGS.insetScrollbars ? (
491-
<SettingResetButton
492-
label="inset scrollbars"
493-
onClick={() =>
494-
updateSettings({ insetScrollbars: DEFAULT_UNIFIED_SETTINGS.insetScrollbars })
495-
}
496-
/>
497-
) : null
498-
}
499-
control={
500-
<Switch
501-
checked={settings.insetScrollbars}
502-
onCheckedChange={(checked) => updateSettings({ insetScrollbars: Boolean(checked) })}
503-
aria-label="Inset scrollbars"
504-
/>
505-
}
506-
/>
507-
</SettingsSection>
508484
</SettingsPageContainer>
509485
);
510486
}

‎apps/web/src/components/settings/SettingsPanels.tsx‎

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -458,9 +458,6 @@ export function useSettingsRestore(onRestored?: () => void) {
458458
...(settings.mathRenderingEnabled !== DEFAULT_UNIFIED_SETTINGS.mathRenderingEnabled
459459
? ["Render math"]
460460
: []),
461-
...(settings.insetScrollbars !== DEFAULT_UNIFIED_SETTINGS.insetScrollbars
462-
? ["Inset scrollbars"]
463-
: []),
464461
...(settings.panelAnimationDurationMs !== DEFAULT_UNIFIED_SETTINGS.panelAnimationDurationMs
465462
? ["Panel animations"]
466463
: []),
@@ -632,7 +629,6 @@ export function useSettingsRestore(onRestored?: () => void) {
632629
chatWidth: DEFAULT_UNIFIED_SETTINGS.chatWidth,
633630
effortDisplay: DEFAULT_UNIFIED_SETTINGS.effortDisplay,
634631
mathRenderingEnabled: DEFAULT_UNIFIED_SETTINGS.mathRenderingEnabled,
635-
insetScrollbars: DEFAULT_UNIFIED_SETTINGS.insetScrollbars,
636632
timestampFormat: DEFAULT_UNIFIED_SETTINGS.timestampFormat,
637633
notificationMode: DEFAULT_UNIFIED_SETTINGS.notificationMode,
638634
inAppNotificationsEnabled: DEFAULT_UNIFIED_SETTINGS.inAppNotificationsEnabled,

‎apps/web/src/components/settings/settingsSearch.ts‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,12 +415,6 @@ export const SETTINGS_SEARCH_ITEMS = [
415415
title: "Composer context",
416416
to: "/settings/appearance",
417417
},
418-
{
419-
id: "inset-scrollbars",
420-
title: "Inset scrollbars",
421-
to: "/settings/appearance",
422-
searchTerms: ["accessibility scrollbar padding edge grab click easier"],
423-
},
424418
{
425419
id: "project-grouping",
426420
title: "Project grouping",

‎apps/web/src/index.css‎

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
8989
}
9090

9191
:root {
92-
--app-scrollbar-edge-inset: 0px;
92+
--app-scrollbar-edge-inset: 4px;
9393
--app-scrollbar-width: calc(6px + var(--app-scrollbar-edge-inset));
9494
--appearance-contrast-base: 100%;
9595
--appearance-contrast-boost: 0%;
@@ -1866,12 +1866,8 @@ code {
18661866
background: var(--app-scrollbar-thumb-hover);
18671867
}
18681868

1869-
/* Accessibility: keep vertical thumbs off the window edge, where resize
1870-
handles steal the pointer. The transparent border keeps the gap clickable. */
1871-
:root[data-inset-scrollbars] {
1872-
--app-scrollbar-edge-inset: 4px;
1873-
}
1874-
1869+
/* Keeps vertical thumbs off the window edge, where resize handles steal the
1870+
pointer. The transparent border keeps the gap clickable. */
18751871
::-webkit-scrollbar-thumb:vertical {
18761872
border-right: var(--app-scrollbar-edge-inset) solid transparent;
18771873
border-radius: 3px calc(3px + var(--app-scrollbar-edge-inset))

‎docs/user/appearance.md‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@ The main sidebar, right panel, and terminal drawer open and close immediately by
4848
in your operating system. Moving between threads always snaps to the selected thread's panel state
4949
without replaying its transitions.
5050

51-
## Accessibility
52-
53-
**Inset scrollbars** is on by default in the web and desktop clients, moving vertical scrollbars
54-
a few pixels away from each pane's right edge so they are easier to grab without hitting the
55-
window's resize edge. Turn it off under **Settings → Appearance → Accessibility**.
56-
5751
## Custom themes
5852

5953
On web and desktop, choose **Create theme** to adjust a palette, or import a T3 Code or VS Code

‎packages/contracts/src/settings.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ export const ClientSettingsSchema = Schema.Struct({
523523
// Opt-in TeX typesetting in rendered Markdown. Off keeps math parsing and
524524
// KaTeX out of the render path entirely.
525525
mathRenderingEnabled: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(false))),
526-
insetScrollbars: Schema.Boolean.pipe(Schema.withDecodingDefault(Effect.succeed(true))),
527526
});
528527
export type ClientSettings = typeof ClientSettingsSchema.Type;
529528

@@ -1834,6 +1833,5 @@ export const ClientSettingsPatch = Schema.Struct({
18341833
snapShotAnimations: Schema.optionalKey(Schema.Boolean),
18351834
wordWrap: Schema.optionalKey(Schema.Boolean),
18361835
mathRenderingEnabled: Schema.optionalKey(Schema.Boolean),
1837-
insetScrollbars: Schema.optionalKey(Schema.Boolean),
18381836
});
18391837
export type ClientSettingsPatch = typeof ClientSettingsPatch.Type;

0 commit comments

Comments
 (0)