-
Notifications
You must be signed in to change notification settings - Fork 1
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
Helpcenter Boilerplate Form #21
base: main
Are you sure you want to change the base?
Conversation
@@ -36,12 +36,40 @@ def dict_factory(cursor, row): | |||
d[col[0]] = row[idx] | |||
return d | |||
|
|||
@app.route("/getComments", methods = ['GET']) |
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.
Now that Ange's PR has been merged with all of these backend routes, you should be able to delete these changes from app.py and just do a rebase on main to get them in their current form! Lemme know if you want support with the rebase, etc :)
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.
Yes please for the rebase help I think maybe my rebasing didn't work properly because it isn't letting me push all of my final commits?
getComments(); | ||
},[]) | ||
|
||
// const deletePost = async (e) => { |
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.
looks like you can maybe delete all this commented out code?
|
||
export default Forum; | ||
|
||
//we will run this function everytime componenet re-renders, inside depency changes we will rerun |
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.
This looks like it was probably just notes for development (rather than in-line documentation) so you can probably delete all of this through the commented out code at the bottom as well?
<h1 > Shortening links can be confusing. What can we help with? </h1> | ||
</div> | ||
|
||
<div className="Buttonss"> |
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.
are the two s
s in Buttons intentional here?
import axios from 'axios'; | ||
import { Link } from 'react-router-dom'; | ||
|
||
|
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.
You can clean up some of these newlines between the imports and where you define SubmitComment - I'd have two at the most!
axios | ||
.post(SERVER_URL + 'comments', {f_name: first_name, l_name: last_name, email: email, subject: subject, comment: comment}) | ||
.then((res) => { | ||
// setResponse(res.data) |
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.
it looks like you're not using the response at all - generally it would be good to add some error handling - to just check that you get a 201 status code in this case, otherwise throw an error to let the user know that their comment didn't get added. Maybe can be skipped for this - what do you think @polarizing ?
https://trello.com/c/cPHwk8cr/15-create-boilerplate-form-to-submit-and-render-comments-on-help-center-page
To test HELP CENTER Boilerplate Form
(This is the basic forum page without the special styling we added)
4. When hovering over the buttons, the background color should change
5. FAQ button should redirect you to the FAQ Button
6. When clicking on Forum page you should see the following page:
7. When clicking on Post New Comment you should see the be redirected to the screen:
8. The input fields should change colors when clicking on them. We had an issue where it wouldn't stay highlighted because the label where wrapping over each other so we had to add an id="" and for"" label for the input and their corresponding label so I hope it is also working on your side!
9. When hovering over the submit and reset buttons it should change font color to orange
10. When submitting the comment you should be redirected to the forum page. New comments will be on the bottom of the page
**If you don't see it immediately you may need to hard refresh the page**