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

Redux: Move current search string state to global state #1112

Closed
artpi opened this issue Dec 1, 2015 · 5 comments
Closed

Redux: Move current search string state to global state #1112

artpi opened this issue Dec 1, 2015 · 5 comments

Comments

@artpi
Copy link
Contributor

artpi commented Dec 1, 2015

I'm talking about this:
Search

Search term for posts / pages

Currently it is held in:

  • state of Search component
  • controller of my-sites/posts.
  • Current url ?s=searchterm

This is a problem when switching sites, so I made this workaround:
https://github.com/Automattic/wp-calypso/pull/1091/files#r46399468

But I think it would be best if:

  • search term was in Redux store
  • changing url dispatched a redux action (or the other way around? we need 2-way binding here)
  • components would just read from the store

Currently, all of this feels kinda hack-y

@lancewillett
Copy link
Contributor

@artpi Do you suggest adding a new label for Redux work? Or maybe a new milestone?

@artpi
Copy link
Contributor Author

artpi commented Dec 1, 2015

I got sucked into hangouts, but I promise to describe in detail :) Problem I see right now is that search string is held in URL / component - I will describe when I find a moment

Filled out!

@artpi
Copy link
Contributor Author

artpi commented Dec 4, 2015

Also:
In the whole component tree above, siteID is either boolean or string.
Need to clean up this prop.

@lancewillett
Copy link
Contributor

See also #453

@stale
Copy link

stale bot commented Jan 11, 2018

This issue has been marked as stale because it hasn't been updated in a while. It will be closed in a week. If you would like it to remain open, can you please comment below and see what you can do to get things moving with this issue? Thanks! 🙏

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

No branches or pull requests

2 participants