Skip to content

Comments

Implementing QuestionPanel#68

Open
mar-crespo wants to merge 4 commits intoimplement-question-view-pagefrom
implement-question-panel
Open

Implementing QuestionPanel#68
mar-crespo wants to merge 4 commits intoimplement-question-view-pagefrom
implement-question-panel

Conversation

@mar-crespo
Copy link

References

  • Linear: DEV-548

Proposed Changes

  • Created .module.css file for styling
  • Added QuestionPanelProps that takes in user, title, tags, details, create_time, user_is_anonymous, and a function for the back button called onBack
  • Added helper functions to format the time passed since creation and to format metadata displayed
  • Implemented QuestionPanel and created a test page with the following code:
'use client';


import { Pane, majorScale } from 'evergreen-ui';


import QuestionPanel from '@/components/QuestionPanel/QuestionPanel';


export function TestPage() {
 // Mock data for testing QuestionPanel
 const mockQuestion = {
   user: 'Sarah Park',
   title: 'How do I approach the graph algorithms in COS226?',
   tags: ['Algorithms', 'COS226', 'Graphs'],
   details:
     "I'm starting the graph algorithms unit in COS226, and I'm feeling overwhelmed. What's the best way to actually learn these algorithms instead of just memorizing them? Should I focus on proofs, run times, code implementation, or visual intuition?",
   create_time: new Date(Date.now() - 1000 * 60 * 60 * 2), // 2 hours ago
   user_is_anonymous: false,
 };


 return (
   <Pane padding={majorScale(4)} background='tint1' minHeight='100vh'>
     <QuestionPanel
       user={mockQuestion.user}
       title={mockQuestion.title}
       tags={mockQuestion.tags}
       details={mockQuestion.details}
       create_time={mockQuestion.create_time}
       user_is_anonymous={mockQuestion.user_is_anonymous}
       onBack={() => alert('Back button clicked!')}
     />
   </Pane>
 );
}


export default TestPage;

Results of the test page:
QuestionPanel_Test

@vercel
Copy link

vercel bot commented Feb 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
help Ready Ready Preview, Comment Feb 17, 2026 6:25pm

Request Review

Copy link
Contributor

@issacli-0821 issacli-0821 left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Contributor

@issacli-0821 issacli-0821 left a comment

Choose a reason for hiding this comment

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

Can we change this component to use Evergeen elements instead?

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