-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrate GET Questions in Frontend #882
Integrate GET Questions in Frontend #882
Conversation
Thank you and congrats🎉 for opening this pull request!💖 Please make sure you have followed our Contributing Guidelines.🙌 We will test out your code and reply in a bit with some pointers and requests.💿 There may be some errors, but don't worry! We'll work through them with you! 👍🎉😄 If you haven't filled the template out, Please do so!🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please make the following changes -
- Add loader while the api call is happening, you can check other sections for reference
- Show the toast message of success/failure of the api call
Yeah I added the loader in the question section by doing conditional rendering but its not showing and the toast message will get on upvote or when the user gets on the q&a page please specify. |
For pt #1 please see the attached screenshot, i am not seeing the loader when get questions api call is happening. Screen.Recording.2024-05-15.at.3.45.29.PM.mov |
Fix : Integrate-GET-Questions-in-Frontend Type Of Changes
Screen Video2024-05-15.20-02-54.mp4 |
|
||
useEffect(() => { | ||
getQues(); | ||
setToastMessage("Fetching Questions..."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we shouldn't be showing this toast message while fetching the data. Just loader animation while fetching is fine. Please check https://github.com/HITK-TECH-Community/Community-Website/blob/main/frontend/src/pages/ContactUs/ContactUs.jsx#L323-L328 this section for reference. For every api call, there can be success/failure and the toast should be showing success message in green if api is successful or failure message in red with error message. in your pr i don't see the failure scenario being handled. Please go through the code i shared here, it will give you the idea of toast implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i am working on this and removing the toast message on the loading.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Kajol-Kumari Please Check Out Now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Congrats on merging your first pull request! 🙌 🎉 ⚡️ Now that you've merged your first pull request, you're the perfect person to help someone else out with this challenging first step.😄🙌 |
@TejasNasre let me know asap if you are willing to work on 885 this issue? |
who is answering the questions. |
It can be answered by anyone but will appear only after admin's approval. As far as i remember that was implemented, let me check this its been a while i have checked this codebase |
seems like api does exist but need a little tweak to have a flag |
I want your help - i recently worked on others repo and i raised some issue and they got merged but today in my forked repo i discard the commits unconditionally and the merge code is there on main but when I checked the PR all commits are deleted and some PR did not get merged yet and there commits also get deleted so I will get points on GSSOC and what if I delete the fork repo and then then rebase it. |
the points are only one the basis of labels assigned to the merged prs so yes, you will get the points for those prs |
What if I delete the fork repo for this project and then rebase code and I got merged one PR so I will get points? |
all merged prs with correct label will give you required points |
Thanks @Kajol-Kumari For Helping |
Can you please label level 3 to those issues you assigned to me 🥺 it would be great for me. |
Hey @TejasNasre i am assigning the levels based on the complexity of the issues only, if the required changes comes to be more than my expectation, i would be happy to revise the levels :) |
Ok Thank 👍🏻 |
Closes: #784
Brief description of what is fixed or changed
We have get all questions in the the backend and also the questions has the upvote and downvote so i integrated in the frontend and added the UI for the question cards.
Types of changes
Checklist
Screenshots
2024-05-15.13-13-58.1.mp4
Other Information
Please clear the test questions from mongodb database.