Repository navigation
Add suggested follow-up skeleton #90363
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
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
6a2b31d
feat: add suggested follow-up skeleton
gijoe0295 7f25f5f
Merge branch 'main' of github.com:gijoe0295/App into App-89686
gijoe0295 c4ecb41
add sentry useSkeletonSpan
gijoe0295 a084d43
update skeleton design and animation
gijoe0295 2b5a6ad
fix lint
gijoe0295 7eefb90
update skeleton style
gijoe0295 9f5b01e
add tests
gijoe0295 28fb65d
update skeleton UI
gijoe0295 763836c
remove minor test
gijoe0295 7267127
Merge branch 'main' of github.com:gijoe0295/App into App-89686
gijoe0295 c249a2d
adjust skeleton speed
gijoe0295 d5cc567
Merge branch 'main' of github.com:gijoe0295/App into App-89686
gijoe0295 50db2ab
fix lint
gijoe0295 9e542a1
increase skeleton threshold
gijoe0295 f3b1320
remove redundant displayName
gijoe0295 5f01d11
fix failed tests
gijoe0295 c4f080c
fix visual glitch
gijoe0295 6ef726a
fix prettier
gijoe0295 e7993ac
pause TTL timer when offline
gijoe0295 15ba3cc
do not show skeleton when offline
gijoe0295 3c787ed
pass computed prop from parent component
gijoe0295 5bdb968
Merge branch 'main' of github.com:gijoe0295/App into App-89686
gijoe0295 50c415e
Merge branch 'main' of github.com:gijoe0295/App into App-89686
gijoe0295 c10ce4a
fix ts
gijoe0295 fd63838
fix thinking indicator flashes
gijoe0295 74fcba9
Hoist report-level subscriptions out of each message row
gijoe0295 810e995
Guard indicator clear by request context
gijoe0295 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,52 @@ | ||
| import React from 'react'; | ||
| import {View} from 'react-native'; | ||
| import Animated, {FadeIn} from 'react-native-reanimated'; | ||
| import SkeletonRect from '@components/SkeletonRect'; | ||
| import SkeletonViewContentLoader from '@components/SkeletonViewContentLoader'; | ||
| import useTheme from '@hooks/useTheme'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import useSkeletonSpan from '@libs/telemetry/useSkeletonSpan'; | ||
|
|
||
| const BAR_HEIGHT = 40; | ||
| const BAR_PADDING = 16; | ||
| const BAR_WIDTH = 180; | ||
| const BAR_COUNT = 3; | ||
|
|
||
| function ActionableItemSkeleton() { | ||
| const styles = useThemeStyles(); | ||
| const theme = useTheme(); | ||
|
|
||
| return ( | ||
| <View style={styles.actionableItemButtonSkeleton}> | ||
| <SkeletonViewContentLoader | ||
| height={BAR_HEIGHT} | ||
| width={BAR_WIDTH + BAR_PADDING * 2} | ||
| backgroundColor={theme.buttonHoveredBG} | ||
| foregroundColor={theme.skeletonLHNOut} | ||
| > | ||
| <SkeletonRect | ||
| transform={[{translateX: BAR_PADDING}, {translateY: BAR_PADDING}]} | ||
| width={BAR_WIDTH} | ||
| height="8" | ||
| /> | ||
| </SkeletonViewContentLoader> | ||
| </View> | ||
| ); | ||
| } | ||
|
|
||
| function FollowupListSkeleton() { | ||
| const styles = useThemeStyles(); | ||
| useSkeletonSpan('FollowupListSkeleton', {context: 'ReportScreen.ChatActionableButtons'}); | ||
|
|
||
| return ( | ||
| <Animated.View entering={FadeIn}> | ||
| <View style={[styles.gap2, styles.mt2, styles.flexColumn, styles.alignItemsStart]}> | ||
| {Array.from({length: BAR_COUNT}, (_, index) => ( | ||
| <ActionableItemSkeleton key={index} /> | ||
| ))} | ||
| </View> | ||
| </Animated.View> | ||
| ); | ||
| } | ||
|
|
||
| export default FollowupListSkeleton; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,13 @@ | ||
| /** Marks a Concierge report action whose followup list is still pending arrival from the server */ | ||
| type ConciergePendingFollowupList = { | ||
| /** The reportActionID of the optimistic Concierge action awaiting its followup list */ | ||
| reportActionID: string; | ||
|
|
||
| /** Timestamp (ms) when the pending flag was created, used for TTL cleanup */ | ||
| createdAt: number; | ||
|
|
||
| /** Whether the skeleton should be visually hidden (e.g., user is offline) */ | ||
| hidden?: boolean; | ||
| }; | ||
|
|
||
| export default ConciergePendingFollowupList; |
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.