Skip to content
This repository was archived by the owner on Dec 4, 2017. It is now read-only.

docs(toh-6): search query fixes #2008

Closed

Conversation

chalin
Copy link
Contributor

@chalin chalin commented Jul 31, 2016

Changes:

  • Drop asObservable() since it is deprecated in RxJS 5 (see the migration guide).
  • Drop + from hero search query URL: app/heroes/?name=${term}+. At best it is interpreted as a regex op that serves no purpose, at worst, it gets interpreted as a space (cf. HTML 4.01 section 17.13.4).
  • Replace the generic term "term" by "pattern" since the serach string is actually a search pattern (regex).
  • Rename searchSubject to searchPatterns (or maybe it should be searchPattern$) since subjects are just observables that can have data injected into them.
  • Other minor tweak to prose.

This work is in preparation for #1924.

Note: toh-6 tests pass.

@chalin chalin force-pushed the chalin-toh-6-search-query-fixes-0731 branch from 0869b89 to 6fe2e4e Compare July 31, 2016 19:08
@Foxandxss
Copy link
Member

Honestly, I prefer the "term" term.

@wardbell
Copy link
Contributor

wardbell commented Aug 1, 2016

I like these changes ... except the word "pattern". Although you are technically correct that it is a pattern, semantically it's about search terms. I can roll with this if Patrice doesn't mind sticking with that.

I'm happy to fix as i merge or he can update. I'm standing by.

@chalin
Copy link
Contributor Author

chalin commented Aug 1, 2016

I don't mind sticking with "term". I'll update searchSubject to searchTerms as agreed offline.

Changes:
- Drop `asObservable()` since it is deprecated in RxJS 5 (see the
[migration
guide](https://github.com/ReactiveX/RxJS/blob/master/MIGRATION.md#operat
ors-renamed-or-removed)).
- Drop `+` from hero search query URL: `app/heroes/?name=${term}+`. At
best it is interpreted as a regex op that serves no purpose, at worst,
it gets interpreted as a space (cf. [HTML 4.01 section
17.13.4](https://www.w3.org/TR/REC-html40/interact/forms.html#h-17.13.4)
).
- Replace the generic term "term" by "pattern" since the serach string
is actually a search pattern (regex).
- Rename `searchSubject` to `searchPatterns` (or maybe it should be
`searchPattern$`) since subjects are just observables that can have
data injected into them.
- Other minor tweak to prose.

This work is in preparation for angular#1924.

Note: toh-6 tests pass.
@chalin chalin force-pushed the chalin-toh-6-search-query-fixes-0731 branch from 6fe2e4e to fd0882d Compare August 1, 2016 18:22
@wardbell wardbell closed this in 04d5337 Aug 1, 2016
@wardbell wardbell deleted the chalin-toh-6-search-query-fixes-0731 branch August 1, 2016 18:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants