[DEV-630] Implementing QuestionPanel Functionalities#105
Open
mar-crespo wants to merge 15 commits intopreviewfrom
Open
[DEV-630] Implementing QuestionPanel Functionalities#105mar-crespo wants to merge 15 commits intopreviewfrom
mar-crespo wants to merge 15 commits intopreviewfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
issacli-0821
requested changes
Mar 28, 2026
Contributor
There was a problem hiding this comment.
Left two comments. Also need to resolve some merge conflicts resulting from Adam's PR
| className={styles.answerBox} | ||
| placeholder='Write your answer here...' | ||
| value={answer} | ||
| onChange={handleSubmit} |
Contributor
There was a problem hiding this comment.
Why is handleSubmit for onChange here?
| onChange={handleSubmit} | ||
| /> | ||
| <Button className={styles.button} onClick={handleSubmit}> | ||
| Submit |
Contributor
There was a problem hiding this comment.
Can we add an "Answer submitted" popup once the answer is submitted?
* Changed main color to red from teal/blue. However, wasn't able to figure out an issue with the hover/select with the tab buttons and couldn't get them to turn red. Also, fixed and changed button layout in StudyPage * fix issue with navbar text color by changing selector settings * Fixed the about page --------- Co-authored-by: ericguo202 <eric.guo171@gmail.com>
* [DEV-574] fixed user posts page * fixed lint errors * added package.json for phosphor icons addition * Remove user-preview page and sampleData from PR * removed sample types and moved to pastebin * Add types in PostCard and UserPostsPage --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* add user page * add user page * update user page * Remove mock user info --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* Implement NotificationView and NotificationSerializer * - Marked notification_views fields as read only - Updated notification post method to update notifications as opposed to create * Changed get method to only retrieve one notification * Changed notification_id parameter for all NotificationView methods * DEV 633 - Update style of HoagieHelp (#94) * Changed main color to red from teal/blue. However, wasn't able to figure out an issue with the hover/select with the tab buttons and couldn't get them to turn red. Also, fixed and changed button layout in StudyPage * fix issue with navbar text color by changing selector settings * Fixed the about page --------- Co-authored-by: ericguo202 <eric.guo171@gmail.com> * Lint notification_views --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu> Co-authored-by: Timothy Li <timothyli1331@gmail.com> Co-authored-by: ericguo202 <eric.guo171@gmail.com>
* Create hearts url routes * fix import from heart_views.py --------- Co-authored-by: Ryan Jensen <rj1044@princeton.edu> Co-authored-by: ericguo202 <eric.guo171@gmail.com>
* create heartService.ts * fix * Update comments on the functions --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* Added atomic hearting functionalities for questions, answers, and responses/comments. * add unheart functionality * fix method name - should be heart_comment not heart_response * Pass CustomUser directly from request * Optimize DB queries * Lint heart_views.py --------- Co-authored-by: ericguo202 <eric.guo171@gmail.com> Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* updated question panel to match figma * ran prettier * Lint QuestionPanel * Modify create_time to only be Date type --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* Created the get_notifications function * Made get_notifications into a standalone function and changed to request.user.id * hopefully this fixes merge conflicts * Lint notification_views --------- Co-authored-by: issacli-0821 <tl1719@princeton.edu>
* Remove leading slash; fix param typo * Make heart functions standalone instead of a view * Update yarn.lock * Add phosphor icons in package.json * Update dependencies to include phosphor-icons/react * Refactor and simplify heart functions, rename question hearts field to match answer and comment * Lint urls --------- Co-authored-by: Spencer04Hire <124114480+Spencer04Hire@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
References
Proposed Changes
Added answer submission functionality – Implemented a complete answer form with state management (showAnswerBox, answer), input handling, and submission via
createNewAnswerAPI call with toast notification on successAdded new props and imports – Added questionId prop to the interface, plus imports for useRouter, createNewAnswer from answerService, and toast from sonner
Added Reply button interaction – Created a "Reply" button that toggles visibility of the answer text area, with a "Submit" button that posts the answer and clears the form
Fixed code to work with changes to match QuestionPanel look to new Figma design
Tested changes using testing page with mock data: