Freecodecamp: search bar funkiness on learn and search platforms

Created on 13 Oct 2018  路  13Comments  路  Source: freeCodeCamp/freeCodeCamp

Describe the bug
I've noticed several oddities with the search feature:

  • First, there is no typeahead on the main site: learn.freecodecamp.org
  • then, when you type in a search query, you are redirected to a new page with results (many of them are dead links, but that's another issue (#18856). Here, you get your search query in the bar, with an odd trailing quotation mark.
  • Now, when you perform another search (in this same new window), you DO have typeahead. BUT when you press enter (which was mandatory to see results when searching from learn.freecodecamp.org), your result set disappears. i.e. ONLY typeahead works here.
  • Lastly, if you happen to follow one of the dead links you are shown a 404, with a search bar up top. Since you're back at the learn platform, this cycle starts over: typeahead doesn't work, so you have to hit enter to be redirected to the search platform with your results, if you click on another dead one, etc. etc. You end up with several learn, search, and 404 tabs open pretty quickly!

To Reproduce

  1. type in search query on learn platform, notice no typeahead
  2. press enter, redirect to search platform - notice trailing quotation in query
  3. enter new search in same tab (search platform), notice typeahead works
  4. press enter when finished with query, notice query and results disappear
  5. search for min heap and follow dead link, repeat!

Expected behavior
It seems like typeahead should work on the learn platform to avoid opening a series of tabs. Also, pressing return on a query on the search platform should probably just do nothing, instead of clearing your typeahead results.

Screenshots

No typeahead on the learn platform:
image

Redirected to search platform, and typeahead works (also, trailing quotation)
image

After pressing return on the search platform, the query disappears, as well as the results:
image

client UI resolveshipping bug critical path

All 13 comments

I'll try to fix it

Updated: sorry for delay but it's very difficult to fix it since there are problems setting FCC locally

@1337M0nst3r Are U still working on this? If not I'll take it over since I'm looking for another here. Let me know

@chrisdel101 Are you still working on this too? I can take a look at it. Let me know!

@coder077 I'm not. I never heard back after I made that comment so I never started it.

Sorry for late reply, feel free to take over.

@coder077 I can do it but I won't get to it for a week or two so if you want to do it now let me know. That's cool. Otherwise I'll officially take this.

@chrisdel101 Yes, I'll work on this. Thanks!

@raisedadead Is it a good idea to split this into different issues before I start working on this?

Yes, it should however we need to revisit and see what needs to be in the individual issues since a lot has changed lately in the master.

@raisedadead Yes, I revisited all the individual issues and they are still there. So, should I split these into multiple new issues and work on them?

@coder077, yes, please check if these are still issues on the beta site and create new issues when you can.

Issues reported here were fixed by various PRs. The last point, "After pressing return on the search platform, the query disappears, as well as the results," was fixed by https://github.com/freeCodeCamp/freeCodeCamp/pull/36524.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vaibsharma picture vaibsharma  路  3Comments

danielonodje picture danielonodje  路  3Comments

DaphnisM picture DaphnisM  路  3Comments

ar5had picture ar5had  路  3Comments

QuincyLarson picture QuincyLarson  路  3Comments