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

Add search for tags #416

Merged
merged 19 commits into from
Jan 7, 2020
Merged

Add search for tags #416

merged 19 commits into from
Jan 7, 2020

Conversation

Stezido
Copy link
Contributor

@Stezido Stezido commented Dec 9, 2019

Description

The search feature only searches for the project name. It should be possible to search for tags too.
Follow up to #348

Implementation

The search feature should be extended, so that the user can search for every information a project holds. Additionally there should be a way to specifically search for special properties.
These properties shall be searched by putting prefixes in front of a searchTerm:

  1. tag:myTag
  2. name:myName
  3. status:open

TODO

  • Implement prefixes
  • Implement search for every project information
  • Projects should be filtered by the tag when the user is clicking on a tag
  • Searching for any information possible blocks the UI thread if typing in a searchTerm. Use a web worker to avoid this. Research on web workers does react have another way to avoid blocking the thread?
  • documentation
  • e2e-tests
  • Add debounce when typing to avoid rerendering of the overview after each change
  • Highlight text on project cards when searching
  • Add search via URL query
  • When searching via URL, avoid fetching projects while webworker calculates

Closes #353
Closes #355
Closes #356
Closes #359
Closes #367

@Stezido Stezido self-assigned this Dec 9, 2019
@openkfwCI
Copy link

openkfwCI commented Dec 9, 2019

NotesTime
Note for Reviewer: E2E tests on remote server succeededTue, 07 Jan 2020 13:56:38 +0000

Generated by E2E-Test

Following prefixes are supported:
-tag
-name
-status
Without a prefix the properties tag, displayName and status are searched for hits
Tag buttons support search on click
Filter projects is executed by a web worker besides the UI-thread

TODO:
see added TODO in code
remove filterProjects code or outsource the workers code
Modify/Move search feature related tests
Rename project_tags file into project_tags_spec
Add project update command to cypress
Add react-highlighter module
Webworker additionally stores highlighing regex and search terms as array after calculating is finished
Rename projects created via login test
Change assertion to should project no be visible to wait for debounce of search feature
Remove unnecessary should be visible calls in login e2e-test
Update url (window.history.state) when searchTerm is changed
Add convert methods (URL-searchTerm <-> barSearchTerm)
Otherwise the test fails in CI
Converting to URL query ignores multiple spaces
Replace history state instead of push (disables funtionality of back button)
Fix update the project list
CHANGELOG.md Show resolved Hide resolved
doc/wiki/User-Guide/Projects/Project.md Outdated Show resolved Hide resolved
frontend/src/pages/Common/filterProjects.js Outdated Show resolved Hide resolved
frontend/src/filterProjects.worker.js Outdated Show resolved Hide resolved
frontend/src/pages/Overview/OverviewTable.js Outdated Show resolved Hide resolved
frontend/src/pages/Overview/OverviewTable.js Outdated Show resolved Hide resolved
frontend/src/pages/Overview/ProjectCard.js Outdated Show resolved Hide resolved
frontend/src/pages/Overview/reducer.js Outdated Show resolved Hide resolved
1. Adjust Changelog
2. Delete unused filterProjects module
3. Move worker to common dir
4. Use color palette
@Stezido Stezido merged commit 56c1a26 into master Jan 7, 2020
daniel-arnauer pushed a commit that referenced this pull request Feb 4, 2020
* Search for tags by adding prefixes is supported for "tag", "name" and "status"
* Without a prefix the properties tag, displayName and status are searched for matches
* Tag buttons support search on click
* Filter projects is executed by a web worker to avoid blocking the UI-thread
* Add debounce to searchinput to avoid re-rendering after every search input
* Highlight displayname, status and tags on search match
* Implement search via URL queries
* E2e-tests are created
* Adjust project search documentation
* Update CHANGELOG.md
@mathiashoeld mathiashoeld deleted the add-search-for-tags branch March 10, 2020 13:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants