Skip to content

Build the title row (and bump the title size)#4647

Merged
ncarazon merged 2 commits intofeat/question-page-redesign-1st-iterationfrom
feat/build-the-title-row-and-bump-the-title-size
Apr 23, 2026
Merged

Build the title row (and bump the title size)#4647
ncarazon merged 2 commits intofeat/question-page-redesign-1st-iterationfrom
feat/build-the-title-row-and-bump-the-title-size

Conversation

@ncarazon
Copy link
Copy Markdown
Contributor

@ncarazon ncarazon commented Apr 23, 2026

Related to #4638

This PR extracts and builds the new Title Row layout for the updated question page shell infrastructure. Implemented features & fixes:

  • Added the new TitleRow component handling title structures for both forecaster and consumer variants
  • Bumped the title font size to match the new design
  • Implemented a side-by-side layout for the title and continuous prediction (CP) status widget explicitly for the Forecaster desktop view
  • Cleaned the Consumer view layout to display a title-only row without an inline CP widget
  • Preserved existing wrapper capabilities to ensure conditional posts flawlessly render using their specific conditional tile design

Before

  • Forecaster view
image
  • Consumer view
image

After

  • Forecaster view
image
  • Consumer view
image

Summary by CodeRabbit

  • Refactor
    • Consolidated question title and header rendering logic into a reusable component for improved code maintainability and consistency across different question views.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 23, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 67bf4ab2-bdee-4e32-bbac-76c12f1cdbfd

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • ✅ Review completed - (🔄 Check again to review again)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/build-the-title-row-and-bump-the-title-size

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
front_end/src/app/(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/index.tsx (1)

9-40: ⚠️ Potential issue | 🟡 Minor

Remove unused QuestionHeaderInfo import from Line 9

The import is dead code. QuestionHeaderInfo is imported but never rendered or used in the component's JSX body (Lines 25-40) or in any of its dependencies. TitleRow does not reference it either. Remove the import statement.

The question metadata is now displayed through TitleRow and QuestionHeaderCPStatus instead, so this is a cleanup task from the refactoring mentioned in the commit message ("move question info on top in forecaster header") — no functional loss.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/index.tsx
around lines 9 - 40, The import QuestionHeaderInfo is unused in the
QuestionHeader component; remove the dead import statement (the line importing
QuestionHeaderInfo) so only necessary imports remain—verify the QuestionHeader
component (which renders PostStatusBox, MetaRow and TitleRow with
variant="forecaster") still functions and that no other references to
QuestionHeaderInfo exist in this file.
🧹 Nitpick comments (2)
front_end/src/app/(main)/questions/[id]/components/question_page_shell/title_row.tsx (2)

44-76: Duplicated title class string.

The "text-2xl font-bold tracking-tight sm:text-3xl lg:text-4xl" Tailwind string is repeated at Line 44 and Line 71. Consider extracting to a local constant so future typography bumps stay in sync across the forecaster and fallback branches.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/title_row.tsx
around lines 44 - 76, The Tailwind class string for the title is duplicated in
the two JSX branches; extract it into a local constant (e.g., TITLE_CLASS) and
use that constant in both places where QuestionTitle is rendered (the first
branch where QuestionTitle has className="text-2xl font-bold tracking-tight
sm:text-3xl lg:text-4xl" and the fallback return where cn("text-2xl font-bold
tracking-tight sm:text-3xl lg:text-4xl", className) is used) so both the
forecaster and fallback branches reference the same class string; update the
cn(...) call to use the new TITLE_CLASS plus className.

42-54: Dead ordering classes on inner div.

lg:order-0 order-1 at Line 43 sits on the only child of the flex flex-1 flex-col container at Line 42, so the order-* utilities have no effect here. The meaningful ordering is already applied via the className prop on the outer wrapper (Line 37-40) by the forecaster caller. Consider dropping these classes to avoid confusion.

♻️ Proposed cleanup
         <div className="flex flex-1 flex-col">
-          <div className="lg:order-0 order-1 flex items-center">
+          <div className="flex items-center">
             <QuestionTitle className="text-2xl font-bold tracking-tight sm:text-3xl lg:text-4xl">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/title_row.tsx
around lines 42 - 54, The inner div that wraps QuestionTitle and
QuestionHeaderCPStatus contains dead ordering classes "lg:order-0 order-1" which
have no effect because it's the only child of the parent "flex flex-1 flex-col";
remove those classes from that div (the element that currently has lg:order-0
order-1) so the layout relies on the outer wrapper’s className passed by the
forecaster caller; verify visually that QuestionTitle, QuestionHeaderCPStatus
and the isContinuousQuestion-based hideLabel behavior remain unchanged after
removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In
`@front_end/src/app/`(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/index.tsx:
- Around line 9-40: The import QuestionHeaderInfo is unused in the
QuestionHeader component; remove the dead import statement (the line importing
QuestionHeaderInfo) so only necessary imports remain—verify the QuestionHeader
component (which renders PostStatusBox, MetaRow and TitleRow with
variant="forecaster") still functions and that no other references to
QuestionHeaderInfo exist in this file.

---

Nitpick comments:
In
`@front_end/src/app/`(main)/questions/[id]/components/question_page_shell/title_row.tsx:
- Around line 44-76: The Tailwind class string for the title is duplicated in
the two JSX branches; extract it into a local constant (e.g., TITLE_CLASS) and
use that constant in both places where QuestionTitle is rendered (the first
branch where QuestionTitle has className="text-2xl font-bold tracking-tight
sm:text-3xl lg:text-4xl" and the fallback return where cn("text-2xl font-bold
tracking-tight sm:text-3xl lg:text-4xl", className) is used) so both the
forecaster and fallback branches reference the same class string; update the
cn(...) call to use the new TITLE_CLASS plus className.
- Around line 42-54: The inner div that wraps QuestionTitle and
QuestionHeaderCPStatus contains dead ordering classes "lg:order-0 order-1" which
have no effect because it's the only child of the parent "flex flex-1 flex-col";
remove those classes from that div (the element that currently has lg:order-0
order-1) so the layout relies on the outer wrapper’s className passed by the
forecaster caller; verify visually that QuestionTitle, QuestionHeaderCPStatus
and the isContinuousQuestion-based hideLabel behavior remain unchanged after
removal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 0bf567c2-1ba2-4519-8158-49a6ce6bd662

📥 Commits

Reviewing files that changed from the base of the PR and between 57fcf8d and 2d753ed.

📒 Files selected for processing (3)
  • front_end/src/app/(main)/questions/[id]/components/question_page_shell/title_row.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_view/consumer_question_view/index.tsx
  • front_end/src/app/(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/index.tsx

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 23, 2026

Cleanup: Preview Environment Removed

The preview environment for this PR has been destroyed.

Resource Status
🌐 Preview App Deleted
🗄️ PostgreSQL Branch Deleted
⚡ Redis Database Deleted
🔧 GitHub Deployments Removed
📦 Docker Image Retained (auto-cleanup via GHCR policies)

Cleanup triggered by PR close at 2026-04-23T15:26:41Z

@ncarazon ncarazon merged commit 8f7d57e into feat/question-page-redesign-1st-iteration Apr 23, 2026
9 checks passed
@ncarazon ncarazon deleted the feat/build-the-title-row-and-bump-the-title-size branch April 23, 2026 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants