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

[NoQA] [Wave8] Workspace List Items #32817

Merged
Merged
Show file tree
Hide file tree
Changes from 49 commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
6ed9bcb
Add border radius 3 style
MaciejSWM Dec 5, 2023
4346c84
Create WorkspacesListRow
MaciejSWM Dec 5, 2023
c1e3d60
Add Avatar; style Title
MaciejSWM Dec 5, 2023
64b8143
Add unique key; rename and type props
MaciejSWM Dec 6, 2023
e4aaaec
Add icons
MaciejSWM Dec 6, 2023
11bf35f
Render workspace type icons
MaciejSWM Dec 6, 2023
b8f3bde
Drop height and width from svgs
MaciejSWM Dec 6, 2023
3cc533c
Remove explicit fill from icons
MaciejSWM Dec 6, 2023
4ac804d
Friendly workspace type names
MaciejSWM Dec 6, 2023
b48be5a
Syntactic name for style
MaciejSWM Dec 6, 2023
97f5c1b
Strong label style
MaciejSWM Dec 6, 2023
0545dd7
More accurate types from Policy type
MaciejSWM Dec 6, 2023
2db6405
Do not allow PERSONAL workspace type
MaciejSWM Dec 6, 2023
a4ce86e
Styles; data; commented props
MaciejSWM Dec 6, 2023
d5182e8
Randomized input for testing
MaciejSWM Dec 6, 2023
6927f9f
Make fallback icon required
MaciejSWM Dec 6, 2023
d4aeb3f
Three dots menu UI
MaciejSWM Dec 6, 2023
175b74c
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 7, 2023
31fc5fe
Text ellipsis and proper margins
MaciejSWM Dec 8, 2023
bbb1cb9
Workspace type and plan translations
MaciejSWM Dec 8, 2023
0ba4a29
Use translate function
MaciejSWM Dec 8, 2023
a5da6e5
Screen width dependent styles
MaciejSWM Dec 8, 2023
a897973
Flat flex structure
MaciejSWM Dec 8, 2023
760c924
Apply flex1 only on wide layout
MaciejSWM Dec 11, 2023
8aae624
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 12, 2023
5832829
Add isWide prop; add missing attributes
MaciejSWM Dec 12, 2023
91545df
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 12, 2023
2dfe4aa
Fix merge
MaciejSWM Dec 12, 2023
81aad00
Add validated spanish translations
MaciejSWM Dec 12, 2023
a73d34b
Revert changes made to WorkspacesListPage
MaciejSWM Dec 12, 2023
1c37275
Rename style
MaciejSWM Dec 12, 2023
d4aff8a
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 14, 2023
97402b4
Fix import
MaciejSWM Dec 14, 2023
27ada44
Reorder imports
MaciejSWM Dec 14, 2023
5d15d12
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 18, 2023
c915923
Use basic types
MaciejSWM Dec 18, 2023
819a131
Drop undefined from type list
MaciejSWM Dec 18, 2023
6727a24
Use array destructuring
MaciejSWM Dec 18, 2023
b324fb0
Return null instead of empty Element
MaciejSWM Dec 18, 2023
bd678ad
Mark fallbackWorkspaceIcon as optional
MaciejSWM Dec 18, 2023
9133ee4
Explanation to the isWide prop
MaciejSWM Dec 18, 2023
cb54be7
Add menuItems prop and drop unnecessary props
MaciejSWM Dec 18, 2023
57a533a
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 18, 2023
72f2df3
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 18, 2023
6bba756
CONST instead of boolean
MaciejSWM Dec 18, 2023
67ecbbe
MenuItem type
MaciejSWM Dec 19, 2023
0ae0641
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 19, 2023
410915d
Fix ownerDetails usage with util function
MaciejSWM Dec 19, 2023
9fb3e34
Fix wrong usage of nullish coalescing
MaciejSWM Dec 19, 2023
db6b0fd
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 19, 2023
39628d0
Use updated MenuItem prop
MaciejSWM Dec 19, 2023
2bb86cd
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 20, 2023
8bb6d4d
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 20, 2023
657b3fd
Rename layout to layout_width
MaciejSWM Dec 20, 2023
7938e1e
Add new icons
MaciejSWM Dec 20, 2023
e212e7d
Replace icons with design approved icons
MaciejSWM Dec 20, 2023
cae203d
Make a variable out of workspace type icon width
MaciejSWM Dec 21, 2023
02660a0
Fix anchorPosition props
MaciejSWM Dec 21, 2023
db9ff9e
Missing underscore import
MaciejSWM Dec 21, 2023
015cbc3
Reorder import
MaciejSWM Dec 21, 2023
20eb6ba
Merge branch 'main' into wave8/workspace-settings-row
MaciejSWM Dec 21, 2023
102cbbd
Make ownerAccountID optional
MaciejSWM Dec 21, 2023
7048a20
Merge branch 'main' into wave8/workspace-settings-row
blazejkustra Dec 27, 2023
a0b55e0
Merge branch 'main' into wave8/workspace-settings-row
blazejkustra Dec 27, 2023
4d7cc3a
Fix typecheck
blazejkustra Dec 27, 2023
0502b00
Fix conditional rendering logic
blazejkustra Dec 27, 2023
2498c82
Add a displayName
blazejkustra Dec 27, 2023
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
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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1285,6 +1285,12 @@ const CONST = {
USE_EXPENSIFY_FEES: 'use.expensify.com/fees',
},

