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

Optimize Search Buisness Logic, Frontend #4

Open
Insax opened this issue Jul 14, 2018 · 0 comments
Open

Optimize Search Buisness Logic, Frontend #4

Insax opened this issue Jul 14, 2018 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@Insax
Copy link
Member

Insax commented Jul 14, 2018

Check in

Check in in new branch feature/smartsearch/frontend

Idea:

We optimize the search function to increase useablility which is pretty broke right now.

Implementation:

do the whole logic in jQuerys keyup() function.

we do an ajax requests with the fields: keyword, actualTag, prevTags.

Value Description:

The values are in format :tag1, tag2, tag3: Keyword
Both tags and keyword are not mandatory, but one of each MUST be given.

Whole input content is Keyword if the first character is not ':'
keyword: is the keyword itself (can actually be multiple words, but we don't care).
actualTag: is the tag the user is currently writing
prevTags: tags b4 the actualTags

If the first character of the input value is ':'

Tags are enabled, if not tags are disabled (if user deletes character 1 and places ':', the logic is up and running again!)

if no tags are enabled:

set actualTag and prevTags to null, keyword becomes 'keyword' value
The response will be a json ecoded list auf all tags with that keyword - append it.

if tags are enabled:

set actualTag to the tag which has no closing ':' or ',' - you will get response data for it - autocomplete the tag ("select box" and markdowned text, just like google) - append content if you have a response for it.

all prevTags are stored in an array - send them json encoded with the tag prevTags.

if Tags + keyword are aviable

set actualTag to null and send keyword + tags, as described obove to the route.

@Insax Insax added the enhancement New feature or request label Jul 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants