Skip to content

Christopher.Perkins.Austin1#8

Open
chrisperk wants to merge 24 commits intoAustinCodingAcademy:masterfrom
chrisperk:master
Open

Christopher.Perkins.Austin1#8
chrisperk wants to merge 24 commits intoAustinCodingAcademy:masterfrom
chrisperk:master

Conversation

@chrisperk
Copy link

No description provided.

Copy link

@alexjgaw alexjgaw left a comment

Choose a reason for hiding this comment

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

Nice work on the highlighting!

@chrisperk
Copy link
Author

last commit msg should read 'implemented axios POST and DELETE request...'

Copy link
Contributor

@ivome ivome left a comment

Choose a reason for hiding this comment

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

Great job, really clean code, easy to understand and nice structure (reusable functions etc.)! Keep up the good work!

<img src={props.avatar} alt="avatar" />
</div>
<div className="contact-info">
<ContactName
Copy link

Choose a reason for hiding this comment

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

Everything looks really good, but when I ran your project I noticed I could only select by clicking on the contact name. From a UX standpoint I think it could be better. First, whichever element you choose to attach the event listener to, I think you should use cursor: pointer to make it obvious to the user that they can click. Second, I recommend using the entire <li> element for the event listener. Then it's just a matter of adding `event.stopPropagation()' to any methods that are going to be passed to click listeners attached to children (like the remove button).

Copy link
Author

@chrisperk chrisperk Feb 8, 2017

Choose a reason for hiding this comment

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

Great ideas, thank you! Yeah I had tried to set them as <a> elements but didn't understand how to pass the event objects through the chain to preventDefault(). I think I more-or-less understand how to pass the event object now, so I am going to make that change to an <li> with a pointer on hover. I also hadn't thought about stopPropagation(), great ideas! I didn't really know what stopPropagation() did besides being similar to preventDefault(), this article helped me understand it, then I remembered you saying it prevents the event bubbling which is pretty much exactly what it does. Good stuff, thanks for taking the time to test it out and give such great feedback!

Copy link

@alexjgaw alexjgaw left a comment

Choose a reason for hiding this comment

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

Everything looks really good, you just need to finish the extensions when you can. Whatdyou have a new job or something?

Copy link
Contributor

@ivome ivome left a comment

Choose a reason for hiding this comment

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

Great job!!

if (props.name.toLowerCase().indexOf(stringToHighlight) >= 0) {
const highlightedContactBeginning = contactName.slice(0, searchTermStartIndex);
const highlightedContactEnd = contactName.slice(searchTermEndIndex);
const highlightedContactMiddle = contactName.slice(searchTermStartIndex, searchTermEndIndex);
Copy link
Contributor

Choose a reason for hiding this comment

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

What about multiple matches? Example: Sp in "Spike Spiegel" 😄

background-color: #B9F6CA;
border-color: #fff;
padding: 2% 2%;
}
Copy link
Contributor

Choose a reason for hiding this comment

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

CSS should ideally be placed in the corresponding css file of the react component.

Copy link

@alexjgaw alexjgaw left a comment

Choose a reason for hiding this comment

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

We're on our way!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants