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

Entering Settings causes error in devtools #6816

Closed
BOHEUS opened this issue Aug 31, 2024 · 6 comments · Fixed by #6736
Closed

Entering Settings causes error in devtools #6816

BOHEUS opened this issue Aug 31, 2024 · 6 comments · Fixed by #6736
Labels
good first issue Good for newcomers

Comments

@BOHEUS
Copy link
Contributor

BOHEUS commented Aug 31, 2024

Scenario:

  1. Log in
  2. Go to Settings

Actual: Upon entering Settings, errors appear
Screencast from 2024-08-31 12-55-20.webm

Expected: Going to Settings shouldn't cause the problems

Error:

Warning: React does not recognize the `data-testId` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `data-testid` instead. If you accidentally passed it from a parent component, remove it from the DOM element.
input
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-2IPCHOKD.js?v=4a09cb80:1278:45
TextInputV2Component@http://localhost:3001/src/modules/ui/input/components/TextInputV2.tsx:106:30
TextInput@http://localhost:3001/src/modules/ui/input/components/TextInput.tsx:18:26
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
NameFields@http://localhost:3001/src/modules/settings/profile/components/NameFields.tsx:29:27
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
Section@http://localhost:3001/src/modules/ui/layout/section/components/Section.tsx:28:24
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
ScrollWrapper@http://localhost:3001/src/modules/ui/utilities/scroll/components/ScrollWrapper.tsx:29:30
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
SettingsPageContainer@http://localhost:3001/src/modules/settings/components/SettingsPageContainer.tsx:43:38
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
PagePanel@http://localhost:3001/src/modules/ui/layout/page/PagePanel.tsx:22:26
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
PageBody@http://localhost:3001/src/modules/ui/layout/page/PageBody.tsx:40:25
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
SubMenuTopBarContainer@http://localhost:3001/src/modules/ui/layout/page/SubMenuTopBarContainer.tsx:24:39
SettingsProfile
RenderedRoute@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4038:7
Routes@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4476:7
Suspense
SettingsRoutes@http://localhost:3001/src/SettingsRoutes.tsx:142:31
RenderedRoute@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4038:7
Outlet@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4410:20
ErrorBoundary@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-error-boundary.js?v=4a09cb80:18:5
AppErrorBoundary@http://localhost:3001/src/modules/error-handler/components/AppErrorBoundary.tsx:13:33
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
MotionComponent@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-5IHKZV2V.js?v=4a09cb80:277:40
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
div
withEmotionCache2/<@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1278:45
DefaultLayout@http://localhost:3001/src/modules/ui/layout/page/DefaultLayout.tsx:72:22
RenderedRoute@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4038:7
Outlet@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4410:20
DialogManager@http://localhost:3001/src/modules/ui/feedback/dialog-manager/components/DialogManager.tsx:15:30
DialogManagerScope@http://localhost:3001/src/modules/ui/feedback/dialog-manager/scopes/DialogManagerScope.tsx:11:35
SnackBarProvider@http://localhost:3001/src/modules/ui/feedback/snack-bar-manager/components/SnackBarProvider.tsx:34:33
ThemeContextProvider@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/packages/twenty-ui/src/theme/provider/ThemeContextProvider.tsx:12:37
ThemeProvider2@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/chunk-3IPCHOKD.js?v=4a09cb80:1308:22
AppThemeProvider@http://localhost:3001/src/modules/ui/theme/components/AppThemeProvider.tsx:16:33
PrefetchDataProvider@http://localhost:3001/src/modules/prefetch/components/PrefetchDataProvider.tsx:12:37
RelationPickerScope@http://localhost:3001/src/modules/object-record/relation-picker/scopes/RelationPickerScope.tsx:11:36
PreComputedChipGeneratorsProvider@http://localhost:3001/src/modules/object-metadata/components/PreComputedChipGeneratorsProvider.tsx:16:50
ObjectMetadataItemsProvider@http://localhost:3001/src/modules/object-metadata/components/ObjectMetadataItemsProvider.tsx:18:44
ApolloMetadataClientProvider@http://localhost:3001/src/modules/object-metadata/components/ApolloMetadataClientProvider.tsx:14:45
AuthProvider@http://localhost:3001/src/modules/auth/components/AuthProvider.tsx:15:29
UserProvider@http://localhost:3001/src/modules/users/components/UserProvider.tsx:19:29
ChromeExtensionSidecarProvider@http://localhost:3001/src/modules/chrome-extension-sidecar/components/ChromeExtensionSidecarProvider.tsx:53:47
ClientConfigProvider@http://localhost:3001/src/modules/client-config/components/ClientConfigProvider.tsx:13:37
ApolloProvider@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/@apollo_client.js?v=4a09cb80:161:16
ApolloProvider@http://localhost:3001/src/modules/apollo/components/ApolloProvider.tsx:13:31
ProvidersThatNeedRouterContext@http://localhost:3001/src/App.tsx:60:26
RenderedRoute@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4038:7
RenderErrorBoundary@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:3995:5
DataRoutes@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:5157:7
Router@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4424:7
RouterProvider@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-router-dom.js?v=4a09cb80:4972:7
App@http://localhost:3001/src/App.tsx:465:35
r2@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-helmet-async.js?v=4a09cb80:313:21
ExceptionHandlerProvider@http://localhost:3001/src/modules/error-handler/components/ExceptionHandlerProvider.tsx:11:41
IconsProvider@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/packages/twenty-ui/src/display/icon/providers/IconsProvider.tsx:13:30
SnackBarProviderScope@http://localhost:3001/src/modules/ui/feedback/snack-bar-manager/scopes/SnackBarProviderScope.tsx:11:38
CaptchaProvider@http://localhost:3001/src/modules/captcha/components/CaptchaProvider.tsx:12:32
ErrorBoundary@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/react-error-boundary.js?v=4a09cb80:18:5
AppErrorBoundary@http://localhost:3001/src/modules/error-handler/components/AppErrorBoundary.tsx:13:33
RecoilRoot_INTERNAL@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/recoil.js?v=4a09cb80:2794:29
RecoilRoot@http://localhost:3001/@fs/home/user/Desktop/projects/twenty/node_modules/.vite/packages/twenty-front/deps/recoil.js?v=4a09cb80:2915:7
@BOHEUS
Copy link
Contributor Author

