-
Notifications
You must be signed in to change notification settings - Fork 0
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
Global Search Page #13
Conversation
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.
LGTM, missing the x and close buttons on figma for the search bar when something is entered, but can be added later on.
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.
@@ -0,0 +1,66 @@ | |||
import { useState } from "react"; | |||
import { FlatList, Text, TextInput, View } from "react-native"; | |||
import Icon from "react-native-vector-icons/FontAwesome"; |
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 import gave me an error, but looks like the native vector icons package should be added in the general principles pr, so should be ok
const [query, setQuery] = useState(""); | ||
const [filteredDocuments, setFilteredDocuments] = useState<Document[]>([]); | ||
|
||
const handleSearch = (text: string) => { |
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.
For the future, maybe extract the handleSearch functionality to a separate file, as this will gain complexity when having to search through device storage
…that partially match and tier the documents highest to lowest from most to least similar to the search query. highlight in blue parts of titles that match search query
… titles correctly
Tracking Info
Resolves #12
Changes
Created Global Search page, added frontend for search bar and search results (with functioning filtering), hardcoded array of documents to filter from.
Testing
Checked the page on iOS device and Android virtual device, both of which were different screen sizes too, worked fine in all cases. Tested filtering for the search bar on different words/chars.
Confirmation of Change