Skip to content

Implementing QuestionPanel#68

Merged
issacli-0821 merged 4 commits intoimplement-question-view-pagefrom
implement-question-panel
Feb 26, 2026
Merged

Implementing QuestionPanel#68
issacli-0821 merged 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?

@issacli-0821 issacli-0821 merged commit f89871c into implement-question-view-page Feb 26, 2026
4 of 5 checks passed
@issacli-0821 issacli-0821 deleted the implement-question-panel branch February 26, 2026 17:38
Spencer04Hire added a commit that referenced this pull request Feb 27, 2026
* Added Answer type to types.ts

* Remove profilePicture from Answer type

* CommentBox implementation with read more/read less option

* Created AnswerPanel

* Ran prettier and lint on AnswerPanel

* removed accidental direct commit instead of pull request

* Implement AnswerBox frontend component

* Implement AnswerBox style

* [DEV-552] Implement CommentBox (#80)

* comment box

* linting error fix

* linting error fix

* pull request comments

* Modify comment type to be based on schema in commentService

* Linting errors in types.ts

---------

Co-authored-by: issacli-0821 <tl1719@princeton.edu>

* [DEV-551] Implement CommentsPanel (#77)

* wrote comments panel again

* changed div to Pane and removed threads

* Pass showThreadLine in CommentBox to conditionally render thread line

---------

Co-authored-by: issacli-0821 <tl1719@princeton.edu>

* Lint AnswerBox and AnswerPanel

* Delete yarn.lock in root

* Modify export paths to use path alias

* Convert html elements to Evergreen components

* Delete AnswerBox css

* Update types and modified components to match

* Remove unused imports in AnswerBox and AnswerPanel

* Modify placement of elements in AnswerBox

* Fix lint errors

* Add truncation behavior for long answers

* Wrap overflowing answers around the panel

* Implementing QuestionPanel (#68)

* Implementing QuestionPanel

* Fixing linting errors while implementing question panel

* Switching to using Evergreen elements

* Fixing spacing between different import groups

* Don't export types in comment service

* Move max length constant into answer and comment files

* Combine and fix formatTimePassed implementations

* Prettier fixes

---------

Co-authored-by: rayk <mrraykong@gmail.com>
Co-authored-by: david.weizhong.liu@gmail.com <david.weizhong.liu@gmail.com>
Co-authored-by: timothyli1331 <timothyli1331@gmail.com>
Co-authored-by: davidweizhongliu <96628470+davidweizhongliu@users.noreply.github.com>
Co-authored-by: Hellen Luo <luohellen05@gmail.com>
Co-authored-by: mar-crespo <mcrespo2743@gmail.com>
Co-authored-by: Spencer04Hire <124114480+Spencer04Hire@users.noreply.github.com>
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