Skip to content
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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

Helpcenter Boilerplate Form #21

wants to merge 15 commits into from

Conversation

MargaretDiaz4570
Copy link
Contributor

@MargaretDiaz4570 MargaretDiaz4570 commented Jan 25, 2022

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)

  1. Make sure to exit out of previous terminals. Go to the sprinterns2022 directory and run:
    • npm install
    • npm run start
    • In the separate terminal run the python3 -m flask run --reload --debugger
  2. Run the website locally
  3. When you click Help Center you should see the following screen:

Screen Shot 2022-01-25 at 8 45 21 PM

4. When hovering over the buttons, the background color should change

Screen Shot 2022-01-25 at 9 05 17 PM

5. FAQ button should redirect you to the FAQ Button

Screen Shot 2022-01-25 at 9 08 11 PM

6. When clicking on Forum page you should see the following page:

Screen Shot 2022-01-25 at 8 58 13 PM

7. When clicking on Post New Comment you should see the be redirected to the screen:

Screen Shot 2022-01-25 at 9 05 47 PM

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!

Screen Shot 2022-01-25 at 9 11 57 PM

9. When hovering over the submit and reset buttons it should change font color to orange

Screen Shot 2022-01-25 at 9 12 23 PM

10. When submitting the comment you should be redirected to the forum page. New comments will be on the bottom of the page

Screen Shot 2022-01-25 at 8 48 52 PM

**If you don't see it immediately you may need to hard refresh the page**

@MargaretDiaz4570 MargaretDiaz4570 changed the title Helpcenter Helpcenter Boilerplate Form Jan 26, 2022
@@ -36,12 +36,40 @@ def dict_factory(cursor, row):
d[col[0]] = row[idx]
return d

@app.route("/getComments", methods = ['GET'])
Copy link
Member

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 :)

Copy link
Contributor Author

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) => {
Copy link
Member

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
Copy link
Member

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">
Copy link
Member

Choose a reason for hiding this comment

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

are the two ss in Buttons intentional here?

import axios from 'axios';
import { Link } from 'react-router-dom';


Copy link
Member

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)
Copy link
Member

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 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants