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

Global Search Page #13

Merged
merged 5 commits into from
Feb 29, 2024
Merged

Global Search Page #13

merged 5 commits into from
Feb 29, 2024

Conversation

meganleongg
Copy link
Contributor

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

Screenshot 2024-02-07 at 10 06 57 PM Screenshot 2024-02-07 at 10 05 49 PM

@Anthonyp0329 Anthonyp0329 requested review from a team, PiXlRAM and pratyush1718 and removed request for a team February 8, 2024 23:07
Copy link
Member

@PiXlRAM PiXlRAM left a 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.

Copy link
Collaborator

@Anthonyp0329 Anthonyp0329 left a comment

Choose a reason for hiding this comment

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

Looks great! Just some minor things to address that I left comments on, and also the spacing looks a bit funky on Android. Thank you!

image

@@ -0,0 +1,66 @@
import { useState } from "react";
import { FlatList, Text, TextInput, View } from "react-native";
import Icon from "react-native-vector-icons/FontAwesome";
Copy link
Collaborator

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) => {
Copy link
Collaborator

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
@meganleongg meganleongg merged commit 301ac2e into main Feb 29, 2024
2 checks passed
@meganleongg meganleongg deleted the global-search branch February 29, 2024 09:37
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.

Global Search Page
4 participants