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

Develop about jsx #50

Merged
merged 3 commits into from
Feb 16, 2018
Merged

Develop about jsx #50

merged 3 commits into from
Feb 16, 2018

Conversation

rgoodie
Copy link
Collaborator

@rgoodie rgoodie commented Feb 9, 2018

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

@codecov
Copy link

codecov bot commented Feb 9, 2018

Codecov Report

Merging #50 into develop will increase coverage by 6.32%.
The diff coverage is 100%.

Impacted file tree graph

@@             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
Impacted Files Coverage Δ
src/app.jsx 100% <ø> (ø) ⬆️
src/components/footer/about-us.jsx 100% <ø> (ø) ⬆️
src/components/faqs.jsx 100% <ø> (ø)
src/components/main.jsx 100% <ø> (ø)
src/components/footer/index.jsx 100% <ø> (ø)
src/components/footer/guidance.jsx 100% <ø> (ø) ⬆️
src/components/about/member.jsx 100% <100%> (ø)
src/components/about/index.jsx 100% <100%> (ø)
src/components/about/our-story.jsx 100% <100%> (ø)
src/components/about/team.jsx 100% <100%> (ø)
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 52639c3...c1d50c4. Read the comment docs.

Copy link
Contributor

@kratsg kratsg left a 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.

</div>
</div>

{/* ends conteiner */}
Copy link
Contributor

Choose a reason for hiding this comment

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

typo

</p>
</section>
<div className="row py-5">
{/* <!--about-our-story--> */}
Copy link
Collaborator

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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done



{/* <!--about-our-name--> */}
<div className="col-md-6">
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

<h3 className="tracked pb-2">Our Name</h3>
<p>
<strong>
You might be wondering, {'"'}What’s the story behind the name?{'"'}
Copy link
Collaborator

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>

</div>
</header>

<div className="container">
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

main.css renamed

@meltedspork
Copy link
Collaborator

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.

@@ -0,0 +1,57 @@
[{
Copy link
Collaborator

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 ?

"full": "Jason Salerno",
"status": "DeafBlind",
"title": "Lead Product / Fullstack Development",
"img": "/images/team-jason.jpg"
Copy link
Collaborator

@meltedspork meltedspork Feb 10, 2018

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

@@ -0,0 +1,57 @@
[{
"full": "Jason Salerno",
Copy link
Collaborator

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

},
{
"full": "Melissa Manak",
"status": "Deaf / Hard - of -Hearing",
Copy link
Collaborator

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?

import React from 'react';


const OurPeople = () => (
Copy link
Collaborator

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 ?

@@ -0,0 +1,17 @@
// import React from 'react';
Copy link
Collaborator

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.

</strong>
</p>
<p>
In fields where new technologies and technical terms are
Copy link
Collaborator

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

@kratsg kratsg force-pushed the develop-about-jsx branch 3 times, most recently from 4d0a939 to 8f8340d Compare February 15, 2018 05:35
@cd2bit cd2bit deleted a comment from meltedspork Feb 15, 2018
@cd2bit cd2bit deleted a comment from meltedspork Feb 15, 2018
@cd2bit cd2bit deleted a comment from rgoodie Feb 15, 2018
@kratsg
Copy link
Contributor

kratsg commented Feb 15, 2018

Last thing of note is about dealing with fonts. I'm not sure they're being imported correctly...

@kratsg
Copy link
Contributor

kratsg commented Feb 15, 2018

Note: testing failed because of require.context which is not easily mockable in jest: facebook/create-react-app#517

Copy link
Collaborator

@meltedspork meltedspork left a comment

Choose a reason for hiding this comment

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

NICE!!!


const pathToMemberImage = require.context('../../images/team');

export default class Member extends Component {
Copy link
Collaborator

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. 👍

@meltedspork
Copy link
Collaborator

we probably can fix this require.context in test with https://github.com/webpack-contrib/mocha-loader instead.

- 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
@kratsg kratsg merged commit 3fbcb17 into develop Feb 16, 2018
@kratsg kratsg deleted the develop-about-jsx branch February 16, 2018 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants