diff --git a/app/consciousness/components/Figure.tsx b/app/consciousness/components/Figure.tsx index 743b1c131..36980428e 100644 --- a/app/consciousness/components/Figure.tsx +++ b/app/consciousness/components/Figure.tsx @@ -184,14 +184,19 @@ function SetArt({ className={cn('object-cover', phone && 'hidden tablet:block')} /> )} + {/* The phone still was drawn at 390 × 844, its art sized from the + width (`phoneArt`), so it keeps that shape at the top rather than + stretching to the hero's height, and lines up with the live figure. */} {phone && ( - +
+ +
)} diff --git a/app/consciousness/components/Hero.tsx b/app/consciousness/components/Hero.tsx index b8e28e2a8..541efd5bf 100644 --- a/app/consciousness/components/Hero.tsx +++ b/app/consciousness/components/Hero.tsx @@ -6,13 +6,10 @@ import { SET_INFO } from '../sets/registry'; import { DEFAULT_HERO, HERO_INFO, type HeroId } from '../sets/heroes'; import { HeroFigure } from './Figure'; import { AddToPoolButton, SubmitProposalButton } from './OrchActions'; -import { RfpMenu } from './RfpMenu'; import { BackButton } from './BackButton'; import { HeroPhase } from './HeroPhase'; import { daysLeft } from './PoolPanel'; import type { RfpView } from '../data/rfp'; -import type { Work } from '@/types/work'; -import type { WorkMetadata } from '@/services/metadata.service'; /** * A quiet "Talk to us" link beside the hero's buttons, pointing to the Talk @@ -20,18 +17,18 @@ import type { WorkMetadata } from '@/services/metadata.service'; */ const SHOW_TALK_LINK = false; +/** The hero's two buttons on phones: sharing one row, back to `lg` from tablet up. */ +const PHONE_CTA = + 'flex-auto px-3 text-[13.5px] !gap-1.5 min-[380px]:text-[14px] tablet:flex-none tablet:px-6 tablet:text-[15px] tablet:!gap-2'; + export function Hero({ set = 'ink', hero = DEFAULT_HERO, rfp, - work = null, - metadata = null, }: { set?: SetId; hero?: HeroId; rfp: RfpView; - work?: Work | null; - metadata?: WorkMetadata | null; }) { const words = SET_INFO[set].words; @@ -65,7 +62,11 @@ export function Hero({ -
+ {/* On phones the figure takes the top 40% of min(hero height, 2.16 × + width) (`phoneArt` in sets/poster/heroKit.ts), so the text starts at + least that far down: 40svh alone puts the headline on the figure + wherever the browser's bars make the viewport short. */} +

- - -
- + {/* Side by side on phones too: tighter type and padding so both + fit in one row at 360px. No Share, Save or More here (Kobe, + 2026-11-17): the RFP page keeps them. */} +
+ +
{SHOW_TALK_LINK && ( ; - return ; -} - -function SharePageButton() { - const { showShareModal } = useShareModalContext(); - return ( - - ); -} - -function LiveRfpMenu({ work, metadata }: { work: Work; metadata: WorkMetadata }) { - const [isTipModalOpen, setIsTipModalOpen] = useState(false); - const [isAddToListModalOpen, setIsAddToListModalOpen] = useState(false); - const [isFlagModalOpen, setIsFlagModalOpen] = useState(false); - - const { showShareModal } = useShareModalContext(); - const { isInList } = useIsInList(work.unifiedDocumentId); - const { isTogglingDefaultList, handleAddToList } = useAddToList({ - unifiedDocumentId: work.unifiedDocumentId, - isInList, - onOpenModal: () => setIsAddToListModalOpen(true), - }); - const permissions = useWorkPermissions(work); - const menu = useWorkHeaderMenuItems({ - work, - metadata, - permissions, - onOpenFlagModal: () => setIsFlagModalOpen(true), - }); - - const shareBlockReason = getPublicShareBlockReason(work); - const share = () => { - if (shareBlockReason) return; - const useAiPost = usesAiSharePost(work.contentType); - showShareModal({ - url: `${globalThis.location.origin}${buildPublicSharePath(work)}`, - docTitle: work.title, - action: 'USER_SHARED_DOCUMENT', - shouldShowConfetti: false, - aiPostId: useAiPost ? work.id : undefined, - previewImageUrl: useAiPost ? getWorkShareImageUrl(work) : undefined, - }); - }; - - return ( - <> - - - - - - } - > - {menu.menuItems} - - - setIsFlagModalOpen(false)} - isTipModalOpen={isTipModalOpen} - onCloseTipModal={() => setIsTipModalOpen(false)} - onTipSuccess={(amount) => { - toast.success(`Successfully tipped ${amount} RSC`); - setIsTipModalOpen(false); - }} - isAddToListModalOpen={isAddToListModalOpen} - onCloseAddToListModal={() => setIsAddToListModalOpen(false)} - showFundraiseActionModal={menu.showFundraiseActionModal} - onCloseFundraiseModal={menu.closeFundraiseModal} - onConfirmFundraise={menu.confirmFundraiseAction} - fundraiseModalConfig={menu.fundraiseModalConfig} - showReopenModal={menu.showReopenModal} - onCloseReopenModal={menu.closeReopenModal} - onConfirmReopen={menu.confirmReopenFundraise} - isReopeningFundraise={menu.isReopeningFundraise} - showCloseGrantModal={menu.showCloseGrantModal} - onCloseCloseGrantModal={menu.closeCloseGrantModal} - onConfirmCloseGrant={menu.confirmCloseGrant} - isClosingGrant={menu.isClosingGrant} - showInviteExpertsModal={menu.showInviteExpertsModal} - onCloseInviteExpertsModal={menu.closeInviteExpertsModal} - inviteExpertsGrantId={menu.inviteExpertsGrantId} - /> - - ); -} diff --git a/app/consciousness/page.tsx b/app/consciousness/page.tsx index 6c891c4d3..cb9a9bcdb 100644 --- a/app/consciousness/page.tsx +++ b/app/consciousness/page.tsx @@ -18,16 +18,13 @@ import { parseHero } from './sets/heroes'; import { rfpPostId, rfpView } from './data/rfp'; import { LiveRfpActions } from './components/LiveRfpActions'; import { PostService } from '@/services/post.service'; -import { MetadataService, type WorkMetadata } from '@/services/metadata.service'; import type { Work } from '@/types/work'; /** - * The RFP's post and metadata, the same two requests the RFP page's layout - * makes (`app/rfp/[id]/[slug]/layout.tsx`), for the post `rfpPostId` picks - * in this environment. Null when there is none or the post fails to load - * (a pending RFP is not public yet); the page then shows an empty pool that - * opens soon. Metadata only feeds the More menu, so failing it alone keeps - * the post. + * The RFP's post, as the RFP page's layout loads it + * (`app/rfp/[id]/[slug]/layout.tsx`), for the post `rfpPostId` picks in this + * environment. Null when there is none or the post fails to load (a pending + * RFP is not public yet); the page then shows an empty pool that opens soon. */ async function loadRfp(preview: string | string[] | undefined) { const postId = rfpPostId(preview); @@ -36,10 +33,7 @@ async function loadRfp(preview: string | string[] | undefined) { const work: Work = await PostService.get(String(postId)); const grant = work.note?.post?.grant; if (!grant?.id) return null; - const metadata: WorkMetadata | null = await MetadataService.get( - work.unifiedDocumentId?.toString() || '' - ).catch(() => null); - return { work, grant, metadata }; + return { work, grant }; } catch { return null; } @@ -70,13 +64,7 @@ export default async function OrchOrPage({ const rfp = rfpView(live?.work ?? null); const page = ( <> - +