-
Notifications
You must be signed in to change notification settings - Fork 0
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
Develop about jsx #50
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #50 +/- ##
===========================================
+ Coverage 89.89% 96.22% +6.32%
===========================================
Files 21 23 +2
Lines 99 106 +7
Branches 10 7 -3
===========================================
+ Hits 89 102 +13
+ Misses 7 4 -3
+ Partials 3 0 -3
Continue to review full report at Codecov.
|
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.
about.jsx
should be loading from a team.json
file that contains all of these things, and just loops over. There's a lot of copy/pasting that could be reduced.
styles-main.css
is somewhat redundant, and should just be called main.css
.
@nickttng will need to double-check the fonts, as I'm not the expert and can't comment on that.
src/layouts/about.jsx
Outdated
</div> | ||
</div> | ||
|
||
{/* ends conteiner */} |
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.
typo
src/layouts/about.jsx
Outdated
</p> | ||
</section> | ||
<div className="row py-5"> | ||
{/* <!--about-our-story--> */} |
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.
about-our-story
can be broken in their own component (jsx)
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.
done
src/layouts/about.jsx
Outdated
|
||
|
||
{/* <!--about-our-name--> */} | ||
<div className="col-md-6"> |
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.
about-our-name
also can be in their own JSX
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.
done
src/layouts/about.jsx
Outdated
<h3 className="tracked pb-2">Our Name</h3> | ||
<p> | ||
<strong> | ||
You might be wondering, {'"'}What’s the story behind the name?{'"'} |
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.
its bit confusing reading this from code wise - can we simplify this something like
<strong>
{`You might be wondering, "What’s the story behind the name?"`}
</strong>
or
<strong>
You might be wondering, {`"What’s the story behind the name?"`}
</strong>
src/layouts/about.jsx
Outdated
</div> | ||
</header> | ||
|
||
<div className="container"> |
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 should be its own JSX and also it can be one components and we can use .map
with it and are it reusable.
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.
Separated out. Team is pulled from data.js file imported into a comp.
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.
main.css renamed
I would like to see if we could import images and fonts with building rather than loading up as static - Webpack provides this. But that is best off as new issue. |
public/data/people.json
Outdated
@@ -0,0 +1,57 @@ | |||
[{ |
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.
can we rename to team.json
?
public/data/people.json
Outdated
"full": "Jason Salerno", | ||
"status": "DeafBlind", | ||
"title": "Lead Product / Fullstack Development", | ||
"img": "/images/team-jason.jpg" |
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.
dont think we need this img
property - we can reuse by using id
or first_name
+ last_name
.png
public/data/people.json
Outdated
@@ -0,0 +1,57 @@ | |||
[{ | |||
"full": "Jason Salerno", |
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.
can we do first_name
and last_name
? and add id
public/data/people.json
Outdated
}, | ||
{ | ||
"full": "Melissa Manak", | ||
"status": "Deaf / Hard - of -Hearing", |
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.
Can we change this from status
to identify_id
and another to remapped to identity.json
with identify id?
src/layouts/about/our-people.jsx
Outdated
import React from 'react'; | ||
|
||
|
||
const OurPeople = () => ( |
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.
can we rename this to Team
?
src/layouts/about/our-team.jsx
Outdated
@@ -0,0 +1,17 @@ | |||
// import React from 'react'; |
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.
@rgoodie - take a look at gist i made - i have made adjust of how we can handle Team and Members components - https://gist.github.com/meltedspork/05350e1ec8cfda1b7ad16914ec63d103
As it follows React's Proptype - see: https://reactjs.org/docs/typechecking-with-proptypes.html
and also how we set state in constructor - see: https://reactjs.org/docs/state-and-lifecycle.html
Also for data, if we are doing static data -generally we should be using it as json format in flat file, not JS file to manage data and we can easily import json file and that would be bundled with transpiles.
src/layouts/about.jsx
Outdated
</strong> | ||
</p> | ||
<p> | ||
In fields where new technologies and technical terms are |
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.
same here with broken lines
4d0a939
to
8f8340d
Compare
Last thing of note is about dealing with fonts. I'm not sure they're being imported correctly... |
Note: testing failed because of |
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.
NICE!!!
src/layouts/about/member.jsx
Outdated
|
||
const pathToMemberImage = require.context('../../images/team'); | ||
|
||
export default class Member extends Component { |
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 can actually make this stateless function similar to submit-a-sign.jsx. but i am fine with either way. 👍
we probably can fix this |
- css added in - data/team.json along with images/team/*.png for people images using require.context for dynamic loading - evcohen/eslint-plugin-jsx-a11y#339 used for letting eslint know that react-router Link is a11y-compliant - images are converted to pngs, and resized down to 300pixels to save space where possible - added tests for team.json and mocked require.context
21f1549
to
44e5b13
Compare
now using chai's expect
Asking for a review. I moved the container class around in a few spots to allow for the full hero image. This changes the header to full screen, though content is still inside the container and constrained to decent dimensions. Please mostly see work in
localhost:3000/about
for changes.After merging this back into
develop
I plan branching off it to build submit-a-sign that @nickttng has built in-prototype