feat: replace the starring page with a person page
A credit now opens /person/{id}: portrait, name, department, life dates and
birthplace, the biography, and the full filmography ranked by vote count.
One request carries all of it — combined_credits rides along on the person
call — so the discover based starring query and its with_people filter go.
The biography fills whatever height the portrait leaves and fades where it
is cut, with the whole text in a tooltip on hover; a phone has no height to
respect there, so it simply runs on.
Route level and query level skeletons stand in while it loads, built from
the shadcn primitive.
Development server side fetches go over the loopback rather than SITE_URL,
which is a LAN address meant for other devices: once that address moves the
fetch hangs until undici times out, ten seconds per navigation.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
6fc41c0901
commit
3dc2ebfe53
22 files changed
+342
-108
No files matched your search
@@ -8,21 +8,17 @@ interface Props {
|
||||
lines: string[];
|
||||
children: ReactNode;
|
||||
className?: string;
|
||||
triggerClassName?: string;
|
||||
}
|
||||
|
||||
const Hint: FC<Props> = ({ lines, children, className, triggerClassName }) => {
|
||||
const Hint: FC<Props> = ({ lines, children, className }) => {
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
// an animation that lands on a transform turns this wrapper into a stacking context,
|
||||
// so the tooltip can only reach above the following rows by raising the wrapper itself
|
||||
return (
|
||||
<span className={cn('relative z-10 inline-flex', className)}>
|
||||
<button
|
||||
type='button'
|
||||
aria-label={lines.join('. ')}
|
||||
className={cn('inline-flex cursor-help items-center', triggerClassName)}
|
||||
// a tap fires pointerenter too, opening what the click would then toggle shut
|
||||
className='inline-flex cursor-help items-center'
|
||||
onPointerEnter={({ pointerType }) => pointerType === 'mouse' && setOpen(true)}
|
||||
onPointerLeave={({ pointerType }) => pointerType === 'mouse' && setOpen(false)}
|
||||
onClick={() => setOpen((value) => !value)}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
||||
return <div className={cn('animate-pulse rounded-md bg-muted', className)} {...props} />;
|
||||
}
|
||||
|
||||
export { Skeleton };
|
||||
Reference in new issue
Block a user