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

Feat/categories main page #36324

Merged
merged 36 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
9ed7207
feat: init empty workspace categories page
ArekChr Feb 8, 2024
436e2ff
refactor: add right element to ratio list item, refactor workspace page
ArekChr Feb 12, 2024
89aa49c
refactor: remove prop types
ArekChr Feb 12, 2024
c329279
fix: remove rightHandSideComponent
ArekChr Feb 12, 2024
1aa6c21
fix: rebase
ArekChr Feb 12, 2024
8e43588
refactor: remove withWindowDimensions
ArekChr Feb 12, 2024
aab6876
feat: add prop types
ArekChr Feb 12, 2024
105cdc7
refactor: use policyID instead policy.id
ArekChr Feb 12, 2024
7c596f4
refactor: migrate to typescript
ArekChr Feb 12, 2024
d3b0e44
fix: ts params issue
ArekChr Feb 13, 2024
3b4edc4
feat: handle go back to workspace if policy not found
ArekChr Feb 13, 2024
8867173
refactor: cr
ArekChr Feb 14, 2024
08ebaa0
feat: add loading when categories empty
ArekChr Feb 14, 2024
ab95a30
refactor: refactor policyAccess to paidPolicyAccess HOC
ArekChr Feb 15, 2024
1f5ea89
fix: chevron padding
ArekChr Feb 15, 2024
c52ca2b
fix: paid policy condition
ArekChr Feb 15, 2024
bd5f8e9
refactor: rename paid policy hoc name & props, move to workspace dir
ArekChr Feb 15, 2024
0114c1d
fix: paid policy condition & add team policy hoc
ArekChr Feb 15, 2024
7dba039
refactor: admin policy access hoc name wip
ArekChr Feb 15, 2024
c96ea1d
fix: change team to paid hoc policy
ArekChr Feb 15, 2024
0c03ff2
fix: use isPaidGroupPolicy to conditionaly display categories menu item
ArekChr Feb 15, 2024
b547fb8
fix: typo
ArekChr Feb 16, 2024
abbec85
Merge branch 'main' into feat/categories_main_page
ArekChr Feb 20, 2024
4e32046
fix: old conflict
ArekChr Feb 20, 2024
d564a41
refactor: use selected categories as an object instead of array
ArekChr Feb 20, 2024
874f051
feat: add workspace empty state card & header message
ArekChr Feb 20, 2024
e4593ae
Merge branch 'main' into feat/categories_main_page
ArekChr Feb 21, 2024
db79355
add categories menu item to protectedCollectPolicyMenuItems
ArekChr Feb 21, 2024
074a51b
fix: ts error
ArekChr Feb 21, 2024
75068f7
refactor: HOC to wrappers
ArekChr Feb 21, 2024
c4199e6
Merge branch 'main' into feat/categories_main_page
ArekChr Feb 21, 2024
3a984ac
fix: improve es translations
ArekChr Feb 22, 2024
1a43015
Merge branch 'main' into feat/categories_main_page
ArekChr Feb 23, 2024
5c19e7f
feat: utilize tablist
ArekChr Feb 23, 2024
abba6f6
fix: add cursor pointer style to checkbox
ArekChr Feb 23, 2024
a25a43b
refactor: remove unused style utils
ArekChr Feb 23, 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
1 change: 1 addition & 0 deletions assets/images/folder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 58 additions & 0 deletions assets/images/product-illustrations/emptystate__expenses.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -507,6 +507,10 @@ const ROUTES = {
route: 'workspace/:policyID/members',
getRoute: (policyID: string) => `workspace/${policyID}/members` as const,
},
WORKSPACE_CATEGORIES: {
route: 'workspace/:policyID/categories',
getRoute: (policyID: string) => `workspace/${policyID}/categories` as const,
},
// Referral program promotion
REFERRAL_DETAILS_MODAL: {
route: 'referral/:contentType',
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ const SCREENS = {
MEMBERS: 'Workspace_Members',
INVITE: 'Workspace_Invite',
INVITE_MESSAGE: 'Workspace_Invite_Message',
CATEGORIES: 'Workspace_Categories',
CURRENCY: 'Workspace_Profile_Currency',
DESCRIPTION: 'Workspace_Profile_Description',
SHARE: 'Workspace_Profile_Share',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Icon/Expensicons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ import Flag from '@assets/images/flag.svg';
import FlagLevelOne from '@assets/images/flag_level_01.svg';
import FlagLevelTwo from '@assets/images/flag_level_02.svg';
import FlagLevelThree from '@assets/images/flag_level_03.svg';
import Folder from '@assets/images/folder.svg';
import Fullscreen from '@assets/images/fullscreen.svg';
import Gallery from '@assets/images/gallery.svg';
import Gear from '@assets/images/gear.svg';
Expand Down Expand Up @@ -216,6 +217,7 @@ export {
FlagLevelTwo,
FlagLevelThree,
Fullscreen,
Folder,
Gallery,
Gear,
Globe,
Expand Down
4 changes: 4 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import BankUserGreen from '@assets/images/product-illustrations/bank-user--green
import ConciergeBlue from '@assets/images/product-illustrations/concierge--blue.svg';
import ConciergeExclamation from '@assets/images/product-illustrations/concierge--exclamation.svg';
import CreditCardsBlue from '@assets/images/product-illustrations/credit-cards--blue.svg';
import EmptyStateExpenses from '@assets/images/product-illustrations/emptystate__expenses.svg';
import GpsTrackOrange from '@assets/images/product-illustrations/gps-track--orange.svg';
import Hands from '@assets/images/product-illustrations/home-illustration-hands.svg';
import InvoiceOrange from '@assets/images/product-illustrations/invoice--orange.svg';
Expand Down Expand Up @@ -36,6 +37,7 @@ import ConciergeBubble from '@assets/images/simple-illustrations/simple-illustra
import ConciergeNew from '@assets/images/simple-illustrations/simple-illustration__concierge.svg';
import CreditCardsNew from '@assets/images/simple-illustrations/simple-illustration__credit-cards.svg';
import EmailAddress from '@assets/images/simple-illustrations/simple-illustration__email-address.svg';
import FolderOpen from '@assets/images/simple-illustrations/simple-illustration__folder-open.svg';
import Gears from '@assets/images/simple-illustrations/simple-illustration__gears.svg';
import HandCard from '@assets/images/simple-illustrations/simple-illustration__handcard.svg';
import HandEarth from '@assets/images/simple-illustrations/simple-illustration__handearth.svg';
Expand Down Expand Up @@ -76,6 +78,8 @@ export {
ConciergeExclamation,
CreditCardsBlue,
EmailAddress,
EmptyStateExpenses,
FolderOpen,
HandCard,
HotDogStand,
InvoiceOrange,
Expand Down
2 changes: 1 addition & 1 deletion src/components/SelectionList/BaseListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function BaseListItem<TItem extends ListItem>({
<View style={wrapperStyle}>
{canSelectMultiple && (
<View
role={CONST.ACCESSIBILITY_ROLE.BUTTON}
role={CONST.ROLE.BUTTON}
style={StyleUtils.getCheckboxPressableStyle()}
>
<View style={selectMultipleStyle}>
Expand Down
39 changes: 21 additions & 18 deletions src/components/SelectionList/RadioListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,30 @@ function RadioListItem({
rightHandSideComponent={rightHandSideComponent}
keyForList={item.keyForList}
>
<View style={[styles.flex1, styles.alignItemsStart]}>
<TextWithTooltip
shouldShowTooltip={showTooltip}
text={item.text}
textStyles={[
styles.optionDisplayName,
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText,
styles.sidebarLinkTextBold,
styles.pre,
item.alternateText ? styles.mb1 : null,
]}
/>

{!!item.alternateText && (
<>
<View style={[styles.flex1, styles.alignItemsStart]}>
<TextWithTooltip
shouldShowTooltip={showTooltip}
text={item.alternateText}
textStyles={[styles.textLabelSupporting, styles.lh16, styles.pre]}
text={item.text}
textStyles={[
styles.optionDisplayName,
isFocused ? styles.sidebarLinkActiveText : styles.sidebarLinkText,
styles.sidebarLinkTextBold,
styles.pre,
item.alternateText ? styles.mb1 : null,
]}
/>
)}
</View>

{!!item.alternateText && (
<TextWithTooltip
shouldShowTooltip={showTooltip}
text={item.alternateText}
textStyles={[styles.textLabelSupporting, styles.lh16, styles.pre]}
/>
)}
</View>
{!!item.rightElement && item.rightElement}
</>
</BaseListItem>
);
}
Expand Down
Loading
Loading