mirror of
https://github.com/stablyai/orca.git
synced 2026-10-20 00:03:45 +00:00
Review follow-ups on the Shift-inverts-routing change. - The nested row promised "⇧⌘+click opens one in Orca" in the present tense while its own toggle was off, so the out-of-box state described behavior the user did not have. Phrase it as enabled-state copy, matching sibling rows. - The parent Link Routing description gained "opens a link the other way", which is false in the default state and contradicts the child row when inverting is on. No fixed sentence there is true in every state, so the child row — which knows the live destination — now owns the claim. That leaves getBrowserLinkRoutingShortcutLabel unused, so drop it. - The rich markdown editor still forced the system browser while the preview of the same file honored the modifier, so one link routed two ways depending on which view it was clicked in. - A remote runtime pins every link to the system browser, so the hover hint could promise Orca for a click that lands elsewhere. Gate the hint on the same condition openHttpLink uses. - Index both modifier titles: the search entry is built with openLinksInApp false, so the row was unfindable by the title it renders when routing is on. - Drop the ariaLabel that shared no words with the visible label (WCAG 2.5.3) and add the four missing settings-search keyword keys to all five catalogs.
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
import type { GlobalSettings } from '../../../../shared/types'
|
|
import { SearchableSetting } from './SearchableSetting'
|
|
import { SettingsSwitchRow } from './SettingsFormControls'
|
|
import {
|
|
getLinkRoutingModifierDescription,
|
|
getLinkRoutingModifierTitle
|
|
} from './browser-link-routing-modifier-copy'
|
|
|
|
type BrowserLinkRoutingModifierSettingProps = {
|
|
settings: Pick<GlobalSettings, 'openLinksInApp' | 'openLinksInAppModifierInverts'>
|
|
isMac: boolean
|
|
updateSettings: (updates: Partial<GlobalSettings>) => void
|
|
}
|
|
|
|
export function BrowserLinkRoutingModifierSetting({
|
|
settings,
|
|
isMac,
|
|
updateSettings
|
|
}: BrowserLinkRoutingModifierSettingProps): React.JSX.Element {
|
|
const openLinksInApp = settings.openLinksInApp === true
|
|
const title = getLinkRoutingModifierTitle(openLinksInApp)
|
|
const description = getLinkRoutingModifierDescription({ openLinksInApp, isMac })
|
|
|
|
return (
|
|
<SearchableSetting
|
|
title={title}
|
|
description={description}
|
|
keywords={[
|
|
'browser',
|
|
'links',
|
|
'routing',
|
|
'shift',
|
|
'modifier',
|
|
'invert',
|
|
'opposite',
|
|
isMac ? 'cmd' : 'ctrl'
|
|
]}
|
|
>
|
|
{/* Nested under Link Routing: this row only describes what its modifier does. */}
|
|
<div className="ml-4 border-l border-border pl-4">
|
|
<SettingsSwitchRow
|
|
label={title}
|
|
description={description}
|
|
checked={settings.openLinksInAppModifierInverts === true}
|
|
onChange={() =>
|
|
updateSettings({
|
|
openLinksInAppModifierInverts: settings.openLinksInAppModifierInverts !== true
|
|
})
|
|
}
|
|
/>
|
|
</div>
|
|
</SearchableSetting>
|
|
)
|
|
}
|