-
Notifications
You must be signed in to change notification settings - Fork 3.9k
feat: update workspace empty state #67345
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
11 commits
Select commit
Hold shift + click to select a range
9dda473
feat: update workspace empty state
daledah bbd5b13
fix: animation styles
daledah 822e586
Merge branch 'main' into fix/66827
daledah 417cdaa
fix: translations
daledah a4ca12c
Merge branch 'main' into fix/66827
daledah 4473e79
refactor some suggestions
daledah 67e323e
Merge branch 'main' into fix/66827
daledah 6846233
fix: styles
daledah 3391c32
Merge branch 'main' into fix/66827
daledah f1625f2
Merge branch 'main' into fix/66827
daledah 4780482
fix: resize and correct spacing in empty state illustration
daledah 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| import React from 'react'; | ||
| import {Rect} from 'react-native-svg'; | ||
| import useResponsiveLayout from '@hooks/useResponsiveLayout'; | ||
| import useThemeStyles from '@hooks/useThemeStyles'; | ||
| import useWindowDimensions from '@hooks/useWindowDimensions'; | ||
| import variables from '@styles/variables'; | ||
| import ItemListSkeletonView from './ItemListSkeletonView'; | ||
|
|
||
| const barHeight = 7; | ||
| const longBarWidth = 120; | ||
| const shortBarWidth = 60; | ||
| const leftPaneWidth = variables.navigationTabBarSize; | ||
| const gapWidth = 12; | ||
|
|
||
| type WorkspaceRowSkeletonProps = { | ||
| shouldAnimate?: boolean; | ||
| fixedNumItems?: number; | ||
| gradientOpacityEnabled?: boolean; | ||
| }; | ||
|
|
||
| function WorkspaceRowSkeleton({shouldAnimate = true, fixedNumItems, gradientOpacityEnabled = false}: WorkspaceRowSkeletonProps) { | ||
| const styles = useThemeStyles(); | ||
| const {windowWidth} = useWindowDimensions(); | ||
| const {shouldUseNarrowLayout} = useResponsiveLayout(); | ||
| // We calculate the width of the sections on the skeleton by first calculating the skeleton view width | ||
| // Then we subtract the width by 66, which is the x position of the first part. | ||
| const partWidth = Math.floor((windowWidth - leftPaneWidth - gapWidth * 2 - 66) / 3); | ||
| return ( | ||
| <ItemListSkeletonView | ||
| shouldAnimate={shouldAnimate} | ||
| fixedNumItems={fixedNumItems} | ||
| gradientOpacityEnabled={gradientOpacityEnabled} | ||
| itemViewStyle={[styles.highlightBG, styles.mb2, styles.br3, styles.ml5]} | ||
| renderSkeletonItem={() => ( | ||
| <> | ||
| <Rect | ||
| x={12} | ||
| y={12} | ||
| rx={5} | ||
| ry={5} | ||
| width={36} | ||
| height={40} | ||
| /> | ||
| <Rect | ||
| x={66} | ||
| y={22} | ||
| width={longBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| <Rect | ||
| x={66} | ||
| y={36} | ||
| width={shortBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| {!shouldUseNarrowLayout && ( | ||
| <> | ||
| <Rect | ||
| x={66 + partWidth} | ||
| y={22} | ||
| width={longBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| <Rect | ||
| x={66 + partWidth} | ||
| y={36} | ||
| width={shortBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| <Rect | ||
| x={66 + partWidth * 2} | ||
| y={22} | ||
| width={longBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| <Rect | ||
| x={66 + partWidth * 2} | ||
| y={36} | ||
| width={shortBarWidth} | ||
| height={barHeight} | ||
| /> | ||
| </> | ||
| )} | ||
| </> | ||
| )} | ||
| /> | ||
| ); | ||
| } | ||
| WorkspaceRowSkeleton.displayName = 'WorkspaceRowSkeleton'; | ||
| export default WorkspaceRowSkeleton; | ||
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
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
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.