-
Notifications
You must be signed in to change notification settings - Fork 111
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
Courses Smart Search Bar #2932
base: master
Are you sure you want to change the base?
Courses Smart Search Bar #2932
Conversation
|
# Conflicts: # Core/Core/ObserverAlerts/GetObserverAlerts.swift
refs: MBL-17907,MBL-17906,MBL-17905,MBL-17904,MBL-17903,MBL-17902 affects: Student release note: Courses Smart Search Experience for Student test plan: See PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the great work!
I made a first round of review/testing and collected these findings so far:
- I would suggest to use the
filterSolid
instead offilterActiveSolid
, like in Grade or Assignment filtering. But we should align with Marci first. - I think the filter icon should not turn to filtered state when only the "Sort by" is changed.
- Should the course header image disappear when the SmartSearch icon is tapped?
- It's probably not in our hands but searching for random characters (like
Sdhaslfjabhldfbany
) still provides results
- IMHO the filter screen should apply the changes on swipe-to-dismiss, just like when tapping Done (like with Assignment filters)
- According to figma, tapping back from a result should fade out the selected state of the cell (like in standard iOS apps do), not keep the selection (please also see my comment on ContextButton).
Thanks @rh12 , I think we should be discussing most of those points with Marci & Judit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is my final round of code review. There are a lot of small comments, sorry about that. They mostly aim clarity and/or consistency.
Some general notes:
- please add doc-comments to the types, especially in
Search/Model
folder - if you add non-private extensions or helpers, please put them in some common space, unless they are specific (both in naming and in function) to some feature
- please use trailing closure syntax where applicable
- if you add useful common components, it helps discoverability if you call them out in the PR description (doc-comments help those as well)
- it also helps understanding a large and complex PR if some of it's main concepts or reasons are summarized in the PR description
Regarding accessibility, please make sure that
- all new screens (except the Search Bar) are resizing dynamically when text size is changed
- all new screens and the Search Bar are read out properly
I plan to do a QA round after changes are finalized.
Core/Core/Courses/SmartSearch/View/CourseSearchResultRowView.swift
Outdated
Show resolved
Hide resolved
Core/Core/Courses/SmartSearch/View/CourseSearchResultRowView.swift
Outdated
Show resolved
Hide resolved
Core/CoreTests/Courses/SmartSearch/CourseSearchFilterEditorViewModelTests.swift
Outdated
Show resolved
Hide resolved
refs: MBL-18010 affects: Student release note: Course Smart Search "How it works" screen test plan: See PR description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work on getting all this together! I submit some comments while you work on others. My general feeling is that the code became pretty complex with all those protocols and generics compared to the task it does. Without comments and (for an outsider) non-meaningful names makes it hard to understand. I'd be happy if we could look for a way to eliminate some of the complexity and generalization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interactors should go to the model layer.
Core/CoreTests/Courses/SmartSearch/CourseSmartSearchInteractorTests.swift
Outdated
Show resolved
Hide resolved
Core/CoreTests/Courses/SmartSearch/CourseSmartSearchDescriptorTests.swift
Outdated
Show resolved
Hide resolved
|
||
import SwiftUI | ||
|
||
public struct CourseSmartSearch: SearchContextInfo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I've had a hard time time understanding how these entities work together. One thing we could improve here is to add a better name. The CourseSmartSearch
name tells me that this entity encapsulates an actual search operation, maybe holds the search text, results and so on. Turns out it's just mainly a descriptor about how the view should look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file seems to be a mix of view/viewmodel and interactor/business logic related code. I'd definitely move all UI related code to an upper level.
This reverts commit 282ccc6.
|
||
import Combine | ||
|
||
public class FetchedCollection<Request: APIRequestable, Element: Decodable> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is to be determined later. As it might be unnecessary to use paged fetching for search results, while there is no intention to show results with relevance >= 50
.
refs: MBL-17907,MBL-17906,MBL-17905,MBL-17904,MBL-17903,MBL-17902
affects: Student
release note: Courses Smart Search Experience for Student
Related PR(s):
#2967
Test Plan
Video Record
Simulator.Screen.Recording.-.iPhone.14.-.2024-10-21.at.16.23.10.mp4
Checklist