fix: long hyperlinks should be wrapped at word boundaries, closed #4447
Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { Button } from "@follow/components/ui/button/index.js"
|
||||
import { MagneticHoverEffect } from "@follow/components/ui/effect/MagneticHoverEffect.js"
|
||||
import type { LinkProps } from "@follow/components/ui/link/LinkWithTooltip.js"
|
||||
import {
|
||||
Tooltip,
|
||||
@@ -49,10 +48,12 @@ export const MarkdownLink: Component<LinkProps> = (props) => {
|
||||
return (
|
||||
<Tooltip delayDuration={0}>
|
||||
<TooltipTrigger asChild>
|
||||
<MagneticHoverEffect
|
||||
as="a"
|
||||
<a
|
||||
draggable="false"
|
||||
className={cn("text-text font-semibold no-underline", props.className)}
|
||||
className={cn(
|
||||
"text-text follow-link--underline font-semibold no-underline",
|
||||
props.className,
|
||||
)}
|
||||
href={populatedFullHref}
|
||||
title={props.title}
|
||||
target="_blank"
|
||||
@@ -64,7 +65,7 @@ export const MarkdownLink: Component<LinkProps> = (props) => {
|
||||
{typeof props.children === "string" && (
|
||||
<i className="i-mgc-arrow-right-up-cute-re size-[0.9em] translate-y-[2px] opacity-70" />
|
||||
)}
|
||||
</MagneticHoverEffect>
|
||||
</a>
|
||||
</TooltipTrigger>
|
||||
{!!populatedFullHref && (
|
||||
<TooltipPortal>
|
||||
|
||||
@@ -58,10 +58,10 @@ const AIEntryLayoutImpl = () => {
|
||||
{realEntryId && (
|
||||
<m.div
|
||||
lcpOptimization
|
||||
initial={{ y: 150, opacity: 0, scale: 0.98 }}
|
||||
initial={{ y: 50, opacity: 0, scale: 0.98 }}
|
||||
animate={{ y: 0, opacity: 1, scale: 1 }}
|
||||
exit={{ y: 150, opacity: 0, scale: 0.98 }}
|
||||
transition={Spring.presets.smooth}
|
||||
exit={{ y: 50, opacity: 0, scale: 0.98 }}
|
||||
transition={Spring.smooth(0.3)}
|
||||
className="bg-theme-background absolute inset-0 z-10 border-l"
|
||||
>
|
||||
<EntryContent entryId={realEntryId} className="h-full" />
|
||||
|
||||
Reference in New Issue
Block a user