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 function for milestone components #87

Merged
merged 12 commits into from
Sep 25, 2024

Conversation

MaHaWo
Copy link
Collaborator

@MaHaWo MaHaWo commented Sep 24, 2024

  • makes GalleryDisplay accept an additional variable searchData (an array of objects) that defines categories of data to be searched for.
  • add a dropdown button to select the search category. Per default the first is used.
    • TODO remains: need to focus input field automatically when category is selected, but usual bind:this={thing} => thing.focus() didn´t work. Left for another PR that fixes this kind of usability stuff
  • Implement a number of search categories for milestoneoverview and milestonegroup. Which ones we want actually can be decided quickly, since we just need to exchange an element in an array to add or remove them.

@MaHaWo MaHaWo linked an issue Sep 24, 2024 that may be closed by this pull request
@MaHaWo MaHaWo requested a review from lkeegan September 24, 2024 13:17
@codecov-commenter
Copy link

codecov-commenter commented Sep 24, 2024

Codecov Report

Attention: Patch coverage is 0% with 206 lines in your changes missing coverage. Please review.

Project coverage is 18.38%. Comparing base (3503acb) to head (7bedd88).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
frontend/src/routes/milestonegroup/+page.svelte 0.00% 97 Missing ⚠️
frontend/src/routes/milestoneoverview/+page.svelte 0.00% 45 Missing ⚠️
...c/lib/components/DataDisplay/GalleryDisplay.svelte 0.00% 35 Missing ⚠️
frontend/src/lib/components/Childrenpage.svelte 0.00% 24 Missing ⚠️
...ontend/src/lib/components/MilestoneOverview.svelte 0.00% 3 Missing ⚠️
...end/src/lib/components/ChildrenRegistration.svelte 0.00% 1 Missing ⚠️
frontend/src/lib/components/MilestoneGroup.svelte 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   19.49%   18.38%   -1.11%     
==========================================
  Files          73       73              
  Lines        2904     3067     +163     
  Branches      106      106              
==========================================
- Hits          566      564       -2     
- Misses       2285     2450     +165     
  Partials       53       53              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@lkeegan lkeegan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks nice! a few minor questions/comments

also it would be good if the size of the cards didn't change as the number of items varies, not sure if this is an easy fix or needs to be looked at separately?

frontend/src/routes/milestonegroup/+page.svelte Outdated Show resolved Hide resolved
Comment on lines +167 to +174
// button label contains info about completion status => use for search
if (key === 'fertig') {
return item.progress === 1;
} else if (key === 'unfertig') {
return item.progress < 1;
} else {
return item.header.toLowerCase().includes(key.toLowerCase());
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we want to filter for complete/incomplete it might be nicer to have a couple of checkboxes for this under the search box, versus having the user type fertig

Copy link
Collaborator Author

@MaHaWo MaHaWo Sep 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm, yeah.... that would require an additional element in the UI however and it would add significant complexity to it. I'm not sure that's worth it.

MaHaWo and others added 9 commits September 25, 2024 08:49
Copy link

sonarcloud bot commented Sep 25, 2024

@MaHaWo MaHaWo merged commit c12c462 into main Sep 25, 2024
7 checks passed
@MaHaWo MaHaWo deleted the add-search-function-for-milestone-components branch September 25, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

milestonegroup search could include milestones
3 participants