LAYOUT: {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This name is too general. Don't know which layout it is

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LAYOUT_WIDTH? Then it's LAYOUT_WIDTH.WIDE and LAYOUT_WIDTH.NARROW. I aimed at this being general, didn't want it to be only tied to a single place in the app.

WIDE: 'wide',
NARROW: 'narrow',
NONE: 'none',
},

ICON_TYPE_ICON: 'icon',
ICON_TYPE_AVATAR: 'avatar',
ICON_TYPE_WORKSPACE: 'workspace',
Expand Down
6 changes: 6 additions & 0 deletions src/components/Icon/Illustrations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import TadaBlue from '@assets/images/product-illustrations/tada--blue.svg';
import TadaYellow from '@assets/images/product-illustrations/tada--yellow.svg';
import ToddBehindCloud from '@assets/images/product-illustrations/todd-behind-cloud.svg';
import BankArrow from '@assets/images/simple-illustrations/simple-illustration__bank-arrow.svg';
import BigRocket from '@assets/images/simple-illustrations/simple-illustration__bigrocket.svg';
import PinkBill from '@assets/images/simple-illustrations/simple-illustration__bill.svg';
import ChatBubbles from '@assets/images/simple-illustrations/simple-illustration__chatbubbles.svg';
import CoffeeMug from '@assets/images/simple-illustrations/simple-illustration__coffeemug.svg';
Expand All @@ -35,6 +36,7 @@ import ConciergeNew from '@assets/images/simple-illustrations/simple-illustratio
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 HandEarth from '@assets/images/simple-illustrations/simple-illustration__handearth.svg';
import HotDogStand from '@assets/images/simple-illustrations/simple-illustration__hotdogstand.svg';
import InvoiceBlue from '@assets/images/simple-illustrations/simple-illustration__invoice.svg';
import LockOpen from '@assets/images/simple-illustrations/simple-illustration__lockopen.svg';
import Luggage from '@assets/images/simple-illustrations/simple-illustration__luggage.svg';
Expand All @@ -45,6 +47,7 @@ import MoneyWings from '@assets/images/simple-illustrations/simple-illustration_
import OpenSafe from '@assets/images/simple-illustrations/simple-illustration__opensafe.svg';
import SanFrancisco from '@assets/images/simple-illustrations/simple-illustration__sanfrancisco.svg';
import ShieldYellow from '@assets/images/simple-illustrations/simple-illustration__shield.svg';
import SmallRocket from '@assets/images/simple-illustrations/simple-illustration__smallrocket.svg';
import ThumbsUpStars from '@assets/images/simple-illustrations/simple-illustration__thumbsupstars.svg';
import TrackShoe from '@assets/images/simple-illustrations/simple-illustration__track-shoe.svg';
import TreasureChest from '@assets/images/simple-illustrations/simple-illustration__treasurechest.svg';
Expand All @@ -54,12 +57,14 @@ export {
BankArrowPink,
BankMouseGreen,
BankUserGreen,
BigRocket,
ChatBubbles,
CoffeeMug,
ConciergeBlue,
ConciergeExclamation,
CreditCardsBlue,
EmailAddress,
HotDogStand,
InvoiceOrange,
JewelBoxBlue,
JewelBoxGreen,
Expand All @@ -75,6 +80,7 @@ export {
RocketOrange,
SanFrancisco,
SafeBlue,
SmallRocket,
TadaYellow,
TadaBlue,
ToddBehindCloud,
Expand Down
4 changes: 2 additions & 2 deletions src/components/MentionSuggestions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
<Text
// eslint-disable-next-line react/no-array-index-key
key={`${text}${i}`}
style={[StyleUtils.getColoredBackgroundStyle(isColored), styles.mentionSuggestionsHandle]}
style={[StyleUtils.getColoredBackgroundStyle(isColored), styles.textSupporting]}
>
{text}
</Text>
Expand All @@ -119,7 +119,7 @@ function MentionSuggestions({prefix, mentions, highlightedMentionIndex = 0, onSe
styles.flexShrink1,
styles.flex1,
styles.mentionSuggestionsDisplayName,
styles.mentionSuggestionsHandle,
styles.textSupporting,
theme.success,
StyleUtils,
],
Expand Down
6 changes: 6 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1472,6 +1472,7 @@ export default {
invoices: 'Invoices',
travel: 'Travel',
members: 'Members',
plan: 'Plan',
bankAccount: 'Bank account',
connectBankAccount: 'Connect bank account',
testTransactions: 'Test transactions',
Expand All @@ -1486,6 +1487,11 @@ export default {
workspaceAvatar: 'Workspace avatar',
mustBeOnlineToViewMembers: 'You must be online in order to view members of this workspace.',
},
type: {
free: 'Free',
control: 'Control',
collect: 'Collect',
},
emptyWorkspace: {
title: 'Create a new workspace',
subtitle: "Workspaces are where you'll chat with your team, reimburse expenses, issue cards, send invoices, pay bills, and more — all in one place.",
Expand Down
6 changes: 6 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1495,6 +1495,7 @@ export default {
invoices: 'Enviar facturas',
travel: 'Viajes',
members: 'Miembros',
plan: 'Plan',
bankAccount: 'Cuenta bancaria',
connectBankAccount: 'Conectar cuenta bancaria',
testTransactions: 'Transacciones de prueba',
Expand All @@ -1509,6 +1510,11 @@ export default {
workspaceAvatar: 'Espacio de trabajo avatar',
mustBeOnlineToViewMembers: 'Debes estar en línea para poder ver los miembros de este espacio de trabajo.',
},
type: {
free: 'Gratis',
control: 'Control',
collect: 'Recolectar',
},
emptyWorkspace: {
title: 'Crear un nuevo espacio de trabajo',
subtitle: 'En los espacios de trabajo es donde puedes chatear con tu equipo, reembolsar gastos, emitir tarjetas, enviar y pagar facturas y mas — todo en un mismo lugar',
Expand Down
6 changes: 5 additions & 1 deletion src/libs/PersonalDetailsUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ Onyx.connect({
* @param [defaultValue] optional default display name value
*/
function getDisplayNameOrDefault(displayName?: string, defaultValue = ''): string {
return displayName ?? defaultValue ?? Localize.translateLocal('common.hidden');
// Not using nullish coalescing as it differs from OR for strings. For example:
// '' || 'A' === 'A'
// '' ?? 'A' === ''
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
return displayName || defaultValue || Localize.translateLocal('common.hidden');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! This fixes something happening on production?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Umm, I'm not sure if it fixes any known bugs and definitely I'm hoping that it doesn't create any.

}

/**
Expand Down
Loading
Loading