Mount consumer binary + continuous side-by-side with the detailed chart card & Timeline / Histogram toggle on binary bodies#4692
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. 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. Comment |
Cleanup: Preview Environment RemovedThe preview environment for this PR has been destroyed.
Cleanup triggered by PR close at 2026-05-07T08:32:43Z |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@front_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsx`:
- Around line 317-356: renderHistogram currently returns null when no histogram
data, producing blank space; change it to render the same outer container
(preserving viewToggle and the div with style height: chartHeight) and inside
show a fallback UI instead of null: if hideCP || isCpHidden keep the existing
RevealCPButton, otherwise render a small empty-state element (e.g., a centered
message or EmptyState component) in place of <Histogram> that says no histogram
data available; update renderHistogram (and its early return) so the fallback is
used when !histogram?.length while keeping median/mean logic and preserving
classNames and chartHeight.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: fafa630f-ab58-4e5e-8cfa-d0c79514c0b0
📒 Files selected for processing (9)
front_end/src/app/(main)/questions/[id]/components/question_page_shell/index.tsxfront_end/src/app/(main)/questions/[id]/components/question_view/consumer_question_view/prediction/single_question_prediction/continuous_question_prediction.tsxfront_end/src/app/(main)/questions/[id]/components/question_view/forecaster_question_view/question_header/question_header_cp_status.tsxfront_end/src/components/charts/histogram.tsxfront_end/src/components/charts/numeric_chart.tsxfront_end/src/components/charts/numeric_timeline.tsxfront_end/src/components/charts/primitives/chart_container.tsxfront_end/src/components/detailed_question_card/detailed_question_card/continuous_chart_card.tsxfront_end/src/hooks/use_container_size.ts
…d fix consumer binary radial padding
…idth responsive scaling, and center binary radial charts on mobile
…ble side-by-side continuous charts on sm breakpoints, and standardize spacing utility classes
46709cf to
0abae6a
Compare
02684fd
into
feat/question-page-redesign-2nd-iteration
Related to #4642
This PR mounts
QuestionHeaderCPStatusside-by-side with the detailed chart card for consumer binary and continuous question views, bringing them to parity with the forecaster branch layout. Also adds aTimeline / Histogramtoggle to binary detailed chart cards and fixes consumer binary radial left-edge clipping at sm–md breakpoints.Implemented features & fixes:
Consumer binary: replaced the centered big radial in the left panel withQuestionHeaderCPStatus- renders small radial (BinaryCPBar) + weekly-delta chip (QuestionCPMovement) on the left, timeline on the rightConsumer continuous: confirmed already implemented viaisConsumerView=falsepropagation intoDetailedContinuousChartCard, which renders the current-estimate tile + minified area chart on the left, full timeline on the rightForecaster binary/continuous: layouts unchangedBinary chart card: added Timeline / Histogram toggle in chart header;chartTitlewidened toReactNodeacrossChartContainer/NumericChart/NumericTimelineConsumer binary radial: fixed left-edge clipping at sm–md breakpointsBinary
demo.mp4
Summary by CodeRabbit
Release Notes
New Features
Improvements