Skip to content
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

[Wave8] Workspace Switcher #33501

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
277 commits
Select commit Hold shift + click to select a range
5c4f8b8
Merge branch 'main' into @kosmydel/ideal-nav
kosmydel Nov 29, 2023
d7777fa
Setup translations
mateuuszzzzz Dec 6, 2023
07b296a
Redesign InitialSettingsPage
mateuuszzzzz Dec 6, 2023
cd2bf3a
Adjust styles and StyleUtils to the new menu color palette
mateuuszzzzz Dec 6, 2023
0648bf2
Run prettier
mateuuszzzzz Dec 6, 2023
71f5f82
Merge branch 'main' into wave8/account-settings-style
mateuuszzzzz Dec 6, 2023
5a13517
Modify translations
mateuuszzzzz Dec 6, 2023
291f92b
Modify translations
mateuuszzzzz Dec 6, 2023
1701c86
Modify spanish translations
mateuuszzzzz Dec 7, 2023
c4d2116
Merge branch 'main' into @kosmydel/ideal-nav
kosmydel Dec 7, 2023
bc14361
Revert "Merge branch 'main' into wave8/account-settings-style"
mateuuszzzzz Dec 7, 2023
7d07b9d
fix issues
kosmydel Dec 7, 2023
1d250af
Revert "Revert "Merge branch 'main' into wave8/account-settings-style""
mateuuszzzzz Dec 7, 2023
da3441d
migrate custom full screen router
kosmydel Dec 7, 2023
6c32902
migrate FullScreenNavigator to TS
kosmydel Dec 7, 2023
f25b702
fix typing
kosmydel Dec 7, 2023
a098a69
Refactor styles
mateuuszzzzz Dec 7, 2023
623e419
another fix
kosmydel Dec 7, 2023
8458597
Refactor comments
mateuuszzzzz Dec 7, 2023
25a909b
another typescript step
kosmydel Dec 7, 2023
117b717
split createCustomStackNavigator
kosmydel Dec 7, 2023
84eb21f
full screen animations
kosmydel Dec 7, 2023
7d3b17e
Merge remote-tracking branch 'origin-swm/wave8/account-settings-style…
kosmydel Dec 7, 2023
0c50ea6
add current route displaying
kosmydel Dec 7, 2023
205b696
temp: fix qr codes
kosmydel Dec 7, 2023
e908c93
fix going back in the settings
kosmydel Dec 8, 2023
df5da55
make the animations responsive
kosmydel Dec 8, 2023
f5e5090
better animations handling
kosmydel Dec 8, 2023
f9b22fc
Merge branch 'main' into wave8/account-settings-style
mateuuszzzzz Dec 11, 2023
295d1cc
refactor
kosmydel Dec 11, 2023
315d28e
Adjust designs
mateuuszzzzz Dec 13, 2023
5527eca
Resolve conflicts
mateuuszzzzz Dec 13, 2023
c36f08e
Remove unused imports
mateuuszzzzz Dec 13, 2023
f73047e
Remove unused onyx keys
mateuuszzzzz Dec 13, 2023
1e162ea
move avatar picker
kosmydel Dec 13, 2023
f2ddfa2
add bottom borders
kosmydel Dec 13, 2023
37bd07d
Merge remote-tracking branch 'origin-swm/wave8/account-settings-style…
kosmydel Dec 13, 2023
0092556
complete merge with main
kosmydel Dec 13, 2023
307e668
fix issues
kosmydel Dec 13, 2023
5201869
add const for bottom tab
adamgrzybowski Dec 12, 2023
4f6e869
patch for react-navigation
adamgrzybowski Dec 12, 2023
1592ff8
styles for bottom tab navigator
adamgrzybowski Dec 12, 2023
4696731
public bottom tab navigator
adamgrzybowski Dec 13, 2023
0f61ed9
move workspace screens
adamgrzybowski Dec 13, 2023
c6f1600
improve types for tab to central pane mapping
adamgrzybowski Dec 13, 2023
2a22d8a
prepare BottomTabBarFloatingActionButton
adamgrzybowski Dec 13, 2023
593618f
move tab to central pane mapping
adamgrzybowski Dec 13, 2023
70b3db6
add and modify navigation types
adamgrzybowski Dec 13, 2023
018c055
add helpers for navigation
adamgrzybowski Dec 13, 2023
c1613c8
modify linking config
adamgrzybowski Dec 13, 2023
2d0c560
add bottomTabBar
adamgrzybowski Dec 13, 2023
62a63ec
add comment to the PublicBottomTabNavigator
adamgrzybowski Dec 13, 2023
32ba7c6
update type in Navigation.js
adamgrzybowski Dec 13, 2023
c0f1351
use proper color for BottomTabBar
adamgrzybowski Dec 13, 2023
7b4cef9
add bottom tab navigator
adamgrzybowski Dec 13, 2023
2a23586
move trigger for state rehydration to createCustomStackNavigator
adamgrzybowski Dec 13, 2023
644c770
modify custom router for the CustomStackNavigator
adamgrzybowski Dec 13, 2023
0c75097
modify linkTo
adamgrzybowski Dec 13, 2023
4050128
fix linting errors
adamgrzybowski Dec 13, 2023
8706109
add POP_TO_TOP when navigating to bottom tab on small screen
adamgrzybowski Dec 15, 2023
fcd5f61
fix padding
kosmydel Dec 15, 2023
8be9983
add removed workspace currency page
adamgrzybowski Dec 15, 2023
6eb6398
change workspace settings to workspace overview
adamgrzybowski Dec 15, 2023
2563afa
Merge branch '@kosmydel/ideal-nav' into ideal-nav-merge
kosmydel Dec 18, 2023
0853f6c
cleanup: rename settings screen name
kosmydel Dec 18, 2023
89e4478
fix deeplinks
kosmydel Dec 18, 2023
db08511
Merge branch 'main' into ideal-nav-merge-merge-v3
kosmydel Dec 18, 2023
59779d5
prettier
kosmydel Dec 18, 2023
5d47480
Merge branch 'Expensify:main' into ideal-nav-merge
kosmydel Dec 18, 2023
ecd4e26
fix escape on account settings
kosmydel Dec 18, 2023
f6ab21e
Merge branch 'main' into ideal-nav-merge
kosmydel Dec 19, 2023
7827568
update workspace overview layout
staszekscp Dec 19, 2023
7877b58
fix layout
staszekscp Dec 19, 2023
21fd969
add workspace name page and other adjustments
staszekscp Dec 19, 2023
ac68bbd
fix going back route
staszekscp Dec 19, 2023
1a20dc7
cleanup
staszekscp Dec 19, 2023
9f506be
use breadcrumbs
kosmydel Dec 19, 2023
a217f1d
Add subscript icon to SubscriptAvatar
MaciejSWM Dec 19, 2023
a725b49
Merge pull request #10 from software-mansion-labs/ideal-nav/workspace…
adamgrzybowski Dec 19, 2023
3a58c65
WorkspaceSwitcherButton
MaciejSWM Dec 19, 2023
5c3abec
Change default color for border
MaciejSWM Dec 19, 2023
ffc295f
Merge branch 'wave8/workspace-switcher-icon' into ideal-nav-merge
kosmydel Dec 19, 2023
9875fe7
add new search bar
kosmydel Dec 19, 2023
f496947
fix goBack
adamgrzybowski Dec 19, 2023
88cc5f9
fix crash after loggin in
adamgrzybowski Dec 19, 2023
2781ecc
remove redundand isSmallScreen check
adamgrzybowski Dec 19, 2023
77837d1
fixes
kosmydel Dec 20, 2023
255794f
fix crash after loggin in
adamgrzybowski Dec 19, 2023
33b0cfd
remove redundand isSmallScreen check
adamgrzybowski Dec 19, 2023
bbe8aaf
Merge branch 'ideal-nav-merge' into ideal-nav-merge-search-bar
kosmydel Dec 20, 2023
34586d8
design fixes
kosmydel Dec 20, 2023
72179aa
redesign settings sidebar
staszekscp Dec 20, 2023
0cb565c
update layout for workspace settings
staszekscp Dec 20, 2023
adbcde9
add spanish translation
kosmydel Dec 20, 2023
7bd9f47
address review
kosmydel Dec 20, 2023
770c2d9
fix regressions from other PR
kosmydel Dec 19, 2023
ba1bbf3
fix new-expensify color
kosmydel Dec 20, 2023
4d795d2
fix props for WorkspaceNamePage
staszekscp Dec 20, 2023
06eedf9
Merge pull request #13 from software-mansion-labs/ideal-nav/fix-props…
adamgrzybowski Dec 20, 2023
96a2875
Merge pull request #12 from software-mansion-labs/ideal-nav/all-settings
adamgrzybowski Dec 20, 2023
bd0d201
Merge branch 'ideal-nav-merge' into ideal-nav-merge-search-bar
adamgrzybowski Dec 21, 2023
5c19153
Merge pull request #11 from software-mansion-labs/ideal-nav-merge-sea…
adamgrzybowski Dec 21, 2023
ac2f215
Full width Search Bar
MaciejSWM Dec 21, 2023
dbeafa1
Fix svg icons fill color
WojtekBoman Dec 21, 2023
9b9666e
Merge branch 'ideal-nav-merge' of https://github.com/software-mansion…
MaciejSWM Dec 21, 2023
b51571c
fix missaligned breadcrumbs
adamgrzybowski Dec 21, 2023
96ae681
Merge branch 'wave8/workspace-settings-row' into @szymczak/workspace-…
SzymczakJ Dec 21, 2023
2b9bd0f
Decrease gap
MaciejSWM Dec 21, 2023
1f31b98
Adjust margins for Breadcrumbs
MaciejSWM Dec 21, 2023
5e2b77b
Merge branch 'ideal-nav-merge' of https://github.com/software-mansion…
MaciejSWM Dec 21, 2023
b531ce9
Unify margins
MaciejSWM Dec 21, 2023
2ea909c
Use new CONST.ROLE roles
MaciejSWM Dec 21, 2023
f08367e
Bigger touchable area
MaciejSWM Dec 21, 2023
b190af7
Tooltip and translate() instead of hardcoded string
MaciejSWM Dec 21, 2023
315552f
Move chats translation to common
MaciejSWM Dec 21, 2023
2e15d6f
add getAdaptedStateFromPath and improve CustomRouter
adamgrzybowski Dec 21, 2023
f6f85b7
Replace margins with paddings - fixes max width
MaciejSWM Dec 21, 2023
734991f
fix up for pages in workspace settings
adamgrzybowski Dec 21, 2023
8bd671d
fix up for pages in settings profile
adamgrzybowski Dec 21, 2023
88e0516
set default fallbacRoute for goBack
adamgrzybowski Dec 21, 2023
29f997c
fix up for pages in settings preferences
adamgrzybowski Dec 21, 2023
2291915
fix up for pages in settings security
adamgrzybowski Dec 21, 2023
9b99f38
fix up for pages in settings wallet
adamgrzybowski Dec 21, 2023
e2726a6
fix up for pages in settings profile v2
adamgrzybowski Dec 21, 2023
ce7ad35
Create WorkspaceSelectorPage
mateuuszzzzz Dec 13, 2023
8bff47a
Update design and implement page in RHP temporarily
mateuuszzzzz Dec 14, 2023
01c740c
Adapt OptionRow for Workspace Switcher
mateuuszzzzz Dec 14, 2023
2b0cb18
Comment unused variable
mateuuszzzzz Dec 14, 2023
f5a0d7b
Integrate search bar
mateuuszzzzz Dec 20, 2023
daa8597
Fix typos
mateuuszzzzz Dec 21, 2023
476eeda
Move switcher to LHP
mateuuszzzzz Dec 21, 2023
62b122a
Cherry pick workspace card
MaciejSWM Dec 20, 2023
0db1612
Implement simplified search
mateuuszzzzz Dec 21, 2023
792190c
Add translations
mateuuszzzzz Dec 22, 2023
4a1735e
Add BrickRoadsUtils
WojtekBoman Dec 18, 2023
72f72d3
Refactor getBrickRoadForPolicy return type
WojtekBoman Dec 18, 2023
ad55ac8
Refactor getBrickRoadForPolicy function
WojtekBoman Dec 18, 2023
7a3caa4
Refactor getWorkspacesBrickRoads function
WojtekBoman Dec 18, 2023
7043a9a
Add export type BrickRoad
WojtekBoman Dec 18, 2023
2023eaa
Refactor BrickRoad type, add commments in BrickRoadsUtils
WojtekBoman Dec 19, 2023
6cc0437
Fix lint in BrickRoadsUtils
WojtekBoman Dec 19, 2023
f618fcc
Refactor BrickRoadsUtils
WojtekBoman Dec 21, 2023
017a612
change header
SzymczakJ Dec 22, 2023
bc79188
Add logic for gbr/rbr and unread chats
mateuuszzzzz Dec 22, 2023
7311f38
Remove native version of FAB - they are now identical on all platforms
MaciejSWM Dec 22, 2023
a115286
Add navigation to workspace editor
mateuuszzzzz Dec 22, 2023
945ce50
Remove width 101% - breaks mobile
MaciejSWM Dec 22, 2023
8e9f60f
Use variable instead of hardcoded value
MaciejSWM Dec 22, 2023
f4d5b1f
Add navigation to main page
mateuuszzzzz Dec 22, 2023
5efd3da
Dont include additional padding top
MaciejSWM Dec 22, 2023
14ff06d
Merge pull request #16 from software-mansion-labs/ideal-nav-merge-up
adamgrzybowski Dec 22, 2023
c3378bd
Update shouldShowPolicy
mateuuszzzzz Dec 22, 2023
c208135
Bigger clickable area for bottom tab
MaciejSWM Dec 22, 2023
2371230
Fix conditional rendering
mateuuszzzzz Dec 22, 2023
014ba51
Merge branch 'ideal-nav-merge' of https://github.com/software-mansion…
MaciejSWM Dec 22, 2023
8cf5b37
Fix mobile navigation being undefined
MaciejSWM Dec 22, 2023
63c9c67
Adjust spanish translation
mateuuszzzzz Dec 22, 2023
10c8b64
Add useActiveRoute
WojtekBoman Dec 22, 2023
7f9fc38
Clickable area around FAB button
MaciejSWM Dec 22, 2023
35ef708
Merge branch 'ideal-nav-merge' of https://github.com/software-mansion…
MaciejSWM Dec 22, 2023
8e2a3d1
Wrap with ScreenWrapper for mobile spacing
MaciejSWM Dec 22, 2023
188a9d8
Fix navigating to workspaces screen
MaciejSWM Dec 22, 2023
942aaec
finish new workspaces page
SzymczakJ Dec 28, 2023
38ee84a
Merge branch 'ideal-nav-merge' into @szymczak/workspace-screen
SzymczakJ Dec 28, 2023
b28f8a0
add insets padding
SzymczakJ Dec 28, 2023
1d58bef
refactor & fix back button, and fix logo color
kosmydel Jan 2, 2024
7897986
add missing screen mappings
kosmydel Jan 2, 2024
497420f
refactor paddings
kosmydel Jan 2, 2024
cb8ffe7
adjust icons
kosmydel Jan 2, 2024
6eb0649
Merge branch 'lhp-ideal-nav' into ideal-nav-merge-lhp
kosmydel Jan 2, 2024
4ea1be5
fix icon colors
kosmydel Jan 2, 2024
987ae7c
fix one more icon
kosmydel Jan 2, 2024
112619c
fix copy in account settings -> share code
kosmydel Jan 2, 2024
7386318
fix colors in WorkspaceSettings
kosmydel Jan 2, 2024
f25b870
Merge pull request #19 from software-mansion-labs/ideal-nav-merge-lhp
MaciejSWM Jan 2, 2024
f4cba31
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-fixes
kosmydel Jan 2, 2024
fc1dfdc
fix lint issues
kosmydel Jan 2, 2024
31f37bc
bottom bar styling, change icon
kosmydel Jan 2, 2024
f1b78ef
Merge branch 'ideal-nav-merge' into @szymczak/workspace-screen
MaciejSWM Jan 2, 2024
50be122
Merge pull request #18 from software-mansion-labs/@kosmydel/ideal-nav…
MaciejSWM Jan 2, 2024
7152549
Merge branch 'ideal-nav-merge' into @szymczak/workspace-screen
MaciejSWM Jan 2, 2024
b92afcb
fix selecting room from workspace list
kosmydel Jan 3, 2024
9b31944
fix paddings when scrolling workspace list
kosmydel Jan 3, 2024
0f89d72
Fix position of three dots menu
MaciejSWM Jan 3, 2024
51e5545
Merge branch '@szymczak/workspace-screen' of https://github.com/softw…
MaciejSWM Jan 3, 2024
f47006e
Merge branch 'main' into ideal-nav-merge
WojtekBoman Jan 4, 2024
54100dc
Fix type imports
WojtekBoman Jan 4, 2024
e1d746d
Resolve conflicts
mateuuszzzzz Jan 4, 2024
d47f3e0
Translations
MaciejSWM Jan 4, 2024
b7d75a3
Merge branch 'ideal-nav-merge' of https://github.com/software-mansion…
MaciejSWM Jan 4, 2024
b777815
Drop unused import
MaciejSWM Jan 4, 2024
b65dfd6
Fix import
mateuuszzzzz Jan 4, 2024
b7b2075
Merge branch 'ideal-nav-merge' into wave8/workspace-switcher
mateuuszzzzz Jan 4, 2024
25e5dc5
Drop header; align paddings with other screens
MaciejSWM Jan 4, 2024
5617aa3
fix back button
kosmydel Jan 4, 2024
acba123
fix wrench icon on native
kosmydel Jan 4, 2024
ebde63f
fix types
kosmydel Jan 4, 2024
9b887a6
Fix highlighting active item
MaciejSWM Jan 4, 2024
465a722
Drop console logs
MaciejSWM Jan 4, 2024
f81f7f2
Drop explicit fill and size
MaciejSWM Jan 4, 2024
b3fd73e
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-small-fixes
MaciejSWM Jan 4, 2024
bf89a11
Merge pull request #20 from software-mansion-labs/@kosmydel/ideal-nav…
MaciejSWM Jan 4, 2024
9807ef5
Drop screen wrapper - screen is not in RHP anymore
MaciejSWM Jan 4, 2024
7f4b0d3
Move breadcrumbs above the scroll view
MaciejSWM Jan 4, 2024
5d5a775
rename to shouldLimitHeight
kosmydel Jan 5, 2024
7181d0a
add isPane to jsDoc
kosmydel Jan 5, 2024
f7143fd
fix comment
kosmydel Jan 5, 2024
f5509a7
move to const
kosmydel Jan 5, 2024
d87b676
use WorkspaceSwitcherButton component
kosmydel Jan 5, 2024
96afe9e
Get topmost name, not path
MaciejSWM Jan 5, 2024
ae77833
Use topmost name and apply string match fix
MaciejSWM Jan 5, 2024
7a827cd
Autofocus workspace name edit
MaciejSWM Jan 5, 2024
2e88b64
Rename WORKSPACE_NAME to WORKSPACE_OVERVIEW_NAME
WojtekBoman Jan 5, 2024
b238846
Fix useActiveRoute hook, types and imports
WojtekBoman Jan 8, 2024
730f793
use styles
kosmydel Jan 8, 2024
ee5218c
migrate TopBar to ts
kosmydel Jan 8, 2024
e20938a
Increase header height - align with figma
MaciejSWM Jan 8, 2024
8a3f85e
fix offline indicator
kosmydel Jan 8, 2024
7845e2a
Adjusted padding; max width; alignment left
MaciejSWM Jan 8, 2024
7f40468
Merge branch 'ideal-nav-merge' into @kosmydel/ideal-nav-address-review
kosmydel Jan 8, 2024
32016b1
rename variable
kosmydel Jan 8, 2024
4c17ece
fix
kosmydel Jan 8, 2024
811d303
rename
kosmydel Jan 8, 2024
9f55264
fix offline indicator on WorkspaceInitialPage
kosmydel Jan 8, 2024
d3fe139
fix Card page
kosmydel Jan 8, 2024
72fa38b
address review - use translate hook
kosmydel Jan 8, 2024
eb267db
remove redundant HOCs
kosmydel Jan 8, 2024
2bfb84a
address review
kosmydel Jan 8, 2024
c647c2c
use MenuItemList in AllSettingsScreen
kosmydel Jan 8, 2024
8a6cefd
address review
kosmydel Jan 8, 2024
2398efe
fix multiple currentUserPersonalDetails HOCs
kosmydel Jan 8, 2024
9a0bd1f
fix imports
kosmydel Jan 8, 2024
edf9d65
fix offline indicator when online
kosmydel Jan 8, 2024
9f66c0a
address review
kosmydel Jan 8, 2024
7bd9335
set proper name in FullScreenNavigator
kosmydel Jan 8, 2024
e0f5bf5
remove redundant code
kosmydel Jan 8, 2024
13c37cf
fix
kosmydel Jan 8, 2024
93d634b
Import react
MaciejSWM Jan 8, 2024
0fb334a
Merge pull request #22 from software-mansion-labs/@kosmydel/ideal-nav…
MaciejSWM Jan 8, 2024
ab2aac4
merge
kosmydel Jan 9, 2024
bfff230
Merge branch 'main' into ideal-nav-merge-copy
kosmydel Jan 9, 2024
426cf80
Revert "merge"
kosmydel Jan 9, 2024
f4c9f87
Merge branch 'ideal-nav-merge-copy' into ideal-nav-merge
kosmydel Jan 9, 2024
8f9140d
fix font
kosmydel Jan 9, 2024
1b7146b
fix & prettier
kosmydel Jan 9, 2024
adbb9a1
Resolve conflicts with ideal-nav-merge
mateuuszzzzz Jan 10, 2024
7c7f8fa
Add context for storing active workspacegp
mateuuszzzzz Jan 11, 2024
4a5eb63
Add filtering of reports based on active workspace
mateuuszzzzz Jan 11, 2024
a092248
Remove redundant export
mateuuszzzzz Jan 11, 2024
e77d1a0
Change icon of switcher button based on active workspace
mateuuszzzzz Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions assets/images/cards-and-domains.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/images/home.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion assets/images/new-expensify.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions assets/images/wrench.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ index 7558eb3..b7bb75e 100644
}) : STATE_TRANSITIONING_OR_BELOW_TOP;
}
+
+ const isHomeScreenAndNotOnTop = route.name === 'Home' && isScreenActive !== STATE_ON_TOP;
+ const isHomeScreenAndNotOnTop = (route.name === 'BottomTabNavigator' || route.name === 'Settings_Root') && isScreenActive !== STATE_ON_TOP;
+
const {
headerShown = true,
Expand Down
2 changes: 2 additions & 0 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Onyx from 'react-native-onyx';
import {PickerStateProvider} from 'react-native-picker-select';
import {SafeAreaProvider} from 'react-native-safe-area-context';
import '../wdyr';
import ActiveWorkspaceContextProvider from './components/ActiveWorkspace/ActiveWorkspaceProvider';
import ColorSchemeWrapper from './components/ColorSchemeWrapper';
import ComposeProviders from './components/ComposeProviders';
import CustomStatusBarAndBackground from './components/CustomStatusBarAndBackground';
Expand Down Expand Up @@ -69,6 +70,7 @@ function App() {
PickerStateProvider,
EnvironmentProvider,
CustomStatusBarAndBackgroundContextProvider,
ActiveWorkspaceContextProvider,
]}
>
<CustomStatusBarAndBackground />
Expand Down
14 changes: 13 additions & 1 deletion src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -480,6 +480,8 @@ const CONST = {
// Use Environment.getEnvironmentURL to get the complete URL with port number
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
EXPENSIFY_INBOX_URL: 'https://www.expensify.com/inbox',
ADMIN_POLICIES_URL: 'admin_policies',
ADMIN_DOMAINS_URL: 'admin_domains',

SIGN_IN_FORM_WIDTH: 300,

Expand Down Expand Up @@ -993,6 +995,7 @@ const CONST = {
3: 100,
},
},
CENTRAL_PANE_ANIMATION_HEIGHT: 200,
LHN_SKELETON_VIEW_ITEM_HEIGHT: 64,
EXPENSIFY_PARTNER_NAME: 'expensify.com',
EMAIL: {
Expand Down Expand Up @@ -1445,7 +1448,7 @@ const CONST = {
GUIDES_CALL_TASK_IDS: {
CONCIERGE_DM: 'NewExpensifyConciergeDM',
WORKSPACE_INITIAL: 'WorkspaceHome',
WORKSPACE_SETTINGS: 'WorkspaceGeneralSettings',
WORKSPACE_OVERVIEW: 'WorkspaceGeneralSettings',
WORKSPACE_CARD: 'WorkspaceCorporateCards',
WORKSPACE_REIMBURSE: 'WorkspaceReimburseReceipts',
WORKSPACE_BILLS: 'WorkspacePayBills',
Expand Down Expand Up @@ -3062,7 +3065,11 @@ const CONST = {
DEFAULT: 5,
CAROUSEL: 3,
},
BRICK_ROAD: {
GBR: 'info',
RBR: 'error',

},
VIOLATIONS: {
ALL_TAG_LEVELS_REQUIRED: 'allTagLevelsRequired',
AUTO_REPORTED_REJECTED_EXPENSE: 'autoReportedRejectedExpense',
Expand Down Expand Up @@ -3106,6 +3113,11 @@ const CONST = {
EMAIL: 'EMAIL',
REPORT: 'REPORT',
},

WORKSPACE_SWITCHER: {
NAME: 'Expensify',
SUBSCRIPT_ICON_SIZE: 8,
},
} as const;

export default CONST;
1 change: 1 addition & 0 deletions src/NAVIGATORS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* */
export default {
CENTRAL_PANE_NAVIGATOR: 'CentralPaneNavigator',
BOTTOM_TAB_NAVIGATOR: 'BottomTabNavigator',
LEFT_MODAL_NAVIGATOR: 'LeftModalNavigator',
RIGHT_MODAL_NAVIGATOR: 'RightModalNavigator',
FULL_SCREEN_NAVIGATOR: 'FullScreenNavigator',
Expand Down
20 changes: 13 additions & 7 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function getUrlWithBackToParam<TUrl extends string>(url: TUrl, backTo?: string):
const ROUTES = {
HOME: '',

ALL_SETTINGS: 'all-settings',

// This is a utility route used to go to the user's concierge chat, or the sign-in page if the user's not authenticated
CONCIERGE: 'concierge',
FLAG_COMMENT: {
Expand Down Expand Up @@ -55,7 +57,7 @@ const ROUTES = {
route: 'bank-account/:stepToOpen?',
getRoute: (stepToOpen = '', policyID = '', backTo?: string) => getUrlWithBackToParam(`bank-account/${stepToOpen}?policyID=${policyID}`, backTo),
},

WORKSPACE_SWITCHER: 'workspaceSwitcher',
SETTINGS: 'settings',
SETTINGS_PROFILE: 'settings/profile',
SETTINGS_SHARE_CODE: 'settings/shareCode',
Expand Down Expand Up @@ -438,13 +440,17 @@ const ROUTES = {
route: 'workspace/:policyID/invite-message',
getRoute: (policyID: string) => `workspace/${policyID}/invite-message` as const,
},
WORKSPACE_SETTINGS: {
route: 'workspace/:policyID/settings',
getRoute: (policyID: string) => `workspace/${policyID}/settings` as const,
WORKSPACE_OVERVIEW: {
route: 'workspace/:policyID/overview',
getRoute: (policyID: string) => `workspace/${policyID}/overview` as const,
},
WORKSPACE_OVERVIEW_CURRENCY: {
route: 'workspace/:policyID/overview/currency',
getRoute: (policyID: string) => `workspace/${policyID}/overview/currency` as const,
},
WORKSPACE_SETTINGS_CURRENCY: {
route: 'workspace/:policyID/settings/currency',
getRoute: (policyID: string) => `workspace/${policyID}/settings/currency` as const,
WORKSPACE_OVERVIEW_NAME: {
route: 'workspace/:policyID/overview/name',
getRoute: (policyID: string) => `workspace/${policyID}/overview/name` as const,
},
WORKSPACE_CARD: {
route: 'workspace/:policyID/card',
Expand Down
11 changes: 9 additions & 2 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ const PROTECTED_SCREENS = {

const SCREENS = {
...PROTECTED_SCREENS,
ALL_SETTINGS: 'AllSettings',
REPORT: 'Report',
NOT_FOUND: 'not-found',
TRANSITION_BETWEEN_APPS: 'TransitionBetweenApps',
VALIDATE_LOGIN: 'ValidateLogin',
UNLINK_LOGIN: 'UnlinkLogin',
SETTINGS_CENTRAL_PANE: 'SettingsCentralPane',
SETTINGS: {
ROOT: 'Settings_Root',
SHARE_CODE: 'Settings_Share_Code',
Expand Down Expand Up @@ -83,6 +85,10 @@ const SCREENS = {
},
LEFT_MODAL: {
SEARCH: 'Search',
WORKSPACE_SWITCHER: 'WorkspaceSwitcher',
},
WORKSPACE_SWITCHER: {
ROOT: 'WorkspaceSwitcher_Root',
},
RIGHT_MODAL: {
SETTINGS: 'Settings',
Expand Down Expand Up @@ -192,7 +198,7 @@ const SCREENS = {

WORKSPACE: {
INITIAL: 'Workspace_Initial',
SETTINGS: 'Workspace_Settings',
OVERVIEW: 'Workspace_Overview',
CARD: 'Workspace_Card',
REIMBURSE: 'Workspace_Reimburse',
RATE_AND_UNIT: 'Workspace_RateAndUnit',
Expand All @@ -202,7 +208,8 @@ const SCREENS = {
MEMBERS: 'Workspace_Members',
INVITE: 'Workspace_Invite',
INVITE_MESSAGE: 'Workspace_Invite_Message',
CURRENCY: 'Workspace_Settings_Currency',
CURRENCY: 'Workspace_Overview_Currency',
NAME: 'Workspace_Overview_Name',
},

EDIT_REQUEST: {
Expand Down
11 changes: 11 additions & 0 deletions src/components/ActiveWorkspace/ActiveWorkspaceContext.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import {createContext} from 'react';

type ActiveWorkspaceContextType = {
activeWorkspaceID?: string;
setActiveWorkspaceID: (activeWorkspaceID?: string) => void;
}

const ActiveWorkspaceContext = createContext<ActiveWorkspaceContextType>({activeWorkspaceID: undefined, setActiveWorkspaceID: () => undefined});

export default ActiveWorkspaceContext;
export {type ActiveWorkspaceContextType};
17 changes: 17 additions & 0 deletions src/components/ActiveWorkspace/ActiveWorkspaceProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, {useMemo, useState} from 'react';
import ActiveWorkspaceContext from './ActiveWorkspaceContext';

function ActiveWorkspaceContextProvider({children}: React.PropsWithChildren) {
const [activeWorkspaceID, setActiveWorkspaceID] = useState<string | undefined>(undefined);

const value = useMemo(
() => ({
activeWorkspaceID,
setActiveWorkspaceID,
}), [activeWorkspaceID]
)

return <ActiveWorkspaceContext.Provider value={value}>{children}</ActiveWorkspaceContext.Provider>;
}

export default ActiveWorkspaceContextProvider;
12 changes: 8 additions & 4 deletions src/components/AvatarWithImagePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ const propTypes = {
horizontal: PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_HORIZONTAL)),
vertical: PropTypes.oneOf(_.values(CONST.MODAL.ANCHOR_ORIGIN_VERTICAL)),
}),

/** Style applied to the avatar */
avatarStyle: stylePropTypes.isRequired,
};

const defaultProps = {
Expand Down Expand Up @@ -142,6 +145,7 @@ function AvatarWithImagePicker({
anchorAlignment,
onImageSelected,
editorMaskImage,
avatarStyle,
}) {
const theme = useTheme();
const styles = useThemeStyles();
Expand Down Expand Up @@ -288,7 +292,7 @@ function AvatarWithImagePicker({

return (
<View style={StyleSheet.flatten([styles.alignItemsCenter, style])}>
<View style={[styles.pRelative, styles.avatarLarge]}>
<View style={[styles.pRelative, avatarStyle]}>
<OfflineWithFeedback
pendingAction={pendingAction}
errors={errors}
Expand All @@ -306,8 +310,8 @@ function AvatarWithImagePicker({
<View>
{source ? (
<Avatar
containerStyles={styles.avatarLarge}
imageStyles={[styles.avatarLarge, styles.alignSelfCenter]}
containerStyles={avatarStyle}
imageStyles={[avatarStyle, styles.alignSelfCenter]}
source={source}
fallbackIcon={fallbackIcon}
size={size}
Expand All @@ -319,7 +323,7 @@ function AvatarWithImagePicker({
</View>
<View style={[styles.smallEditIcon, styles.smallAvatarEditIcon]}>
<Icon
src={Expensicons.Camera}
src={Expensicons.Pencil}
width={variables.iconSizeSmall}
height={variables.iconSizeSmall}
fill={theme.icon}
Expand Down
8 changes: 6 additions & 2 deletions src/components/ContextMenuItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ const propTypes = {

/** Forwarded ref to ContextMenuItem */
innerRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),

/** Should limit width. */
shouldLimitWidth: PropTypes.bool,
};

const defaultProps = {
Expand All @@ -50,9 +53,10 @@ const defaultProps = {
isAnonymousAction: false,
isFocused: false,
innerRef: null,
shouldLimitWidth: true,
};

function ContextMenuItem({onPress, successIcon, successText, icon, text, isMini, description, isAnonymousAction, isFocused, innerRef}) {
function ContextMenuItem({onPress, successIcon, successText, icon, text, isMini, description, isAnonymousAction, isFocused, innerRef, shouldLimitWidth}) {
const styles = useThemeStyles();
const StyleUtils = useStyleUtils();
const {windowWidth} = useWindowDimensions();
Expand Down Expand Up @@ -99,7 +103,7 @@ function ContextMenuItem({onPress, successIcon, successText, icon, text, isMini,
success={!isThrottledButtonActive}
description={description}
descriptionTextStyle={styles.breakWord}
style={StyleUtils.getContextMenuItemStyles(windowWidth)}
style={shouldLimitWidth && StyleUtils.getContextMenuItemStyles(windowWidth)}
isAnonymousAction={isAnonymousAction}
focused={isFocused}
interactive={isThrottledButtonActive}
Expand Down
1 change: 1 addition & 0 deletions src/components/EnvironmentBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ function EnvironmentBadge() {
badgeStyles={[styles.alignSelfStart, styles.headerEnvBadge]}
textStyles={[styles.headerEnvBadgeText]}
environment={environment}
pressable
/>
);
}
Expand Down
3 changes: 1 addition & 2 deletions src/components/FloatingActionButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ function FloatingActionButton({onPress, isActive, accessibilityLabel, role}: Flo

return (
<Tooltip text={translate('common.new')}>
<View style={styles.floatingActionButtonContainer}>
<View style={styles.bottomTabBarItem}>
<AnimatedPressable
ref={(el) => {
fabPressable.current = el;

if (buttonRef && 'current' in buttonRef) {
buttonRef.current = el;
}
Expand Down
6 changes: 5 additions & 1 deletion src/components/HeaderPageLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ type HeaderPageLayoutProps = ChildrenProps &

/** Style to apply to the whole section container */
style?: StyleProp<ViewStyle>;
};

/** Whether or not to show the offline indicator */
shouldShowOfflineIndicator?: boolean;
};
function HeaderPageLayout({
backgroundColor,
children,
Expand All @@ -47,6 +49,7 @@ function HeaderPageLayout({
childrenContainerStyles,
style,
headerContent,
shouldShowOfflineIndicator = false,
...rest
}: HeaderPageLayoutProps) {
const theme = useTheme();
Expand All @@ -70,6 +73,7 @@ function HeaderPageLayout({
includeSafeAreaPaddingBottom={false}
offlineIndicatorStyle={[appBGColor]}
testID={HeaderPageLayout.displayName}
shouldShowOfflineIndicator={shouldShowOfflineIndicator}
>
{({safeAreaPaddingBottomStyle}) => (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/HeaderWithBackButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function HeaderWithBackButton({
// Hover on some part of close icons will not work on Electron if dragArea is true
// https://github.com/Expensify/App/issues/29598
dataSet={{dragArea: false}}
style={[styles.headerBar, shouldShowBorderBottom && styles.borderBottom, shouldShowBackButton && styles.pl2]}
style={[styles.headerBar, shouldShowBorderBottom && styles.borderBottom, shouldShowBackButton ? styles.pl2 : styles.pl5]}
>
<View style={[styles.dFlex, styles.flexRow, styles.alignItemsCenter, styles.flexGrow1, styles.justifyContentBetween, styles.overflowHidden]}>
{shouldShowBackButton && (
Expand Down
Loading
Loading