Compare commits

...

6 Commits

Author SHA1 Message Date
Steven H 7f31589c6d Merge branch 'main' into stevenh/perf-investigations 2025-06-16 23:17:12 +01:00
Steven H b8ab64083f Merge branch 'main' into stevenh/perf-investigations 2025-06-16 23:07:42 +01:00
Steven Hall 60d67fdc51 update 2025-06-16 23:05:18 +01:00
Steven Hall 25f768cbf3 Remove tooltip 2025-06-16 22:41:37 +01:00
Steven Hall 7e06549f1d Fix ts 2025-06-16 22:33:55 +01:00
Steven Hall 71dfd77c8e Investigate performance issues with InlineLink. 2025-06-16 22:27:37 +01:00
@@ -4,7 +4,6 @@ import { resolveContentRef } from '@/lib/references';
import { Icon } from '@gitbook/icons';
import { StyledLink } from '../primitives';
import type { InlineProps } from './Inline';
import { InlineLinkTooltip } from './InlineLinkTooltip';
import { Inlines } from './Inlines';
export async function InlineLink(props: InlineProps<DocumentInlineLink>) {
@@ -32,30 +31,28 @@ export async function InlineLink(props: InlineProps<DocumentInlineLink>) {
const isExternal = inline.data.ref.kind === 'url';
return (
<InlineLinkTooltip inline={inline} context={context.contentContext} resolved={resolved}>
<StyledLink
href={resolved.href}
insights={{
type: 'link_click',
link: {
target: inline.data.ref,
position: SiteInsightsLinkPosition.Content,
},
}}
>
<Inlines
context={context}
document={document}
nodes={inline.nodes}
ancestorInlines={[...ancestorInlines, inline]}
<StyledLink
href={resolved.href}
insights={{
type: 'link_click',
link: {
target: inline.data.ref,
position: SiteInsightsLinkPosition.Content,
},
}}
>
<Inlines
context={context}
document={document}
nodes={inline.nodes}
ancestorInlines={[...ancestorInlines, inline]}
/>
{isExternal ? (
<Icon
icon="arrow-up-right"
className="ml-0.5 inline size-3 links-accent:text-tint-subtle"
/>
{isExternal ? (
<Icon
icon="arrow-up-right"
className="ml-0.5 inline size-3 links-accent:text-tint-subtle"
/>
) : null}
</StyledLink>
</InlineLinkTooltip>
) : null}
</StyledLink>
);
}