-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Dealer search and feedback stuff
* Platform share icon, iOS usual style not matching up with Android/MCI, added to all share locations, added definition in icon. * Header buttons debounced. * Viewer initial zoom fixed, depadded to match floater spec. * useDebounce hook added. * Tab label added to control how tab navigator stuff is displayed. * Fuse integration increase limit. * Dealer and event router new tab label used. * Fixed search issue where an old property name was used.
- Loading branch information
1 parent
cec9e45
commit 6407112
Showing
15 changed files
with
94 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
import MaterialCommunityIcon from "@expo/vector-icons/MaterialCommunityIcons"; | ||
import { Platform } from "react-native"; | ||
|
||
export type IconNames = keyof typeof MaterialCommunityIcon.glyphMap; | ||
|
||
export const Icon = MaterialCommunityIcon; | ||
|
||
export const platformShareIcon: IconNames = Platform.OS === "ios" ? "export-variant" : "share"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { StyleSheet } from "react-native"; | ||
import { Label } from "./Label"; | ||
|
||
export const tabLabelMaxWidth = 110; | ||
|
||
export type TabLabelProps = { | ||
focused: boolean; | ||
children: string; | ||
wide: boolean; | ||
}; | ||
|
||
export const TabLabel = ({ focused, children, wide }: TabLabelProps) => { | ||
return ( | ||
<Label type="bold" style={[focused ? styles.focused : styles.unfocused, wide && styles.wide]} numberOfLines={1} ellipsizeMode="tail"> | ||
{children} | ||
</Label> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
wide: { | ||
maxWidth: tabLabelMaxWidth, | ||
paddingHorizontal: 5, | ||
}, | ||
unfocused: { | ||
maxWidth: tabLabelMaxWidth, | ||
opacity: 0.5, | ||
}, | ||
focused: { | ||
maxWidth: tabLabelMaxWidth, | ||
opacity: 1, | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { DependencyList, useMemo } from "react"; | ||
import { debounce } from "lodash"; | ||
|
||
export const useDebounce = (callback: () => void, deps: DependencyList): (() => void) => { | ||
return useMemo(() => debounce(callback, 1000, { leading: true, trailing: false }), deps); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters