PoliticalComputerScience / PCS-Website

2 stars 3 forks source link

Created best practices doc draft with certain TODO sections d/t lack of critical knowledge #7

Closed na933950 closed 2 months ago

na933950 commented 3 months ago

Issue Number

5 and #3

Does not close either issue.

Type of Change

This change adds documentation for best practices when writing React code. This also includes organization/project structure.

Details

Added sections on how to write accurate and modern code, then focused on organization for files to go in the correct place, and then wrote a section on best practices while creating React components in particular, which include expectations related to abstraction, documentation, and commenting.

Screenshots

N/A

How Has This Been Tested?

There is not much testing to do, but all links have been verified as working in the Table Of Contents.

Checklist

N/A

Remaining Work

@VivianWilde I don't have as much knowledge with the testing framework (especially I was running into that issue with setting up absolute imports which would be really nice) with jest and also with styling via Material UI. I've always had trouble with best practices for styling so probably better I don't write that section.

Create Styling Best Practices: #8 Create Testing Best Practices: #9

VivianWilde commented 2 months ago

Hi! Sorry for dropping the ball on this so horribly.

We use an auto-formatter to handle styling. So simply run npm run format within the repo before committing, and it will ensure the code is formatted according to our requirements.

For the MUI style guidelines, I've added a draft of them as a new section to the document.

na933950 commented 2 months ago

Sure makes sense, I can reorder.

Ok will add more context around interfaces.

Will add on to your styling guidelines!