-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Implement animated WorkspacesListPage and LoungeAccessPage #23061
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
36 commits
Select commit
Hold shift + click to select a range
c605739
Use useLocalize hook
roryabraham 6c43c44
Rename useOnNetworkReconnect to useNetwork
roryabraham a11e107
Make useNetwork return isOffline
roryabraham e05cca7
Rename onNetworkReconnect to onReconnect
roryabraham e6dcfdb
Use useNetwork hook
roryabraham 54159bb
Use usePermissions hook
roryabraham 03082e4
Add WorkspacePlanet asset
roryabraham 490df01
Configure animated StatusBar background color for WorkspacesPage
roryabraham 38bc35f
Remove unnecessary prop from PreferencesPage
roryabraham f6bb764
Remove unused prop from WorkspacesListPage
roryabraham 06fa463
Add optional footer to IllustratedHeaderPageLayout
roryabraham 228c69f
Implement IllustratedHeaderPageLayout for WorkspacesListPage
roryabraham 8768fc1
Fix lint
roryabraham 561783b
Remove extraneous ScrollView
roryabraham a99fd97
Create FeatureList component
roryabraham 8ba6c9a
Use useWindowDimensions in MenuItem
roryabraham 57f1dbf
Use hooks instead of HOCs in LoungeAccessPage
roryabraham 49c4b92
Use FeatureList in LoungeAccessPage
roryabraham 039dca4
Add ExpensifyLounge animation
roryabraham c950672
Implement IllustratedHeaderPageLayout for LoungeAccessPage
roryabraham a998031
Use default icon colors if the background is the standard appBG
roryabraham 2740338
Add headline and description to FeatureList component
roryabraham d7b6462
Give IllustratedHeaderPageLayout a default backgroundColor
roryabraham a2734bc
Implement FeatureList in WorkspacesListPage
roryabraham f5cf3dd
fix scaling and padding issues
roryabraham cb6eab5
Merge branch 'main' into Rory-WorkspacePage
roryabraham 2488546
Remove unneeded illustrationStyle props + width workaround
roryabraham 60a7de7
Merge branch 'main' into Rory-WorkspacePage
roryabraham 1bdf744
Fix propTypes of FeatureList
roryabraham 7ef33e8
Merge branch 'main' into Rory-WorkspacePage
roryabraham 90cc036
Make useNetwork take object w/ onReconnect for clarity
roryabraham 36a1171
Remove unnecessary fragment
roryabraham e094b45
Fix default argument in useNetwork
roryabraham c476fae
Merge branch 'main' into Rory-WorkspacePage
roryabraham f833175
Use textColorfulBackground instead of iconColorfulBackground for title
roryabraham b9581dc
Fix OfflineIndicator style
roryabraham 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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,53 @@ | ||
import _ from 'underscore'; | ||
import React from 'react'; | ||
import {View} from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import menuItemPropTypes from './menuItemPropTypes'; | ||
import MenuItem from './MenuItem'; | ||
import styles from '../styles/styles'; | ||
import useLocalize from '../hooks/useLocalize'; | ||
import Text from './Text'; | ||
|
||
const propTypes = { | ||
/** A list of menuItems representing the feature list. */ | ||
menuItems: PropTypes.arrayOf(PropTypes.shape({...menuItemPropTypes, translationKey: PropTypes.string})).isRequired, | ||
|
||
/** A headline translation key to show above the feature list. */ | ||
headline: PropTypes.string.isRequired, | ||
|
||
/** A description translation key to show below the headline and above the feature list. */ | ||
description: PropTypes.string.isRequired, | ||
}; | ||
|
||
function FeatureList({menuItems, headline, description}) { | ||
const {translate} = useLocalize(); | ||
return ( | ||
<> | ||
<View style={[styles.w100, styles.ph5, styles.pb5]}> | ||
<Text | ||
style={[styles.textHeadline, styles.preWrap, styles.mb2]} | ||
numberOfLines={2} | ||
> | ||
{translate(headline)} | ||
</Text> | ||
<Text style={styles.baseFontStyle}>{translate(description)}</Text> | ||
</View> | ||
{_.map(menuItems, ({translationKey, icon}) => ( | ||
<MenuItem | ||
key={translationKey} | ||
title={translate(translationKey)} | ||
icon={icon} | ||
iconWidth={60} | ||
iconHeight={60} | ||
iconStyles={[styles.mr3, styles.ml3]} | ||
interactive={false} | ||
/> | ||
))} | ||
</> | ||
); | ||
} | ||
|
||
FeatureList.propTypes = propTypes; | ||
FeatureList.displayName = 'FeatureList'; | ||
|
||
export default FeatureList; |
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 |
---|---|---|
@@ -1,6 +1,8 @@ | ||
import ExpensifyLounge from '../../assets/animations/ExpensifyLounge.json'; | ||
import Fireworks from '../../assets/animations/Fireworks.json'; | ||
import Hands from '../../assets/animations/Hands.json'; | ||
import PreferencesDJ from '../../assets/animations/PreferencesDJ.json'; | ||
import ReviewingBankInfo from '../../assets/animations/ReviewingBankInfo.json'; | ||
import WorkspacePlanet from '../../assets/animations/WorkspacePlanet.json'; | ||
|
||
export {Fireworks, Hands, PreferencesDJ, ReviewingBankInfo}; | ||
export {ExpensifyLounge, Fireworks, Hands, PreferencesDJ, ReviewingBankInfo, WorkspacePlanet}; |
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.