Improve snackbar and fix sentry (#7181)

- Improve snackbar to enable displaying multi-line message (so far we
only displayed the first few words which was very frustrating)

- Followup on previous issue to enable tim@apple.dev on the demo
workspace (prefilled automatically)

- Fix sentry tracing which had been broken when migrating from v7 to v8
This commit is contained in:
Félix Malfait
2024-09-21 06:33:15 +02:00
committed by GitHub
parent 20d06b3c0f
commit 6d5d73fbe8
13 changed files with 84 additions and 62 deletions

View File

@ -1,7 +1,7 @@
import { ComponentPropsWithoutRef, ReactNode, useMemo } from 'react';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { isUndefined } from '@sniptt/guards';
import { ComponentPropsWithoutRef, ReactNode, useMemo } from 'react';
import {
IconAlertTriangle,
IconInfoCircle,
@ -46,7 +46,6 @@ const StyledContainer = styled.div`
box-shadow: ${({ theme }) => theme.boxShadow.strong};
box-sizing: border-box;
cursor: pointer;
height: 61px;
padding: ${({ theme }) => theme.spacing(2)};
position: relative;
width: 296px;
@ -90,7 +89,6 @@ const StyledDescription = styled.div`
padding-left: ${({ theme }) => theme.spacing(6)};
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 200px;
`;

View File

@ -1,3 +1,6 @@
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { zodResolver } from '@hookform/resolvers/zod';
import { useCallback } from 'react';
import {
Controller,
@ -5,9 +8,6 @@ import {
useFieldArray,
useForm,
} from 'react-hook-form';
import { useTheme } from '@emotion/react';
import styled from '@emotion/styled';
import { zodResolver } from '@hookform/resolvers/zod';
import { useRecoilValue } from 'recoil';
import { Key } from 'ts-key-enum';
import { IconCopy } from 'twenty-ui';
@ -101,15 +101,15 @@ export const InviteTeam = () => {
const getPlaceholder = (emailIndex: number) => {
if (emailIndex === 0) {
return 'tim@apple.dev';
return 'tim@apple.com';
}
if (emailIndex === 1) {
return 'craig@apple.dev';
return 'phil@apple.com';
}
if (emailIndex === 2) {
return 'mike@apple.dev';
return 'jony@apple.com';
}
return 'phil@apple.dev';
return 'craig@apple.com';
};
const copyInviteLink = () => {