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

Bugfix/issue7 #11

Merged
merged 7 commits into from
Jul 16, 2019
Merged

Conversation

anton-karlovskiy
Copy link
Contributor

  1. added some info panel to highlight user's network connection and number of search results returned from API on each network connection
  2. I think we could add connection aware component in the scope of thumbnail since this "ifixit" has a range of resolutions.
    Following is thumbnails in different resolution:
    https://d3nevzfk7ii3be.cloudfront.net/igi/sX5iMoIvYMbCvHoF.thumbnail
    https://d3nevzfk7ii3be.cloudfront.net/igi/sX5iMoIvYMbCvHoF.huge

Copy link
Collaborator

@addyosmani addyosmani left a comment

Choose a reason for hiding this comment

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

import './App.css';
import IFixitSearch from './containers/IFixitSearch';
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 to iFixitSearch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm afraid it looks like it's sort of rules in React component naming.
https://www.dropbox.com/s/7kc6g9x0lm9wf49/2.PNG?dl=0
Let me try to find warning ignore comment for this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah. Not a huge deal then :)

</a>
</header>
<div className='App-content'>
<IFixitSearch />
Copy link
Collaborator

Choose a reason for hiding this comment

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

Similar comment to earlier (iFixitSearch)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same reason as above.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Gotcha. Similar to above, I'd say we can skip this change then.

@anton-karlovskiy
Copy link
Contributor Author

Yes, I did so.


import './search-bar.css';

const SearchBar = ({ search }) => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we currently throttle how often we query the API? We probably want to avoid doing this onChange for every keystroke, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Now, we just call API once clicking on search icon, not calling API in every onChange event.
In every onChange event, we just update the input value.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, let me check and update the codes.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah, okay - so testing out https://anton-karlovskiy-network-aware-data-fetching-for-glitch.glitch.me/ I see that you need to tap on the magnifying glass in order to search (vs it searching on key-press). Rather than change this, maybe we can add the ability to search if you hit the ENTER key too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added Enter key feature. You can check it on glitch version as I updated it as well.

.then(response => response.json())
.then(response => {
setLoading(false);
console.log('ray : response => ', response);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could we drop the ray logs?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah yes.

@anton-karlovskiy
Copy link
Contributor Author

anton-karlovskiy commented Jul 15, 2019

Milica advised me to include glitch in PR.

Copy link
Collaborator

@addyosmani addyosmani left a comment

Choose a reason for hiding this comment

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

LGTM

@addyosmani addyosmani merged commit 7085c7d into GoogleChromeLabs:master Jul 16, 2019
@anton-karlovskiy anton-karlovskiy deleted the bugfix/issue7 branch July 17, 2019 20:29
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.

None yet

2 participants