Skip to content

Architecture: Swipe Classifier

noahmalmed edited this page Apr 5, 2019 · 1 revision

The swipe classifier architecture can be a bit confusing, this document will go through the classes involved.

THIRD PARTY LIBRARY: We use a fork of a third party library for the swipe logic called react-native-deck-swipe.

SwipeCard - This component handles the rendering of the swipeable cards.This mainly just means rendering the SwipeCardSubjectsView and the SubjectOptionsBar.

SwipeCardSubjectsView - This component handles dynamically displaying either multi image or single image subjects.

SubjectOptionsBar - This class handles displaying the action options a user has when viewing a subject. Right now the only option is the see the image in full screen, but theoretically we could add other options here such as favoriting.

SwipeTabs - This view displays the swipe options and the field guide button.

ClassificationPanel - This component displays the tutorial and question tabs at the top of the classification view. As well as handling toggling between those two.

SwipeClassifier - The component/screen that ties everything together. This class displays the swipe component and provides the render method for the cards that display in the Swipe.