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

New search layout + New Navigation #20

Merged
merged 9 commits into from
Jul 4, 2019
Merged

New search layout + New Navigation #20

merged 9 commits into from
Jul 4, 2019

Conversation

sergiofruto
Copy link
Contributor

image

image

image

@betzerra betzerra requested a review from sbehrends May 6, 2019 20:55
@betzerra
Copy link
Member

betzerra commented May 6, 2019

From a product's perspective looks great! 👌
I'm leaving this open just in case @sbehrends wants to take a look and give some feedback.

Deploying this too prod 🚀
Great work Checho.

Copy link
Collaborator

@sbehrends sbehrends left a comment

Choose a reason for hiding this comment

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

Great work Checho! 🚀
Leaving some comments to clean up some code and opinions for a future refactor.

Cheers!

asPath,
} = this.props

return (
Copy link
Collaborator

Choose a reason for hiding this comment

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

In the near future we will try to remove all this duplicated code. Looking good for now

menuOpen: false,
}

focusInput = React.createRef();
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 remove this since it's not used?

@@ -17,42 +17,107 @@ export default class Header extends Component {
noNav: false,
}

state = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Im moving some future components to functional components. If you wish... you can move this to using useState() and drop the class. As you wish.


render() {
const { handleSearchSubmit } = this.props;
const categories = [
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could export this array from Nav.js or have categories list somewhere else and import it here. Instead of repeating code.
https://github.com/Canillitapp/headlines-web/blob/master/shared/components/Nav.js#L5

@@ -0,0 +1,69 @@
import React, { Component } 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.

For emoji reactions I am working on a Modal component too. That will sit in the middle of the window as a popup.
Can we rename this to DropdownMenu.js instead?

Maybe you can you react-modal (https://github.com/Canillitapp/headlines-web/blob/emoji-reaction/shared/components/ReactionsModal.js#L2).
It also handles a UX when clicking out of the modal.
Let's sync this afterwards in Slack ;)

<div className="input-wrapper">
<input placeholder="Buscar noticias" type="text" name="searchTerm" />
</div>
{/* <button className="search-submit-btn" type="submit"></button> */}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's remove this commented code

@@ -2,6 +2,8 @@ const routes = require('next-routes')()

routes
.add('download', '/download')
.add('search', '/search/:search')
.add('test', '/test')
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 remove this unused route?

const { handleSearchSubmit, handleSearchOpen } = this.props;
return (
<div className="modal-overlay">
<button className="close-btn" onClick={handleSearchOpen}>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this being rendered? Can't see it working.

@betzerra
Copy link
Member

Make sure we got fixed this before merging #26

@betzerra betzerra merged commit a76089f into master Jul 4, 2019
@betzerra betzerra deleted the search-wip branch July 4, 2019 17:25
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