BOHEUS commented Aug 31, 2024

Related to #6733

@charlesBochet
Copy link
Member

Indeed, I think I was the one introducing this issue :)

Tagging this as good first issue

@charlesBochet charlesBochet added the good first issue Good for newcomers label Sep 1, 2024
@DurgaManikantaSai
Copy link

seems like can be done easily, I want to work on it. May I ? @charlesBochet .

@BOHEUS
Copy link
Contributor Author

BOHEUS commented Sep 2, 2024

@DurgaManikantaSai it's already done in linked PR, if you want to contribute, take another good first issue

@FelixMalfait
Copy link
Member

Closing the issue to avoid confusion as it's resolved in #6736 by @Nabhag8848 but I can't assign him since he did not comment on the issue. Thanks a lot @Nabhag8848!

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Product development ✅ Sep 13, 2024
lucasbordeau added a commit that referenced this issue Sep 20, 2024
…whitespaces string (#6736)

# ISSUE
- Closes #6734
- Closes #6633
- Closes #6733
- Closes #6816

# Description

- [x] Don't allow Empty (whitespaces) Objects to Create, all the
keyboard shortcuts are also handled for this.



https://github.com/user-attachments/assets/1c9add4e-f13f-458b-8f76-63bd868413a2



https://github.com/user-attachments/assets/e72b6ee3-74e4-4517-a230-3eb10db80dc7

Note: we do have one other issue with FullName field #6740 Inorder to
test use **shift**.




- [x] Api Keys Input Name Field -> New and Detail View Name field
shouldn't be empty or string with whitespaces, we won't able to have
whitespaces in both. **Try Entering just spaces**



https://github.com/user-attachments/assets/b521b49f-648c-4585-9d15-8ff4faed3c3a


- [x] Similar to above, Empty webhook endpoint url under
**/settings/developers/webhooks/new** won't be created. **Try Entering
just spaces**

- [x] New Functions or Updating Functions will not able to have
whitespaces, empty string as Name. **Try Entering just spaces**



https://github.com/user-attachments/assets/09fcf394-c6d9-4080-8efd-462b054a22d0



- [x] under **settings/workspace-members** changes will lead and solve
that user won't be able to enter Invite by email as just whitespaces +
button is now getting disabled when there is no correct email. **Try
Entering just spaces**



https://github.com/user-attachments/assets/b352edfa-113b-4645-80fd-db6f120ab5db



- [x] Text Input Field, will not allow to start entering with
whitespaces and won't take just whitespaces as value spaces between
words will work.


https://github.com/user-attachments/assets/8c1a0812-45be-4ed2-bd3d-bb4f92147976

- [x] Similarly Number works as per above including shortcuts. 


https://github.com/user-attachments/assets/9f69cc87-5c3c-43ee-93c4-fa887bc0d7ee


- [x] Similarly FullName field works as per above including shortcuts



https://github.com/user-attachments/assets/7bb006b2-abf7-44cd-a214-7a2fc68df169

- [x] Pasting fullName is been Improved. 

- Case 1 (Two Words): If there are exactly two words, return them as is.
- Case 2 (More than Two Words): If there are more than two words, return
the first two words only.
- Case 3 (One Word): If there is only one word, return it as the first
name, with an empty string as the last name.
- WhiteSpaces have been handled. 

```
console.log(splitFullName("John     Doe")); // ["John", "Doe"]
console.log(splitFullName("        ")); // ["", ""]
console.log(splitFullName("John")); // ["John", ""]
console.log(splitFullName("  John   Doe  ")); // ["John", "Doe"]
console.log(splitFullName("John Michael  Andrew Doe")); // ["John", "Michael"]
```

---------

Co-authored-by: Lucas Bordeau <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: ✅ Done
4 participants