Skip to content

Assignment by saurabh targe#11

Open
targesaurabh wants to merge 3 commits intojavascripters-community:masterfrom
targesaurabh:assignment_by_saurabh_targe
Open

Assignment by saurabh targe#11
targesaurabh wants to merge 3 commits intojavascripters-community:masterfrom
targesaurabh:assignment_by_saurabh_targe

Conversation

@targesaurabh
Copy link
Copy Markdown

Please review the branch assignment_by_saurabh_targe.

Copy link
Copy Markdown
Contributor

@javascripters2015 javascripters2015 left a comment

Choose a reason for hiding this comment

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

Please update the code according to the code review instructions.

Comment thread README.md

`Email : pune.javascripters@gmail.com`
# online-bidding-react-app
Online bidding app for paintings built using ReactJS, Webpack dev server and ES2015.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This files required details how to use app and setup instruction, so any new member using this project should understand the intent of this code implementation according to the best code practices.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Okay. I will update the README file with the setup instructions.

Comment thread client/components/App.jsx
./client/components/App.jsx
*/
import React from 'react';

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Comment required here to understand the intent of the code implementation, it holds true for all next implementation too.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, I will add the appropriate comments in the code.

Comment thread client/components/Box.jsx
<div className="col-md-3 col-sm-6">
<div className="product-item">
<div className="product-thumb">
<img src={this.props.data.image} alt="" style={imageStyle}/>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Alt attribute of <img /> empty. Good for Accessibility.


return (
<div>
<span>Rs. {this.props.highestBid}</span>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

You can eliminate <div> wrapping and just return <span> element. [Semantic HTML]

@@ -0,0 +1,134 @@
/*
./client/components/Timer.jsx
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If possible you can separate out Timer and Clock components into separate files.

Comment thread index.html

<link href="http://fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800" rel="stylesheet">

<link rel="stylesheet" href="client/css/bootstrap.css">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's better to import CSS files in js, so that you can perform various transformations using web pack at a later point, or use a cdn for better performance.

Comment thread client/components/App.jsx
*/
import React from 'react';

export default class App extends React.Component {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can import component along with React and change class defination. eg:

import React, { Component } from 'react';
export default class App extends Component{}

Comment thread client/components/App.jsx
export default class App extends React.Component {
render() {
return (
<div style={{textAlign: 'center'}}>
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

If using bootstrap, then can use bootstrap class to make text centered align.


calculateRemainingTime(){

let timeRemaining = this.state.bidEndTime - new Date().getTime();
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

unnecessary spaces can be removed


render() {

const bidNowButtonStyle = {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

please declare css classes in an external stylesheet.

Comment thread index.html

</head>
<body>
<header class="site-header">
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Header & Menu part can be created in a component and use it in main js file, instead of creating in index.html, it will help to keep index.html clean and short.

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.

4 participants