Commit Graph

953 Commits

Author SHA1 Message Date
Félix Malfait
719cce1ea2
Improve design of fields menu (#5729)
Improve design of field options menu and redirect to the right object
edit page



<img width="215" alt="Screenshot 2024-06-04 at 12 15 43"
src="https://github.com/twentyhq/twenty/assets/6399865/a8da18a1-49d4-40e3-b2cd-3a1a384366b2">
2024-06-04 12:16:47 +02:00
Félix Malfait
d964f656f9
Fix field input offset (#5726)
Fix issue introduced in https://github.com/twentyhq/twenty/pull/5426

It's not a beautiful solution. Maybe one day we should have a dedicated
component for title but it also comes with downsides (lot of code to
copy paste, such as "esc" to leave field, copy button, etc.). This one
doesn't create less debt in my opinion. Once we have the layout/widget
system we might have a dedicated widget type and the right abstraction
layers
2024-06-04 11:44:54 +02:00
gitstart-twenty
cd9ac529a5
Add storybook tests for User & Metadata loading (#5650)
### Description
Add storybook tests for User & Metadata loading

### Refs
#5590

### Demo



https://github.com/twentyhq/twenty/assets/140154534/2434fc50-8d95-420b-9f62-6fbdf43ce9e5


Fixes #5590

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
2024-06-04 10:51:33 +02:00
Kyriaki Darivaki
59c7bcd705
Fix 4363 modify kanban menu (#5337)
**Changes:**

- Changed -/+ to eye and eye off icons
- Changed menu width to 200px
- Created separate menu for hidden fields
- Added Edit Fields option to hidden fields menu
- Added test file MenuItemSelectTag (wasn't included in the issue)

As this is my first pr, feedback is very welcome!
**Note:** 
These changes cover most of #4363 . I left out the implementation of the
RightIcon in the "Hidden Fields" menu item.

---------

Co-authored-by: kiridarivaki <k.darivaki03@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-06-03 22:17:37 +02:00
rostaklein
dcd769f20f
spreadsheet import utf8 emoji support (#5720)
fixes https://github.com/twentyhq/twenty/issues/5476

took some time to find the right spot, but ChatGPT was helpful enough in
this case 😄

<img width="311" alt="Screenshot 2024-06-03 at 20 24 26"
src="https://github.com/twentyhq/twenty/assets/19856731/4ea0188b-bee5-4a4f-a8af-2630e3b1c373">
2024-06-03 21:26:08 +02:00
Marie
f7cdd14c75
Use same overlay background for field inputs (#5719)
Fixes #5593
2024-06-03 17:17:25 +02:00
Félix Malfait
09bfb617b2
Right drawer to edit records (#5551)
This PR introduces a new side panel to edit records and the ability to
minimize the side panel.

The goal is leverage this sidepanel to be able to create records while
being in another show page.

I'm opening the PR for feedback since it involved refactoring and
therefore already touches a lot of files, even though it was quick to
implement.

<img width="1503" alt="Screenshot 2024-05-23 at 17 41 37"
src="https://github.com/twentyhq/twenty/assets/6399865/6f17e7a8-f4e9-4eb4-b392-c756db7198ac">
2024-06-03 17:15:05 +02:00
JustGJ
8e8078d596
fix remove favorite on opportunity delete (#5686)
- fix : #5521

When we deleted an opportunity that had been added to the favorites
list, the opportunity was removed correctly, but it still remained in
the favorites list. The issue was due to not accounting for the removal
of the opportunity from the favorites during the deletion process.

This problem has now been fixed : 



https://github.com/twentyhq/twenty/assets/78202522/3d3cb689-3228-43fc-bf50-e824370582a7

Co-authored-by: Jeff Gasparini <jeff@Jeff.local>
2024-06-03 16:09:27 +02:00
Shashank Vishwakarma
04dcbffe75
Fixed: Inconsistent Field Label Display on Task Side Panel (#5687)
Now all the required fields are displayed with the respective labels.

- Added a `FieldContextProvider` for the field `Reminder` in the
`ActivityEditorFields`.
- Fixed the missing label values, by adding a missed optional
`showLabel` within the `fieldDefinition` in the `useFieldContext`.

fixes: #5667 

![Screenshot
(342)](https://github.com/twentyhq/twenty/assets/140178357/adf9563a-6cab-4809-8616-1c256abab717)
2024-06-03 15:58:58 +02:00
Shashank Vishwakarma
a6b8beed68
Fixed: Fields Disappear on Drag and Drop (#5703)
Now the fields don't disappear on drag and drop.

- After reviewing the codebase, I checked that when `inView` is true the
`RecordInlineCell` is rendered otherwise the
`StyledRecordInlineCellPlaceholder` will render which causes the fields
get disappear.
- So, I added the condition to check if `isDragSelectionStartEnabled` is
false then `StyledRecordInlineCellPlaceholder` will be rendered
otherwise `RecordInlineCell`.

fixes: #5651 



https://github.com/twentyhq/twenty/assets/140178357/022195ca-fec2-43a7-8808-f4974dbe66cf

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2024-06-03 15:15:32 +02:00
rostaklein
e49db63f30
accounts page loader as skeleton (#5702)
fixes https://github.com/twentyhq/twenty/issues/5659



https://github.com/twentyhq/twenty/assets/19856731/aeae6f08-bc6e-4d71-9067-39b6382ebf15
2024-06-03 15:14:08 +02:00
spiderman3000
24941c66b7
[Improvement] LeftPanel skeleton loader (#5705)
This change solves #5664 
This modifies the left-side panel skeleton loader in accordance with the
default view.

![old-loading-ui](https://github.com/twentyhq/twenty/assets/171416711/83fe8a06-6f49-4581-bb84-00d2a0291f37)

![new-loading-ui](https://github.com/twentyhq/twenty/assets/171416711/4ba45fc0-8932-4ee9-b558-9f810d7891bd)

![default-loaded-view](https://github.com/twentyhq/twenty/assets/171416711/40c301d2-1015-4a2c-9458-0d2fb9d7de75)
2024-06-03 14:49:57 +02:00
Pacifique LINJANJA
7fa05bf539
feat (improvement): update the createOneObjectMetaItem (#5673)
# This PR

- Fix #5278 
- Updates the implementation of the `createOneObjectMataItem` hook to
reduce the number of api calls
- Users can now navigate to the newly created object first and the
graphql api calls to cache data are happening in the background - this
will improve the user experience and reduce the create object api call
time by >2
<img width="1508" alt="Screenshot 2024-05-30 at 12 00 15"
src="https://github.com/twentyhq/twenty/assets/61581306/46513fd1-d46e-40bc-a036-07e3acdf2870">

In the issue description, it also suggested to have a loading indicator
while creating the object, it seems like on #5352 we adopted to disable
it while creating the object - which looks good to me and it works, let
me know if we still need the loading indicator instead @Bonapara

Looking forward to getting your feedback
cc: @charlesBochet

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-06-03 12:12:04 +02:00
Sagar Hedaoo
52864889da
Updated Snackbar as shown in Figma Fixes #5666 (#5700)
<img width="282" alt="Screenshot 2024-06-01 at 1 07 16 AM"
src="https://github.com/twentyhq/twenty/assets/10000167/0b1cd2f5-9036-4a31-8dfa-b90972ebe1aa">


Updated the font weight and added Cancel label on the left of the icon
as shown in figma design.
Also, didn't increased the gap because it's already like the figma
design!
Let me know if you want more gap between title and description.

Closes https://github.com/twentyhq/twenty/issues/5666

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-06-03 12:05:04 +02:00
Sudarsh
c960d2e8ef
Incorrect Icon Width on Menu Items #5678 (#5688)
Fixes https://github.com/twentyhq/twenty/issues/5678
2024-05-31 18:40:23 +02:00
Thomas Trompette
9fd761dd10
Remove else if on position calculation (#5691)
As title
2024-05-31 14:31:37 +02:00
Thomas Trompette
fbd8714c76
Make positions possibly negatives (#5690)
Closes https://github.com/twentyhq/twenty/issues/5427
2024-05-31 14:17:49 +02:00
Thomas Trompette
fe941c64be
Build empty state for remote tables (#5652)
Remote tables could be in an empty state because:
- either we do not have data, which is normal
- either the connexion is broken (issue with the server, table requires
updates...)

Apollo throws errors but these will quickly disappear and do not provide
any tips to the user on how handle those.

This PR adds a new empty state placeholder for remote objects, that will
be display when the record list is empty. It will provide a link to the
settings page.

<img width="1512" alt="Capture d’écran 2024-05-30 à 11 49 33"
src="https://github.com/twentyhq/twenty/assets/22936103/fc2dd3cc-e90b-4033-b023-83ac9ff2a70b">
2024-05-31 11:24:42 +02:00
Marie
5e1dfde3e4
After createOneDbConnection mutation, update cache manually instead of using refetchQuery (#5684)
Closes #5057.

RefetchQuery is unreliable - [it won't be executed if the component is
unmounted](https://github.com/apollographql/apollo-client/issues/5419),
which is the case here because of the redirection that occurs after the
mutation.
We want to avoid using refetchQuery as much as possible, and write
directly in the cache instead.
2024-05-31 10:28:44 +02:00
Shashank Vishwakarma
c7f2150ac7
Fixed: In CSV import now users are able to come back to the previous step. (#5625)
Users now can make a back transition from the current step state.

- Added a `BackButton` component to `spreadsheet-import` in order to use
it within the step state components.
- Used the prebuilt `prevStep` from `useStepBar` and passed it as a prop
to the `Uploadflow` to get the previous state as activestep.
- Added a `previousState` to set the previous state with the required
key data.
- Added a `handleOnBack` function in `Uploadflow` to set the correct
state and call the `prevStep` function to make the transition.
- Added a callback function `onBack` and passed it as props to each step
state component.

fixes: #5564 



https://github.com/twentyhq/twenty/assets/140178357/be7e1a0a-0fb8-41f2-a207-dfc3208ca6f0

---------

Co-authored-by: Thomas Trompette <thomas.trompette@sfr.fr>
2024-05-30 18:43:56 +02:00
Aditya Pimpalkar
a12c1aad5e
fix: user has to login every time chrome sidepanel is opened (#5544)
We can pass the auth tokens to our front app via post message, which
will also allow us to pass route names to navigate on it
2024-05-30 12:58:45 +02:00
Indrakant D
d770e56e31
fix: Poor contrast on SlashMenu (#5342)
fixes
[#5304](https://github.com/twentyhq/twenty/issues/5304#issue-2280984063)

dark mode
<img width="1425" alt="Screenshot 2024-05-09 at 1 59 56 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/70230f9e-607a-462a-8823-db8350d86bc4">


<br>
<br>
Light mode
<img width="1448" alt="Screenshot 2024-05-09 at 2 01 06 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/523488a5-21de-4911-b11b-e28fba9adae6">

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-30 11:00:23 +02:00
martmull
9a23f9b322
4699 update the onboarding app placeholder (#5616)
## Before

![image](https://github.com/twentyhq/twenty/assets/29927851/e9055c16-eed3-48f1-a4e2-df115a6c2247)

## After

![image](https://github.com/twentyhq/twenty/assets/29927851/254c7573-81c7-487e-b653-5b0ba311cf9e)
2024-05-29 23:35:32 +02:00
Lucas Bordeau
bcb582ffa0
Fixed button icon bug (#5670)
There was a bug with the isEmpty variable actually being a function from
lodash instead of the result of `isFieldEmpty()`.
2024-05-29 21:29:33 +02:00
R894
df2b76ff6c
4848 - Update Checkbox component (#4883)
# Summary
* Add hover state which defaults to **false**
* Add disable state


![chrome_KV2AltSmBK](https://github.com/twentyhq/twenty/assets/54629307/976fba28-b975-4acc-9d06-c14c4fe339d8)


closes #4848

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-29 13:34:29 +02:00
Marie
5bb205bd6a
Fix update remote field metadata (#5638)
Closes #5610.

& update fetch-policy when fetching database on the remote databases
show page to get freshest status.
2024-05-28 18:01:05 +02:00
Thomas Trompette
ebb1aa0377
Add label to remote server (#5637)
Added label on remote server entity. 

Also added the possibility to update schema. 

<img width="688" alt="Capture d’écran 2024-05-28 à 15 36 31"
src="https://github.com/twentyhq/twenty/assets/22936103/c9786122-8459-4876-833e-c9a1d7d27829">
2024-05-28 15:54:57 +02:00
Sage Bain
443fb53158
Updated Past Events Font-Color to Primary for Visibility (#5572)
Issue: [#5164](https://github.com/twentyhq/twenty/issues/5164)

Updated font-color of the title of past calendar events to be primary to
improve visibility. Calendar event time font-color remains unchanged.

Before:

![image](https://github.com/twentyhq/twenty/assets/47053579/8556eefb-d79e-4924-a15b-1609c0720aa3)

After:

![image](https://github.com/twentyhq/twenty/assets/47053579/a2d3639c-0a04-4db6-998e-f76b01e1e392)

The year in month-year at the top of these screenshots also appears to
be in tertiary font-color which can be adjusted too if that feels not
visible enough.

---------

Co-authored-by: ktang520 <ktang520@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-27 22:18:12 +02:00
Piyush Yadav
ef64911e45
fix: Requests for new captcha token after a wrong password is entered. (#5614)
Fix issue where captcha did not reset after an incorrect password was
entered and invalid token error was thrown, ensuring users receive a new
captcha token on each attempt.

before:
![Screenshot 2024-05-27
191707](https://github.com/twentyhq/twenty/assets/72244570/7530c569-a3b5-46b9-96aa-b03c21f1e99a)

after: user can try again with a new captcha token and login smoothly
without encountering the invalid token error.
2024-05-27 18:06:34 +02:00
Marie
930237e778
Bump to version v0.12.1 (#5608) 2024-05-27 16:07:38 +02:00
Marie
f58c961d98
Remove feature flag for Links field (#5606) 2024-05-27 16:05:22 +02:00
Marie
857971458a
Bump version to v0.12.0 (#5604) 2024-05-27 15:16:50 +02:00
bosiraphael
1715aa8465
Remove hasCalendarEventStarted flaky test (#5603)
Remove hasCalendarEventStarted flaky test
2024-05-27 15:16:21 +02:00
martmull
2f52e0fdb6
5505 forgot password feature broken (#5602)
- add missing `excludedOperations` in
`packages/twenty-server/src/engine/middlewares/graphql-hydrate-request-from-token.middleware.ts`
- update generated graphql file
- Add missing redirection to index after password update
2024-05-27 15:13:11 +02:00
Lucas Bordeau
113dfba994
Disable perf stories in chromatic (#5597)
Disabled chromatic for performance stories.
2024-05-27 14:43:39 +02:00
Charles Bochet
56ef8fcff3
Fix missing avatar on People table (#5601)
As per title!
2024-05-27 14:42:45 +02:00
Lucas Bordeau
2c009afd36
Added RecordFieldValueSelectorContext (#5596)
Added RecordFieldValueSelectorContext on mock container so that new
record value using use-context-selector can work properly in fields
module.
2024-05-27 14:02:38 +02:00
Lucas Bordeau
3051f3a790
Fixed new record value context selector sync in activity drawer (#5594)
Forgot to add `<RecordValueSetterEffect recordId={...} />` effect
component for activity drawer during refactor.
2024-05-27 13:58:31 +02:00
Lucas Bordeau
8ee98e0fda
Fixed pending row edit mode (#5592)
This PR fixes creation on table.

With the recent optimization refactor, we now use a custom event to
trigger edit and soft focus mode on a table cell.

There's a specific case when we create a pending row to allow creating a
new record, where the custom event gets triggered before the cell
exists, so it cannot listen and put itself in edit mode.

The fix is passing down a new isPendingRow in the context, so the
identifier cell on a pending row can put itself in edit mode during its
first render.
2024-05-27 13:40:53 +02:00
Marie
2a1ea326d2
Fix SnackBar visual (#5569)
cf https://discord.com/channels/1130383047699738754/1243478998810497054
2024-05-27 12:15:57 +02:00
martmull
bcb5cf7ad7
Remove flash after create workspace (#5589)
## Before


https://github.com/twentyhq/twenty/assets/29927851/a6b4f580-4f01-4f5b-a023-f9fa0d9f9c28


## After


https://github.com/twentyhq/twenty/assets/29927851/2a1feb44-27ce-457d-86a2-eea46a313f98
2024-05-27 12:14:50 +02:00
Charles Bochet
1f9c340bc6
Fix record board broken position (#5588)
Position were not queries anymore while populating kanban board,
breaking the drag and drop feature
2024-05-27 11:50:19 +02:00
gitstart-twenty
10abd7f0ad
User & Metadata Loading (#5347)
### Description
User & Metadata Loading

### Refs
#4456

### Demo


https://github.com/twentyhq/twenty/assets/140154534/4c20fca6-feaf-45f6-ac50-6532d2ebf050


Fixes #4456

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-27 10:38:37 +02:00
gitstart-twenty
9c046dcfdb
Prefetch Skeleton Loading on Indexes and Shows (#5545)
### Description
Prefetch Skeleton Loading on Indexes and Shows

### Refs
#4458

### Demo

https://jam.dev/c/a1ad04e1-80b6-4b2a-b7df-373f52f4b169

https://jam.dev/c/c5038b97-2f18-4c29-8dee-18c09376e5ee

Fixes: #4458

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-27 09:56:08 +02:00
Abdullah
cfd83d6b8e
[UI] Remove theme constants from twenty-front and use the ones exported from twenty-ui. (#5558)
Some parts of the Frontend used theme constants exported from
`modules/ui` while other parts used theme constants exported from
`twenty-ui`.

This PR centralizes theme constants by removing them from `modules/ui`
completely.
2024-05-25 16:09:25 +02:00
Charles Bochet
9c325eb0ef
Fix opportunities board and CI (#5573)
RelationFieldDisplay was estabilishing a dependency on
RecordTableContext which is not right as FieldDisplay can be loaded
outside of RecordTable context

I'm using an util directly but understand this is a bit heavier than
before in term of performance. If we want to pre-compute this, we will
need to be a bit smarter.

Also the previous code based on fieldName was not right, we should check
relationObjectMetadataItem instead
2024-05-25 12:29:20 +02:00
brendanlaschke
1c867d49a1
Add Object Alternative view (#5356)
Current state:

<img width="704" alt="Bildschirmfoto 2024-05-11 um 17 57 33"
src="https://github.com/twentyhq/twenty/assets/48770548/c979f6fd-083e-40d3-8dbb-c572229e0da3">



I have some things im not really happy with right now:

* If I have different connections it would be weird to display a one_one
or many_one connection differently
* The edges overlay always at one hand at the source/target (also being
a problem with the 3 dots vs 1 dot)
* I would have to do 4 versions of the 3 dot marker variant as an svg
with exactly the same width as the edges wich is not as easy as it seems
:)
* The initial layout is not really great - I know dagre or elkjs could
solve this but maybe there is a better solution ...


If someone has a good idea for one or more of the problems im happy to
integrate them ;)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-25 10:38:27 +02:00
martmull
9080981990
5509 remove flash on intermediate verify step when sign in with sso (#5526)
- remove flash on /verify
- remove flash on signInUp
- remove useless redirections and hooks
- Remove DefaultHomePage component
- Move redirections to /objects/companies in PageChangeEffect
- add useShowAuthModal hooks and tests
- add usePageChangeEffectNaviteLocation hooks and tests
- fix refresh token expired produces blank screen
2024-05-25 10:36:59 +02:00
Lucas Bordeau
a0178478d4
Feat/performance-refactor-styled-component (#5516)
In this PR I'm optimizing a whole RecordTableCell in real conditions
with a complex RelationFieldDisplay component :
- Broke down getObjectRecordIdentifier into multiple utils
- Precompute memoized function for getting chip data per field with
useRecordChipDataGenerator()
- Refactored RelationFieldDisplay
- Use CSS modules where performance is needed instead of styled
components
- Create a CSS theme with global CSS variables to be used by CSS modules
2024-05-24 18:53:37 +02:00
Shashank Vishwakarma
3de5ed3427
Added: The support for CZK Currency (#5561)
Added the Czech Koruna currency support.
- Added the CZK to the currency code.
- Set the desired CZK icon to `TablerIcons` to use it within the
`twenty-ui`

fixes: #5530 

![Screenshot
(335)](https://github.com/twentyhq/twenty/assets/140178357/a19a60b8-2261-44b3-9ed2-5c35424631a1)
![Screenshot
(336)](https://github.com/twentyhq/twenty/assets/140178357/20944e43-901c-4dda-b986-a47763fb5f9b)
2024-05-24 18:11:08 +02:00
Thaïs
c7d61e183a
feat: simplify field preview logic in Settings (#5541)
Closes #5382

TODO:

- [x] Test all field previews in app
- [x] Fix tests
- [x] Fix JSON preview
2024-05-24 18:06:57 +02:00
Thaïs
736c79afde
fix: Links field fixes (#5565)
Related issue: #3607
2024-05-24 17:59:08 +02:00
Félix Malfait
fa3443c05b
Improve autoload (#5566)
Set a 1000px margin to start fetching more records before we hit the
bottom of the page, makes the scrolling experience a lot smoother :)
2024-05-24 17:58:37 +02:00
Thaïs
9ad3fb96b7
feat: move Snackbar to top of screen on mobile (#5567)
... and change SnackBar blur to medium.

@Bonapara Following
https://github.com/twentyhq/twenty/pull/5515#discussion_r1609618980

Related issue: https://github.com/twentyhq/twenty/issues/5383

<img width="386" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/de2f0be4-9d9c-4013-bed2-774e0599ce49">
2024-05-24 17:58:12 +02:00
Lucas Bordeau
de9321dcd9
Fixed sync between record value context selector and record store (#5517)
This PR introduces many improvements over the new profiling story
feature, with new tests and some refactor with main :
- Added use-context-selector for getting value faster in display fields
and created useRecordFieldValue() hook and RecordValueSetterEffect to
synchronize states
- Added performance test command in CI
- Refactored ExpandableList drill-downs with FieldFocusContext
- Refactored field button icon logic into getFieldButtonIcon util
- Added RelationFieldDisplay perf story
- Added RecordTableCell perf story
- First split test of useField.. hook with useRelationFieldDisplay()
- Fixed problem with set cell soft focus
- Isolated logic between display / soft focus and edit mode in the
related components to optimize performances for display mode.
- Added warmupRound config for performance story decorator
- Added variance in test reporting
2024-05-24 16:52:05 +02:00
Charles Bochet
82ec30c957
Expandable list remove anchor (#5559)
Deprecate anchorElement on ExpandableList to avoid props drilling. The
anchorElement should be the ExpandableList container itself
2024-05-24 12:26:42 +02:00
Thaïs
7f7ea59b51
refactor: reset field default value on type change in Settings (#5534)
Related issue: #5412

See https://github.com/twentyhq/twenty/pull/5436#discussion_r1609470484
for context.
2024-05-24 12:15:17 +02:00
Thomas Trompette
18fafbdeb5
Rename findAvailableTables endpoint (#5557)
As title
2024-05-24 10:57:46 +02:00
Marie
4bd0aafb8e
[fix] Update remote table sync status in cache after schema update (#5553)
Upon schema update, sync status can change from synced to non_synced in
case the update regards a table that was deleted. Let's update the sync
status too to avoid displaying the table as still synchronized.


https://github.com/twentyhq/twenty/assets/51697796/7ff2342b-ce9f-4179-9b76-940617cf1292
2024-05-24 10:20:08 +02:00
Jeet Desai
e00b19e4cc
Change email tab placeholder illustration (#5550)
Fixes #5502 


![image](https://github.com/twentyhq/twenty/assets/52026385/ca73add9-101a-4517-96d7-c8fde883c066)

![image](https://github.com/twentyhq/twenty/assets/52026385/120f495b-db07-49c8-a058-5b77b2e06c1c)
2024-05-23 18:26:08 +02:00
Marie
fe5b558477
[FE] Update remote table schema + refactor Tables list (#5548)
Closes #5062.

Refactoring tables list to avoid rendering all toggles on each sync or
schema update while using fresh data:
- introducing id for RemoteTables in apollo cache
- manually updating the cache for the record that was updated after a
sync or schema update instead of fetching all tables again
2024-05-23 17:00:24 +02:00
Thaïs
8019ba8782
feat: implement new SnackBar design (#5515)
Closes #5383

## Light theme

<img width="905" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab0683c5-ded3-420c-ace6-684d38794a2d">

## Dark theme

<img width="903" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/4e43ca35-438d-4ba0-8388-1f061c6ccfb0">
2024-05-23 12:19:50 +02:00
Charles Bochet
7b1bea3a8a Release patch v0.11.3 2024-05-23 08:41:37 +02:00
Abdullah
b8eef21343
[UI] Extract our ColorSample and Tag components from twenty-front to twenty-ui. (#5543)
Two more components extracted out of twenty-front: `ColorSample` and
`Tag`.
2024-05-23 07:46:31 +02:00
Thaïs
04bf697b25
feat: add feature flag to activate Links field creation (#5535)
Related issue: #3607
2024-05-22 18:06:32 +02:00
Thomas Trompette
2e79bcc70b
Sync stripe tables (#5475)
Stripe tables do not support `hasNextPage` and `totalCount`. This may be
because of stripe wrapper do not properly support `COUNT` request.
Waiting on pg_graphql answer
[here](https://github.com/supabase/pg_graphql/issues/519).

This PR:
- removes `totalCount` and `hasNextPage` form queries for remote
objects. Even if it works for postgres, this may really be inefficient
- adapt the `fetchMore` functions so it works despite `hasNextPage`
missing
- remove `totalCount` display for remotes
- fix `orderBy`

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-22 11:20:44 +02:00
Thaïs
35c1f97511
perf: use Nx cache for Chromatic script (#5457)
Makes sure the `twenty-front:chromatic:ci` task in the CI job
`front-chromatic-deployment` reuses the cache of the Storybook built in
the CI job `front-sb-build` instead of re-building Storybook so
Chromatic is deployed faster in the CI.
2024-05-22 11:18:16 +02:00
Thaïs
474dfd7bd8
fix: fix Apollo client cache update error for Links field (#5473)
Fixes #5437
2024-05-22 10:55:24 +02:00
Abdullah
d1cbd709bd
Extract typography components from twenty-front to twenty-ui. (#5466)
Removed the following components from twenty-front and moved them to
twenty-ui.
- H1Title.
- H2Title.
- H3Title.

Moving components in smaller chunks to ease the process of resolving
conflicts.

<img width="1255" alt="image"
src="https://github.com/twentyhq/twenty/assets/125115953/a3953659-5dfd-4d03-a6de-50b064129d55">

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-22 10:52:35 +02:00
Thaïs
e2b48e2c4e
feat: edit link in Links field (#5447)
Closes #5376
2024-05-22 10:42:08 +02:00
Thaïs
47a6146dd0
feat: set primary link in Links field (#5429)
Closes #5375

<img width="381" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/d87773df-c685-466b-ae35-a8349f79df48">

_____

~~Note that I ugraded `@apollo/client` to v3.10.4 because current
version is causing an error when trying to write the Links field in the
cache in `updateRecordFromCache` (`TypeError: Cannot convert object to
primitive value`). After upgrade, the error is gone but console still
prints a warning (here the custom object name is `Listing` and the Links
field name is `website`):~~

<img width="964" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/834b8909-e8dc-464a-8c5a-6b7e4c964a7f">

~~It might be because the Links field seems to somehow have a
`__typename` property in Apollo's cache, so Apollo considers it as a
record and tries to match the object's cache with an id, but the Links
field value has no id so it can't find it.
We might want to find where this `__typename` is added and remove it
from the Links object in the cache.~~

Edit: will fix this in another PR as upgrading `@apollo/client` +
`apollo-upload-client` seems to break types and/or tests. Related issue:
[#5437](https://github.com/twentyhq/twenty/issues/5437)
2024-05-22 10:32:37 +02:00
martmull
2386191d8e
Fix missing logo at sign-in-up (#5525)
### Before

![image](https://github.com/twentyhq/twenty/assets/29927851/91f94c5f-e337-4163-b858-3358032a12bd)

### After

![image](https://github.com/twentyhq/twenty/assets/29927851/77b88ea1-514a-4471-a28d-4c989cc5d9c4)
2024-05-22 09:55:29 +02:00
Thaïs
944b2b0254
fix: reset default value on field type switch in Settings/Data Model … (#5436)
…field form

Closes #5412
2024-05-22 09:53:15 +02:00
Thaïs
48003887ce
feat: remove a link from a Links field (#5313)
Closes #5117

TO FIX in another PR: right now, the "Vertical Dots" LightIconButton
inside the Dropdown menu sometimes needs to be clicked twice to open the
nested dropdown, not sure why 🤔 Maybe an `event.preventDefault()` is
needed somewhere?

<img width="369" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/dd0c771a-c18d-4eb2-8ed6-b107f56711e9">

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-22 09:39:21 +02:00
Marie
3deda2f29a
Update foreign table to distant table schema (#5508)
Closes #5069 back-end part

And:
- do not display schemaPendingUpdates status on remote server lists as
this call will become too costly if there are dozens of servers
- (refacto) create foreignTableService

After this is merged we will be able to delete remoteTable's
availableTables column
2024-05-21 21:25:38 +02:00
gitstart-twenty
36b467d301
Fix storybook tests (#5487)
Fixes #5486

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-21 20:24:08 +02:00
Marie
0d16051ded
[fix] Re-introduce beforeUpdateOneObject hook (#5495)
... and disable name edition in object edition form. This feature will
be introduced by #5491
2024-05-21 10:46:49 +02:00
Indrakant D
737fffefbd
Fix: danger font color values & acc. to design specs (#5344)
fixes: #5325

changes done (commits in order):

1. **Fixed fontLight & fontDark 'danger' color as per design spec**:
changed theme.font.color.danger to match the disabled color theme (for
light and dark) as followed by the BorderDark and BorderLight. Use the
updated colors for Buttons

2. **Replace theme.font.color.danger with theme.color.red (5 changed
files)**: Since `theme.font.color.danger` has now been updated to
contain the disabled button color values, we use the `theme.color.red`
color in all the places using `theme.font.color.danger` as it contains
same value that was used to be of `theme.font.color.danger` before.

3. **fixed hover color of StyledConfirmationButton in
ConfirmationModal**: issue can be seen when going to /settings/workspace
and trying to hover on delete the workspace button in dark mode. fixed
with this commit.

**Important Note**: The files
`/twenty-front/src/modules/ui/theme/constants/FontLight.ts` and
`/twenty-front/src/modules/ui/theme/constants/FontDark.ts` **are of no
use** as theme for the entire 'twenty-front' and
'twenty-chrome-extension' packages use the same files from '@/ui/theme'
(twenty-ui package)

dark mode :
<img width="987" alt="Screenshot 2024-05-09 at 9 14 35 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/75fe3972-0e8a-41f6-90a1-09bfcd013e72">

when disabled:
<img width="1098" alt="Screenshot 2024-05-09 at 9 13 46 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/5caab8b5-47ba-43e5-90cd-a41a1f690ca0">

on hover:
<img width="1052" alt="Screenshot 2024-05-09 at 9 14 05 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/58de3df6-ed77-4aad-84fc-67b01154b493">

<br>

<br>

light mode (when disabled):
<img width="918" alt="Screenshot 2024-05-09 at 9 13 14 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/18228783-d6c7-44a6-9fce-00053bb35ef2">

on hover:
<img width="983" alt="Screenshot 2024-05-09 at 9 14 18 PM"
src="https://github.com/twentyhq/twenty/assets/60315832/6df99f12-5767-4136-80c9-5d8883ac8e00">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-20 16:59:01 +02:00
Thomas Trompette
4d479ee8ea
Remove relations for remotes (#5455)
For remotes, we will only create the foreign key, without the relation
metadata. Expected behavior will be:
- possible to create an activity. But the remote object will not be
displayed in the relations of the activity
- the remote objects should not be available in the search for relations

Also switched the number settings to an enum, since we now have to
handle `BigInt` case.

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-20 16:37:35 +02:00
martmull
88f5eb669e
4689 multi workspace i should be able to accept an invite if im already logged in (#5454)
- split signInUp to separate Invitation from signInUp
- update redirection logic
- add a resolver for userWorkspace
- add a mutation to add a user to a workspace
- authorize /invite/hash while loggedIn
- add a button to join a workspace

### Base functionnality

https://github.com/twentyhq/twenty/assets/29927851/a1075a4e-a2af-4184-aa3e-e163711277a1

### Error handling

https://github.com/twentyhq/twenty/assets/29927851/1bdd78ce-933a-4860-a87a-3f1f7bda389e
2024-05-20 12:11:38 +02:00
ktang520
1ceeb68da8
Changed record chip functionality from onClick to anchor tag (#5462)
[#4422](https://github.com/twentyhq/twenty/issues/4422)

Demo:



https://github.com/twentyhq/twenty/assets/155670906/f8027ab2-c579-45f7-9f08-f4441a346ae7



Within the demo, we show the various areas in which the Command/CTRL +
Click functionality works. The table cells within the People and
Companies tab open within both the current tab and new tab due to
unchanged functionality within RecordTableCell. We did this to ensure we
could get a PR within by the end of the week.

In this commit, we ONLY edited EntityChip.tsx. We did this by:

- Removing useNavigate() and handleLinkClick/onClick functionality

- Wrapping InnerEntityChip in an anchor tag

This allowed for Command/CTRL + Click functionality to work. Clickable
left cells on tables, left side menu, and data model navigation
files/areas DID NOT get updated.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-20 11:31:39 +02:00
H0onnn
81e8f49033
Feat : Change title color of release page in dark mode (#5467)
## Issue

- close #5459 

## Work Detail

Change title color of release page in dark mode.

I worked using the useColorScheme and useSystemColorSheme hooks, but if
there is a better way, please recommend it.

## Before
<img width="606" alt="image"
src="https://github.com/twentyhq/twenty/assets/116232939/f5c05360-f1d5-4701-b17d-e3e8a1db65fa">


## After
<img width="565" alt="image"
src="https://github.com/twentyhq/twenty/assets/116232939/5f9460d3-db62-461f-b7c2-659a4b687ba9">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-19 17:26:29 +02:00
gitstart-app[bot]
0e525caf01
Implement <ScrollRestoration /> (#5086)
### Description

Implement &lt;ScrollRestoration /&gt;

### Refs


[https://github.com/twentyhq/twenty/issues/4357](https://github.com/twentyhq/twenty/issues/4183)

### Demo


https://github.com/twentyhq/twenty/assets/140154534/321242e1-4751-4204-8c86-e9b921c1733e

Fixes #4357

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: RubensRafael <rubensrafael2@live.com>
2024-05-17 16:36:28 +02:00
Thaïs
992602b307
fix: fix storybook build cache not being used by tests in CI (#5451)
TL;DR:
- removed `--configuration={args.scope}` from `storybook:static:test`
for the `storybook:static` part, as it was making `front-sb-test` jobs
in CI not reuse the cache from the `front-sb-build` job and re-build
storybook every time.
- replaced it with a new `test` configuration which optimizes storybook
build for tests and builds storybook 2x faster.

## Fix storybook:build cache usage in CI

`storybook:static:test` executes two scripts in parallel:
1. `storybook:static`, which depends on `storybook:build`
1.a. it builds storybook first with `storybook:build`, the output
directory is `storybook-static`.
1.b. then it launches an `http-server`, using what has been built in
`storybook-static`
2. `storybook:test` to execute tests (needs the storybook http-server to
be running)

When passing `--configuration=pages` or `--configuration=modules` to
`storybook:static` from step 1, those configurations are passed to the
`storybook:build` script from step 1.a as well.

But for Nx `storybook:build` and `storybook:build --configuration=pages`
(or `modules`) are not the same command, therefore one does not reuse
the cache of the other because they could output completely different
things.

As `front-sb-test` jobs are passing `--configuration={args.scope}` to
`storybook:static`, the cache of the previously executed
`storybook:build` (from `front-sb-build`) is not reused and therefore
each job re-builds Storybook with its own scope, which increases CI
time.

### Solution

- Removed scope configurations from `storybook:static` and
`storybook:build` scripts to avoid confusion.
- `storybook:test` and `storybook:dev` can keep scope configurations as
they can be useful and this doesn't impact storybook build cache in CI.

### Improve Storybook build time for testing

Added the `test` configuration to `storybook:build` and
`storybook:static` which makes Storybook build time 2x faster. It
disables addons that slow down build time and are not used in tests.
2024-05-17 16:05:31 +02:00
Marie
d741f4a5bd
Minor refacto and fixes on Remotes updates (#5438)
In this PR

- Code refactoring
- v0 of adding "updates available" info in Connection sync status
<img width="835" alt="Capture d’écran 2024-05-16 à 17 02 07"
src="https://github.com/twentyhq/twenty/assets/51697796/9674d3ca-bed2-4520-a5a6-ba37bc242d06">

- fix distant table columns with not-camel case names are always
considered as new
2024-05-16 17:31:34 +02:00
Joe S
9bc9513845
Edit opacity from 0.8 to 0.5 and remove forBackdropFilter (#5291)
Update for #4836 

- edit primary and secondary transparency opacities from 0.8 to 0.5
- remove forBackdropFilter from themes
- update components referencing transparency/primary and
transparency/secondary to have the following backdrop-filter: blur(12px)
saturate(200%) contrast(50%) brightness(130%)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-16 17:19:27 +02:00
Fabio Nettis
a75eb0a569
feat: add creation date to notes panel (#5432)
## Description

Adds a view for creation date and author to notes and tasks panel. Here
is a preview of the new `ActivityCreationDate` component:


![image](https://github.com/twentyhq/twenty/assets/36916632/8adfa584-5f0c-464a-9d69-753f89c19c28)

Closes #5424

### Type of change

<!-- Please delete options that are not relevant. -->

- [x] New feature (non-breaking change which adds functionality)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-16 17:09:46 +02:00
Charles Bochet
f31b2c2963
Fix turnstile captcha invalid (#5442)
Signing in is a two steps process:
- Checking if the user email is already used
- Checking if the email + password is correct

Those two steps need a captchaToken to be valid. Unfortunately, from
Cloudflare Turnstile doc:
`A token can only be validated once and cannot be consumed twice. Once a
token has been issued, it can be validated within the next 300 seconds.
After 300 seconds, the token is no longer valid and another challenge
needs to be solved`

So we need to generate a new token at each step instead of re-using the
same
2024-05-16 16:30:10 +02:00
martmull
afad993bb3
Fix main (#5435)
- fix lint issue
- fix Apply Cors exception handler (do not work when logged out)
2024-05-16 15:29:27 +02:00
Charles Bochet
6bde0ae258 Disable chromatic for performance stories 2024-05-15 23:09:17 +02:00
Charles Bochet
040ec9165d
Try fix tests (#5431)
As per title!
2024-05-15 22:54:51 +02:00
Marie
63387424c3
Fix transliteration for metadata + transliterate select options (#5430)
## Context 
Fixes #5403

Transliteration is now integrated to form validation through the schema.
While it does not impede inputting an invalid value, it impedes
submitting a form that will fail as the transliteration is not possible.
Until then we were only performing the transliteration at save time in
the front-end, but it's best to provide the information as soon as
possible. Later we will add helpers to guide the user (eg "This name is
not valid": https://github.com/twentyhq/twenty/issues/5428).

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-15 21:43:58 +02:00
mritosa
e9a7a8a4a3
Fix missing team member images in calendar event (#5414)
### Work
Fixed issue: #5308 
### Before
Team member images are absent from Calendar events participant chips.

![Before](https://github.com/twentyhq/twenty/assets/100703401/bd3408ad-4a07-430e-ba23-83cd0775492a)
### After
<img width="383" alt="Screenshot 2024-05-14 at 10 53 24"
src="https://github.com/twentyhq/twenty/assets/100703401/b65efe8a-64de-4214-a60a-ee87d235953a">

### Fix explained
Redefined recordGqlField to fech Person and WorkspaceMember

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-15 19:14:57 +02:00
gitstart-twenty
de228be5ca
AAU I want to re-order my views with drag & drop (#5002)
### Description
I want to re-order my views with drag & drop

### Refs
#4782 

### Demo
https://jam.dev/c/699ece8a-0467-494a-b9a3-faf666ee9c93

Fixes #4782

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
Co-authored-by: FellipeMTX <fellipefacdir@gmail.com>
Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-15 17:57:17 +02:00
Fabio Nettis
6898c1e4d8
fix: resolve issues with edit input offset (#5426)
## Description

This PR fixes a display issue when editing the company name or the name
of a person where the edit input would be offset to the left instead of
being in the middle.


![image](https://github.com/twentyhq/twenty/assets/36916632/beb91dc1-2d3c-46a5-93aa-f8189913fece)

Fixes #5416

### Type of change

<!-- Please delete options that are not relevant. -->

- [x] Bug fix (non-breaking change which fixes an issue)

## Checklist

- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] New and existing unit tests pass locally with my changes
- [x] Any dependent changes have been merged and published in downstream
modules
2024-05-15 16:26:14 +02:00
Thaïs
602d5422a2
feat: display Links field as Expandable List (#5374)
Closes #5114
2024-05-15 15:52:23 +02:00
Marie
38eb293b3c
Compare distant tables schema with remote tables schema (#5413)
Closes #4532 and part of #5062
2024-05-15 15:47:54 +02:00
Lucas Bordeau
cfacdfce60
Generic Profiling story to wrap any component (#5341)
This PR introduces a Profiling feature for our story book tests.

It also implements a new CI job : front-sb-test-performance, that only
runs stories suffixed with `.perf.stories.tsx`

## How it works 

It allows to wrap any component into an array of React Profiler
components that will run tests many times to have the most replicable
average render time possible.

It is simply used by calling the new `getProfilingStory` util.

Internally it creates a defined number of tests, separated by an
arbitrary waiting time to allow the CPU to give more stable results.

It will do 3 warm-up and 3 finishing runs of tests because the first and
last renders are always a bit erratic, so we want to measure only the
runs in-between.

On the UI side it gives a table of results : 

<img width="515" alt="image"
src="https://github.com/twentyhq/twenty/assets/26528466/273d2d91-26da-437a-890e-778cb6c1f993">

On the programmatic side, it stores the result in a div that can then be
parsed by the play fonction of storybook, to expect a defined threshold.

```tsx
play: async ({ canvasElement }) => {
    await findByTestId(
      canvasElement,
      'profiling-session-finished',
      {},
      { timeout: 60000 },
    );

    const profilingReport = getProfilingReportFromDocument(canvasElement);

    if (!isDefined(profilingReport)) {
      return;
    }

    const p95result = profilingReport?.total.p95;

    expect(
      p95result,
      `Component render time is more than p95 threshold (${p95ThresholdInMs}ms)`,
    ).toBeLessThan(p95ThresholdInMs);
  },
```
2024-05-15 13:50:02 +02:00
Vinod Rathod
8842292196
Fixed left padding for switcher icon on the table checkboxes #4351 (#4963)
Closes #4351  - Fixed spacing issue in TopBar file.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-14 18:28:13 +02:00
Anchit Sinha
ce195826f5
4599-feat(front): Add Copy Button to Floating Inputs (#4789)
Closes #4599 

**Changes:**
- Added copy button to floating inputs of Text, Number, Phone, Link and
Email fields.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: Weiko <corentin@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-14 17:02:53 +02:00
gitstart-twenty
1bc9b780e5
Show Data Skeleton Loading (#5328)
### Description

Show Data Skeleton loading

### Refs

#4460

### Demo

Figma:
https://www.figma.com/file/xt8O9mFeLl46C5InWwoMrN/Twenty?type=design&node-id=25429-70096&mode=design&t=VRxtgYCKnJkl2zpt-0

https://jam.dev/c/178878cb-e600-4370-94d5-c8c12c8fe0d5

Fixes #4460

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Matheus <matheus_benini@hotmail.com>
2024-05-14 11:58:30 +02:00
Thomas Trompette
de438b0171
Add stripe connection option (#5372)
- Refactor creation and edition form so it handles stripe integration
and not only postgres
- Add a hook `useIsSettingsIntegrationEnabled` to avoid checking feature
flags everywhere
- Add zod schema for stripe

<img width="250" alt="Capture d’écran 2024-05-13 à 12 41 52"
src="https://github.com/twentyhq/twenty/assets/22936103/a77e7278-5d79-4f95-bddb-ae9ddd1426eb">
<img width="250" alt="Capture d’écran 2024-05-13 à 12 41 59"
src="https://github.com/twentyhq/twenty/assets/22936103/d617dc6a-31a4-43c8-8192-dbfb7157de1c">
<img width="250" alt="Capture d’écran 2024-05-13 à 12 42 08"
src="https://github.com/twentyhq/twenty/assets/22936103/c4e2d0e4-f826-436d-89be-4d1679a27861">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-13 18:00:13 +02:00
Marie
b9154f315e
Enable deletion of relation fields (#5338)
In this PR
1. Enable deletion of relation fields in the product and via the api
(migration part was missing in the api)
3. Change wording, only use "deactivate" and "delete" everywhere (and
not a mix of the two + "disable", "erase")
2024-05-13 17:43:51 +02:00
Thomas Hillesøy
92acfe57a1
feat: Currencies NOK and SEK (#5359)
Related to #5351 and #5353 

Adding both currencies NOK and SEK, using icon
https://tabler.io/icons/icon/currency-krone-swedish

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-13 09:55:57 +02:00
Mohamed Muhsin
321ce72ec7
Add new Currencies with Corresponding Icons (#5353)
### **Description**
Add 3 new currencies

### **Refs**
https://github.com/twentyhq/twenty/issues/5351

### **Demo** 
<img width="678" alt="Screenshot 2024-05-11 at 1 30 55 AM"
src="https://github.com/twentyhq/twenty/assets/62111075/cc88ba46-cc5a-41d6-baf8-c28851c629ae">
2024-05-13 08:16:51 +02:00
brendanlaschke
eb2b89694a
Releases page (#5346)
closes #4103 

<img width="696" alt="Bildschirmfoto 2024-05-10 um 08 16 19"
src="https://github.com/twentyhq/twenty/assets/48770548/e34cd348-2522-408c-886c-636595292e0f">
2024-05-13 08:14:47 +02:00
Thaïs
0fb416d17c
fix: fix field select options positions after option removal (#5350)
- Adds an util `toSpliced`. We cannot used the native Javascript
`Array.prototype.toSpliced` method as Chromatic servers don't support
it.
- Makes sure Select field options have sequential positions after
removing an option (form validation schema checks that positions are
sequential and considers options invalid otherwise).
2024-05-10 18:31:22 +02:00
Marie
72521d5554
Disable save button while submitting form in settings (#5352)
as per title
2024-05-10 18:18:39 +02:00
Marie
ae0e31abc7
Bump versions to 0.11.2 (#5349) 2024-05-10 13:56:41 +02:00
Marie
999a66882d
[fix] Do not stringify json field value if null (#5348)
as per title 


https://github.com/twentyhq/twenty/assets/51697796/74ff0185-f20c-4ff1-9d89-3078063f23e1
2024-05-10 13:00:24 +02:00
Charles Bochet
8590bd7227
Refactor default value for select (#5343)
In this PR, we are refactoring two things:
- leverage field.defaultValue for Select and MultiSelect settings form
(instead of option.isDefault)
- use quoted string (ex: "'USD'") for string default values to embrace
backend format

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-05-10 10:26:46 +02:00
Thaïs
7728c09dba
fix: fix several field bugs (#5339)
After discussing with @charlesBochet, several fixes are needed on
fields:
- [x] Disable Boolean field `defaultValue` edition for now (On
`defaultValue` update, newly created records are not taking the updated
`defaultValue` into account. Setting the `defaultValue` on creation is
fine.)
- [x] Disable Phone field creation for now
- [x] For the Person object, display the "Phone" field as a field of
type Phone (right now its type is Text; later we'll migrate it to a
proper Phone field).
- [x] Fix RawJson field display (displaying `[object Object]` in Record
Table cells).
- [x] In Settings/Data Model, on Relation field creation/edition,
"Object destination" select is not working properly if an object was not
manually selected (displays Companies by default but creates a relation
to another random object than Companies).
2024-05-09 01:56:15 +02:00
Thaïs
005045c596
fix: fix Settings field form validation for certain field types (#5335)
Related to #4295

Following #5326, field types other than:
- `FieldMetadataType.Boolean`
- `FieldMetadataType.Currency`
- `FieldMetadataType.Relation`
- `FieldMetadataType.Select`
- `FieldMetadataType.MultiSelect`

Cannot be saved as they are not included in the form validation schema.
This PR makes sure they are included and can therefore be
created/edited.
2024-05-08 12:13:34 +02:00
Charles Bochet
863554bb13
Fix storybook (#5334)
Fixing the last broken stories, tests should be back to green!
2024-05-08 09:28:28 +02:00
Indrakant D
770ee11b9c
fix: Blue Button Secondary Color Issue in Dark Mode (#5333)
fixes
[#5305](https://github.com/twentyhq/twenty/issues/5305#issue-2280997523)

light mode:

<img width="738" alt="Screenshot 2024-05-08 at 2 24 41 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/de01bbfa-6b54-4149-9930-b38840483ddf">

<br>
<br>

dark mode

<img width="735" alt="Screenshot 2024-05-08 at 2 24 55 AM"
src="https://github.com/twentyhq/twenty/assets/60315832/7c2bbc3e-e999-42ff-a320-8bf84bce8384">
2024-05-08 08:53:26 +02:00
Charles Bochet
eef497cb57
Fix front jest tests (#5331) 2024-05-08 01:49:49 +02:00
Thaïs
bb995d5488
refactor: use react-hook-form for Field type config forms (#5326)
Closes #4295

Note: for the sake of an easier code review, I did not rename/move some
files and added "todo" comments instead so Github is able to match those
files with their previous version.
2024-05-07 21:07:56 +02:00
Thaïs
b7a2e72c32
fix: fix storybook pages tests coverage (#5319) 2024-05-07 21:05:45 +02:00
Charles Bochet
ce4e78aa85
Fix Rest API id UUID error (#5321)
A user has reported an issue with REST API.
We have recently migrated the graphql IDs from UUID to ID type. As Rest
API is leveraging the graphql API under the hood, the Rest API query
builder should be updated accordingly
2024-05-07 21:04:45 +02:00
Marie
7c3e82870c
[fix] Increment cache version after object/field/relation update (#5316)
Fixes #5276.

Updates were not triggering a cache version incrementation because they
do not trigger migrations while that is where the caching version logic
was.
We have decided to move the cache incrementation logic to the services.
2024-05-07 16:30:25 +02:00
Thaïs
b0d1cc9dcb
feat: add links to Links field (#5223)
Closes #5115, Closes #5116

<img width="242" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/ab78495a-4216-4243-8de3-53720818a09b">

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-07 15:05:18 +02:00
gitstart-twenty
d10efb15d5
Add unit tests on object record mutation and query hooks (#5014)
### Description
Add unit tests on object record mutation and query hooks

### Refs
#4884

### Demo
![Screenshot 2024-04-18 at 15 16
19](https://github.com/twentyhq/twenty/assets/140154534/c75f716a-725e-43eb-a703-3db29065fb18)

Fixes #4884

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Thiago Nascimbeni <tnascimbeni@gmail.com>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-07 14:04:55 +02:00
Thaïs
d0759ad7cc
refactor: use react-hook-form to validate Settings/DataModel/Field (#4916)
Closes #4295
2024-05-07 11:44:46 +02:00
Sean Hellwig
5f467ab5ca
Removes erroneous debugger call in twenty-front (#5311)
Erroneous debugger call throws an error in twenty-front app console

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 19:45:14 +02:00
Charles Bochet
2c9f50ecb1
Fix enum defaultValue issues (#5307)
This PR fixes several issues:
- enum naming should be: {tableName}_{fieldName}_enum and respecting the
case
- defaultValue format handled in the FE should respect the one in the BE

In my opinion we should refactor the defaultValue:
- we should respect backend format: "'myDefault'" for constant default
and "0" for float, "now" for expressions, "true" for booleans. we can
rename it to defaultValueExpression if it is more clear but we should
not maintain a parallel system
- we should deprecate option: isDefaultValue which is confusing
- we should re-work backend to have a more unified approach between
fields and avoid having if everywhere about select, multiselect, and
currency cases. one unified "computeDefaultValue" function should do the
job

What is still broken:
- currency default Value on creation. I think we should do the refactor
first
- select default value edition.
These cases do not break the schema but are ignored currently
2024-05-06 17:00:38 +02:00
Pacifique LINJANJA
ff77a4ee21
Feat/migrate password reset token to app token table (#5051)
# This PR

- Fix #5021 
- Migrates `passwordResetToken` and `passwordResetTokenExpiresAt` fields
from `core.users` to `core.appToken`
- Marks those fields as `deprecated` so we can remove them later if we
are happy with the transition -- I took this decision on my own,
@FellipeMTX let me know what you think about it, we can also remove them
straight away if you think it's better
- Fixed the `database:migration` script from the `twenty-server` to:
```json
    "database:migrate": {
      "executor": "nx:run-commands",
      "dependsOn": ["build"], // added this line
      "options": {
        "cwd": "packages/twenty-server",
        "commands": [
          "nx typeorm -- migration:run -d src/database/typeorm/metadata/metadata.datasource",
          "nx typeorm -- migration:run -d src/database/typeorm/core/core.datasource"
        ],
        "parallel": false
      }
    },
```
The migration script wasn't running because the builds were not executed
- [x] Added unit tests for the token.service file's changes

Looking forward to hearing feedback from you

cc: @charlesBochet

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-05-06 15:30:03 +02:00
Orinami Olatunji
a1c95b92ab
feat: add sign out and book a call buttons to "Choose your plan" page (#5292)
Resolves #5281

<img width="399" alt="buttions-light"
src="https://github.com/twentyhq/twenty/assets/16918891/d1a0ba4e-696e-476b-a792-01ae19a06a55">
<img width="390" alt="buttons-dark"
src="https://github.com/twentyhq/twenty/assets/16918891/40bea83b-bc32-45ea-a522-ecf8239cfe51">
2024-05-06 10:48:34 +02:00
martmull
77c0dee846
Add missing info from verify mutation (#5283)
Fix wrong error billing message
2024-05-04 15:21:37 +02:00
Thaïs
fc87a51acf
fix: fix storybook:build memory allocation error in CI (#5284) 2024-05-03 19:19:21 +02:00
Charles Bochet
839a7e2a10
Bump versions to 0.11 (#5289)
As per title! 
Bumping to 0.11.1 as we have already merged a few minor upgrades on top
of 0.11
2024-05-03 19:11:03 +02:00
Charles Bochet
6fda55609f
Fix Filtered index view infinite re-render (#5286)
The whole viewBar component was re-rendered on view changes which was
introducing performance issue. The need was to compute page title, this
should be done in a lower level component
2024-05-03 19:10:55 +02:00
Charles Bochet
a750901582
Remove Feature Flag on Calendar (#5288)
Remove Calendar feature Flag!
2024-05-03 19:10:33 +02:00
Thomas Trompette
a5a9e0e238
Remove isMultiSelect feature flag (#5280)
As title

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-03 16:30:58 +02:00
Thomas Trompette
5285a428d1
Fix export with relations (#5279)
As title. Only relations are exported right now

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-03 16:14:37 +02:00
Weiko
2a0c74ab0f
[calendar] Fix calendar sync status (#5272)
## Context
There is no calendarChannel syncStatus column compared to the
messageChannel table. In the meantime, we are trying to infer its status
based on the fact that the connection hasn't failed and the sync is
enabled
2024-05-03 15:32:34 +02:00
martmull
87994c26ff
4900 multi select field front implement expanded cells (#5151)
Add expanded cell


https://github.com/twentyhq/twenty/assets/29927851/363f2b44-7b3c-4771-a651-dfc4014da6ac


![image](https://github.com/twentyhq/twenty/assets/29927851/741bb0f9-fd1e-4a38-8b0e-71e144376876)
2024-05-03 15:03:06 +02:00
Thaïs
1351a95754
fix: fix storybook coverage task (#5256)
- Fixes storybook coverage command: the coverage directory path was
incorrect, but instead of failing `storybook:test --configuration=ci`,
it was hanging indefinitely.
- Switches back to `concurrently` to launch `storybook:static` and
`storybook:test` in parallel, which allows to use options to explicitly
kill `storybook:static` when `storybook:test` fails.
- Moves `storybook:test --configuration=ci` to its own command
`storybook:static:test`: used in the CI, and can be used locally to run
storybook tests without having to launch `storybook:dev` first.
- Creates command `storybook:coverage` and enables cache for this
command.
- Fixes Jest tests that were failing.
- Improves caching conditions for some tasks (for instance, no need to
invalidate Jest test cache if only Storybook story files were modified).
2024-05-03 14:59:09 +02:00
Weiko
50421863d4
Fix filter transform with logic operators (#5269)
Various fixes

- Remote objects are read-only for now, we already hide and block most
of the write actions but the button that allows you to add a new record
in an empty collection was still visible.
- CreatedAt is not mandatory on remote objects (at least for now) so it
was breaking the show page, it now checks if createdAt exists and is not
null before trying to display the human readable format `Added x days
ago`
- The filters are overwritten in query-runner-args.factory.ts to handle
NUMBER field type, this was only working with filters like
```
      {
        "id": {
          "in": [
            1
          ]
        }
```
but not with more depth such as 
```
    "and": [
      {},
      {
        "id": {
          "in": [
            1
          ]
        }
      }
    ]
 ```
- Fixes CREATE FOREIGN TABLE raw query which was missing ",".
2024-05-03 14:52:20 +02:00
Thomas Trompette
f9c19c839b
Build stripe integration on backend side (#5246)
Adding stripe integration by making the server logic independent of the
input fields:
- query factories (remote server, foreign data wrapper, foreign table)
to loop on fields and values without hardcoding the names of the fields
- adding stripe input and type
- add the logic to handle static schema. Simply creating a big object to
store into the server

Additional work:
- rename username field to user. This is the input intended for postgres
user mapping and we now need a matching by name

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-05-02 17:13:15 +02:00
Thaïs
5128ea3ffb
fix: fix storybook build script not found by Chromatic (#5235) 2024-05-02 16:15:36 +02:00
Charles Bochet
f802964de4 Bump to 0.10.6 2024-05-02 15:55:11 +02:00
Weiko
8d90c60ada
[calendar] hide calendar settings until implemented (#5252)
## Context
Those settings are not implemented yet, we would like to move them to a
different page as well.
In the meantime, we are hiding them since we plan to launch calendar in
the next release and this won't be implemented before.

We will implement it in this
https://github.com/twentyhq/twenty/issues/5140
2024-05-02 15:47:43 +02:00
Marie
1da64c7715
[feat] Minor updates to the edit db connection page (#5250)
- Add placeholders in db connection edit page
- Fix icon alignement and size (should not change) in Info banner
2024-05-02 15:25:54 +02:00
Charles Bochet
27a3d7ec27 Bump to 0.10.5 2024-05-02 11:00:24 +02:00
gitstart-app[bot]
268c6b44d9
Enable phone field type (#5052)
### Description

 Enable phone field type

### Refs

https://github.com/twentyhq/twenty/issues/2700

### Demo


https://github.com/twentyhq/twenty/assets/140154534/e9810718-9916-4ad4-a080-4d718777de15

Fixes #2700

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-01 15:47:19 +02:00
gitstart-app[bot]
485670c823
Add relation in CSV exports (#5085)
### Description

Add Relation Id to Table in CSV exports

### Demo

Before:


<https://www.loom.com/share/c853cf32767947dcb23a91363bff52c4?sid=0295b6ee-4510-47f8-8ba9-b81b5182985a>

After:


<https://www.loom.com/share/5aa4f87a266c4d96881170a38e063fc0?sid=44eed60c-01a2-406f-9bac-af162e39b66e>

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Chiazokam <chiazokamecheta@gmail.com>
2024-05-01 15:24:23 +02:00
Thaïs
0d023e5e77
feat: update links field (#5212)
Closes #5113

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-05-01 14:56:55 +02:00
Thaïs
8853226d17
feat: add Links field type (#5176)
Closes #5113

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-01 11:56:14 +02:00
Marie
e0ece3c917
Rename types for UserMappingOptions (#5230)
Following #5210

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-05-01 11:46:47 +02:00
Charles Bochet
bf7c4a5a89 Fix restrictive javascript heap memory 2024-04-30 19:17:12 +02:00
Charles Bochet
b7c2f83abf
Fix sign up (#5231)
Sign up was broken by #5199
2024-04-30 18:48:07 +02:00
Charles Bochet
7dad6e3b5e Re-add chromatic CI 2024-04-30 18:21:08 +02:00
Charles Bochet
ccd1100773
Fix tests (#5228)
Fixing typecheck + storybook:modules!
2024-04-30 17:54:07 +02:00
Marie
1b2ed80c1c
[feat][Remote objects] Edit a connection (for pg) (#5210)
## Context
#4774 

## How was it tested
Locally

## In further PRs
- Update connection status upon page change
- Adapt Info banner to dark mode
- placeholders for form
2024-04-30 17:46:30 +02:00
gitstart-twenty
9ad68ffe84
Favorites should be user-level not workspace-level (#5186)
### Description
Favorites should be user-level not workspace-level

### Refs
#3374

### Demo


https://github.com/twentyhq/twenty/assets/140154534/38a34cc7-ac58-494f-92d5-e15c43ae542e

Fixes #3374

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-30 16:42:44 +02:00
Thaïs
c193663a71
chore: use Nx affected tasks in CI (#5110)
Closes #5097

- Uses "nx affected" to detect what projects need to be checked in the
current PR (for now, `ci-front` and `ci-server` workflows only).
- Caches results of certain tasks (`lint`, `typecheck`, `test`,
`storybook:build`) when a PR pipeline runs. The next runs of the same
PR's pipeline will then be able to reuse the PR's task cache to execute
tasks faster.
- Caches Yarn's cache folder to install dependencies faster in CI jobs.
- Rewrites the node modules cache/install steps as a custom, reusable
Github action.
- Distributes `ci-front` jobs with a "matrix" strategy.
- Sets common tasks config at the root `nx.json`. For instance, to
activate the `typecheck` task in a project, add `typecheck: {}` to its
`project.json` and it'll use the default config set in `nx.json` for the
`typecheck` task. Options can be overridden in each individual
`project.json` if needed.
- Adds "scope" tags to some projects: `scope:frontend`, `scope:backend`,
`scope:shared`. An eslint rule ensures that `scope:frontend` only
depends on `scope:frontent` or `scope:shared` projects, same for
`scope:backend`. These tags are used by `nx affected` to filter projects
by scope and generates different task cache keys according to the
requested scope.
- Enables checks for twenty-emails in the `ci-server` workflow.
2024-04-30 16:28:25 +02:00
bosiraphael
7c605fc2f9
4002 prevent user from creating twice the same blocklist item (#5213)
Closes #4002
2024-04-30 14:36:33 +02:00
Thomas Trompette
3a61c922f1
Import full distant schema and store in remote server (#5211)
We should not depend on the foreign data wrapper type to manage distant
table. The remote server should be enough to handle the table creation.

Here is the new flow to fetch available tables:
- check if the remote server have available tables already stored
- if not, import full schema in a temporary schema
- copy the tables into the available tables field 
- delete the schema

Left todo:
- update remote server input for postgres so we receive the schema

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-30 14:18:33 +02:00
bosiraphael
907f0a1ea6
Add feature flag gate on calendar settings dropdown and fix queries (#5221)
- Add feature flag gate on calendar settings dropdown
- Fix find many messages
- Fix connected accounts settings
2024-04-30 14:12:48 +02:00
Weiko
95d80af0c6
Remove debounce on filter search bar (#5215)
A search bar has been introduced in the filter dropdown menu however we
don't want to apply debounce since the search has no side-effect and is
purely FE (it's not querying the DB compared to other search bars). Also
adding autofocus on the search bar when the dropdown is open.
2024-04-30 10:44:32 +02:00
Charles Bochet
fab385179b Fix Favorites issue 2024-04-30 00:38:22 +02:00
Charles Bochet
dd366dba47 Bump version to 0.10.4 2024-04-29 23:48:15 +02:00
Charles Bochet
6a14b1c6d6
Fix tasks (#5199)
## Query depth deprecation

I'm deprecating depth parameter in our graphql query / cache tooling.
They were obsolete since we introduce the possibility to provide
RecordGqlFields

## Refactor combinedFindManyRecordHook

The hook can now take an array of operationSignatures

## Fix tasks issues

Fix optimistic rendering issue. Note that we still haven't handle
optimisticEffect on creation properly
2024-04-29 23:33:23 +02:00
gitstart-app[bot]
c946572fde
TWNTY-4203 - Improve Email Thread Visibility with Collapse/Expansion Rules (#5202)
### Description

Improve Email Thread Visibility with Collapse/Expansion Rules

### Refs
#4203

### Demo


https://github.com/twentyhq/twenty/assets/140154534/ece1d783-57ef-45c9-9895-3b4b0e02b9e2


Fixes #4203

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-04-29 18:10:42 +02:00
Vinod Rathod
6065201acd
Implemented Search Feature in Filter Menu (#5068)
Closes #4367
2024-04-29 17:59:26 +02:00
hnrykm
6e87554445
updated: removed gradient from onboarding buttons (#5178)
Fixes #5168

- Added primaryInverted and primaryInvertedHover to design system.
- Changed primary button background with a gradient to inverted-flat for
both light and dark themes.
- Hover added to go lighter (consistent with tertiary color of +5 step
on GRAY_SCALE).
- Font color changed from primary to inverted.
- Modified button border from light to strong.

Two components are still utilizing the button with gradient background -
email and chrome extension.
Figma design guidelines show them to be inverted and flat (not
gradient).

- Should I change those as well?
- Should the gradient style be removed altogether after this has been
completed?

Co-authored-by: Henry Kim <henrykim@Henrys-iMac.local>
2024-04-29 16:11:42 +02:00
Shubham Kumar
a064708d8b
chore: add sentry captureException for global error logging (#5198)
I have added error logging to Sentry using Sentry.captureException. The
_info object which includes the componentStack will be sent in extra
data along with the exception.
2024-04-29 15:53:57 +02:00
Charles Bochet
27cd577dbb Fix login by email blocked 2024-04-26 18:22:36 +02:00
Charles Bochet
b15533e4b3 Bump version to 0.10.3 2024-04-26 17:52:13 +02:00
Thaïs
8beec03762
fix: fix SignInUpForm Continue button being disabled (#5185)
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-26 16:27:40 +02:00
Hinson Chan
e1d0b26cf9
5180 - does not call debounced update for invalid names (#5181)
fix: #5180 

Previously, clearing your name would kick you to the profile creation
page.


https://github.com/twentyhq/twenty/assets/68029599/8c0087da-6b03-4b6e-b202-eabe8ebcee18


Fixed so it checks your name is valid before calling the debounced
update


https://github.com/twentyhq/twenty/assets/68029599/4bc71d8f-e4f4-49ae-9cb8-497bd971be94

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-26 15:23:03 +02:00
Thomas Trompette
224c8d361b
Setup relations for remote objects (#5149)
New strategy:
- add settings field on FieldMetadata. Contains a boolean isIdField and
for numbers, a precision
- if idField, the graphql scalar returned will be a GraphQL id. This
will allow the app to work even for ids that are not uuid
- remove globals dateScalar and numberScalar modes. These were not used
- set limit as Integer
- check manually in query runner mutations that we send a valid id

Todo left:
- remove WorkspaceBuildSchemaOptions since this is not used anymore.
Will do in another PR

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
Co-authored-by: Weiko <corentin@twenty.com>
2024-04-26 14:37:34 +02:00
Deepak Kumar
dc576d0818
GH-3546 Recaptcha on login form (#4626)
## Description

This PR adds recaptcha on login form. One can add any one of three
recaptcha vendor -
1. Google Recaptcha -
https://developers.google.com/recaptcha/docs/v3#programmatically_invoke_the_challenge
2. HCaptcha -
https://docs.hcaptcha.com/invisible#programmatically-invoke-the-challenge
3. Turnstile -
https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/#execution-modes

### Issue
- #3546 

### Environment variables - 
1. `CAPTCHA_DRIVER` - `google-recaptcha` | `hcaptcha` | `turnstile`
2. `CAPTCHA_SITE_KEY` - site key
3. `CAPTCHA_SECRET_KEY` - secret key

### Engineering choices
1. If some of the above env variable provided, then, backend generates
an error -
<img width="990" alt="image"
src="https://github.com/twentyhq/twenty/assets/60139930/9fb00fab-9261-4ff3-b23e-2c2e06f1bf89">
    Please note that login/signup form will keep working as expected.
2. I'm using a Captcha guard that intercepts the request. If
"captchaToken" is present in the body and all env is set, then, the
captcha token is verified by backend through the service.
3. One can use this guard on any resolver to protect it by the captcha.
4. On frontend, two hooks `useGenerateCaptchaToken` and
`useInsertCaptchaScript` is created. `useInsertCaptchaScript` adds the
respective captcha JS script on frontend. `useGenerateCaptchaToken`
returns a function that one can use to trigger captcha token generation
programatically. This allows one to generate token keeping recaptcha
invisible.

### Note
This PR contains some changes in unrelated files like indentation,
spacing, inverted comma etc. I ran "yarn nx fmt:fix twenty-front" and
"yarn nx lint twenty-front -- --fix".

### Screenshots

<img width="869" alt="image"
src="https://github.com/twentyhq/twenty/assets/60139930/a75f5677-9b66-47f7-9730-4ec916073f8c">

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-04-25 23:52:28 +02:00
martmull
44855f0317
Fix broken billing portal when subscription canceled (#5082)
Fix billing portal link for canceled subscription
2024-04-25 18:33:49 +02:00
bosiraphael
d23e02adca
4001 add validation for blocklist (#5172)
Closes #4001
2024-04-25 15:32:55 +02:00
Vinod Rathod
4af2c5f298
Added a search box in sort menu (#5045)
Closes #4368

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-25 15:31:41 +02:00
Orinami Olatunji
0ccbdacb5a
feat: Status tags can show loader to complement displayed text (#5137)
Resolves #5134 



https://github.com/twentyhq/twenty/assets/16918891/48475f1b-a61f-4b87-8b9b-1271a183ac4b

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-25 10:27:17 +02:00
Hinson Chan
a283a3deed
5161 - fix workspace icon is missing on multi-workspace (#5165)
Fixes #5161

<img width="179" alt="image"
src="https://github.com/twentyhq/twenty/assets/68029599/5a7a5b11-c6ec-4f1f-b94d-37be470a7f79">

detail: before this PR, the icon would display as normal for the default
data:// icons, but not for uploaded files
(`workspace-logo/original/{}.png` for example). This PR fixes this by
calling the getImageAbsoluteURIOrBase64 function to resolve the missing
path.
2024-04-25 10:01:44 +02:00
Orinami Olatunji
2b8116f57f
fix: Calendar events participated in should be displayed in red (#5146)
Resolves #5131
2024-04-25 09:56:23 +02:00
Orinami Olatunji
adbc8ab96f
#5073 - fix datepicker styling in dark mode (#5074)
This PR fixes three issues with the datepicker in dark mode. The
following UI elements now appear in light colors when the theme is set
to dark mode:

- The selected date.
- The clock icon.
- The date time input component.

Before:
<img width="1003" alt="theming bug"
src="https://github.com/twentyhq/twenty/assets/16918891/914b7043-e692-4de8-8440-ddd89cbf3973">

After:
<img width="374" alt="dark_theme_calendar_after"
src="https://github.com/twentyhq/twenty/assets/16918891/346fd950-1ef8-405e-9486-59abb81f92db">
<img width="347" alt="light_theme_calendar_after"
src="https://github.com/twentyhq/twenty/assets/16918891/17463094-53e5-4bc4-8812-a53a37cd08ed">

#5073

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-24 15:18:26 +02:00
martmull
87a9ecee28
D gamer007/add microsoft oauth (#5103)
Need to create a new branch because original branch name is `main` and
we cannot push additional commits
Linked to https://github.com/twentyhq/twenty/pull/4718


![image](https://github.com/twentyhq/twenty/assets/29927851/52b220e7-770a-4ffe-b6e9-468605c2b8fa)

![image](https://github.com/twentyhq/twenty/assets/29927851/7a7a4737-f09f-4d9b-8962-5a9b8c71edc1)

---------

Co-authored-by: DGamer007 <prajapatidhruv266@gmail.com>
2024-04-24 14:56:02 +02:00
Dev
b634057fdd
Fix ellipsis overflow causing edit icon to be hidden on links (#5071)
Fixes #5064 

### Demo


https://github.com/twentyhq/twenty/assets/21654351/28ab7374-c57e-4f7e-9720-05138c53a33d

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-24 13:27:59 +02:00
Aditya Pimpalkar
c63ee519ea
feat: oauth for chrome extension (#4870)
Previously we had to create a separate API key to give access to chrome
extension so we can make calls to the DB. This PR includes logic to
initiate a oauth flow with PKCE method which redirects to the
`Authorise` screen to give access to server tokens.

Implemented in this PR- 
1. make `redirectUrl` a non-nullable parameter 
2. Add `NODE_ENV` to environment variable service
3. new env variable `CHROME_EXTENSION_REDIRECT_URL` on server side
4. strict checks for redirectUrl
5. try catch blocks on utils db query methods
6. refactor Apollo Client to handle `unauthorized` condition
7. input field to enter server url (for self-hosting)
8. state to show user if its already connected
9. show error if oauth flow is cancelled by user

Follow up PR -
Renew token logic

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-04-24 11:45:16 +02:00
Lucas Bordeau
444e97fa3e
Fixed date picker UI that was too overloaded (#5039)
Date picker UI was off because of the recent refactor with new field
types Date and DateTime. We had to allow the date picker to edit both.

In this PR we come back to the previous design and we only use the input
to modify time.

Also we use our Select component instead of the ones from the library
`react-datepicker`

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 18:45:32 +02:00
Marie
ff39ba5a15
[fix] Support non latin characters in schema names (#5063)
Fixes #4943

## How was it tested?
Local (front + /metadata)
Unit tests for utils

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 13:37:29 +02:00
Orinami Olatunji
8f6460bec5
#4976 fix dark mode for multi-select picker in activity target chips (#5111)
#4976 - Fixed the dark mode for multi-select picker in
ActivityTargetChips.

Bug:

![image](https://github.com/twentyhq/twenty/assets/16918891/53f55bba-f692-4dc9-a6b6-440d4ff5b278)

Fix:


https://github.com/twentyhq/twenty/assets/16918891/8e72cd02-0956-468d-b898-a10313448f62

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-04-23 11:46:05 +02:00
Ikko Eltociear Ashimine
0db35c9a5f
Fix typo in config/index.ts (#5109)
seperate -> separate
2024-04-23 11:22:31 +02:00
Marie
68662fa543
[refacto] Introduce stateless TextInputV2 (#5013)
## Context
As discussed with @lucasbordeau and @charlesBochet we are looking at
making low level UI components stateless when possible.
Therefore TextInput should not handle a hotkey state. Instead hotkeys
should be defined in the parent component (as done here in
CreateProfile).

Introducing here TextInputV2 that is stateless and that can already
replace TextInput without any behaviour change everywhere it is used
with `disableHotkey` prop.

## How was it tested?
Locally + Storybook

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-22 11:19:41 +02:00
Charles Bochet
4bd2cdd580
Load all data on record boards (#5070)
## Context

For users with many records, only the first n*60 records were loaded on
board views (n being the number of visible columns). This was because of
the following behavior:
- watch for end of column visibility changes. If an end of column is
visible, try to fetch more. However, watching for visbility changes is
not reliable enough.

## What we want

If an end of column is visible, try to fetch more. If no more records is
availble in pagination, do not fetch more
2024-04-19 23:39:19 +02:00
Thaïs
d3170fc1ea
fix: fix root start script (#5032)
Fixes #5022

See https://nx.dev/recipes/running-tasks/root-level-scripts#setup
2024-04-19 18:28:02 +02:00
Félix Malfait
d145684966
New Timeline (#4936)
Refactored the code to introduce two different concepts:
- AuditLogs (immutable, raw data)
- TimelineActivities (user-friendly, transformed data)

Still some work needed:
- Add message, files, calendar events to timeline (~2 hours if done
naively)
- Refactor repository to try to abstract concept when we can (tbd, wait
for Twenty ORM)
- Introduce ability to display child timelines on parent timeline with
filtering (~2 days)
- Improve UI: add links to open note/task, improve diff display, etc
(half a day)
- Decide the path forward for Task vs Notes: either introduce a new
field type "Record Type" and start going into that direction ; or split
in two objects?
- Trigger updates when a field is changed (will be solved by real-time /
websockets: 2 weeks)
- Integrate behavioral events (1 day for POC, 1 week for
clean/documented)

<img width="1248" alt="Screenshot 2024-04-12 at 09 24 49"
src="https://github.com/twentyhq/twenty/assets/6399865/9428db1a-ab2b-492c-8b0b-d4d9a36e81fa">
2024-04-19 17:52:57 +02:00
Arun Kumar
e0efa358de
Fixes #5024: Update local recoil state when workspace name changes (#5033)
This PR fixes #5024.

Local recoil state was not updated when workspace name is changed. This
PR updates local recoil state so that dropdown (and other parts of the
app) correctly shows the workspace name without reload.
2024-04-18 16:54:32 +02:00
Charles Bochet
d07dc11124
Fix activity Target picker not being displayed (#5040)
<img width="1025" alt="image"
src="https://github.com/twentyhq/twenty/assets/12035771/3f37ed27-661e-43ea-bc15-f59efa12bfca">
2024-04-18 16:16:12 +02:00
martmull
1c1a055c94
Improve multi word filtering (#5034)
improve multi word search

closes #4212 
closes #3386
2024-04-18 15:46:59 +02:00
Lucas Bordeau
88c14b7e52
Fix Record Inline Cell position on Edit mode (#5038)
Fixed 0.5 offset of inline cell edit mode
2024-04-18 15:46:40 +02:00
Lucas Bordeau
dc91d06e1b
Fixed position in query fields (#5036)
Position was not passed to the request query fields so it changed every
time we updated a field.
2024-04-18 15:24:28 +02:00
Lucas Bordeau
df49575c3e
Fix component id to scope id (#5035)
This pull request fixes the component id to scope id in the
useUpsertRecordV2 function.
2024-04-18 15:24:15 +02:00
bosiraphael
8702c71d45
4746 create created listener on blocklist (#5031)
Closes #4746 for messaging.

I will create another PR to implement the listener on calendar.
2024-04-18 15:06:13 +02:00
Charles Bochet
c42fcf435a Improve performance on TableBody but disable shadow on first column freeze 2024-04-18 14:45:45 +02:00
Zoltán Völcsey
c402631067
fix: Added isDisplayModeContentEmpty to the showEditButton's check (#5025)
Closes #5011 

Hi! I added isDisplayModeContentEmpty to the showEditButton's check.


https://github.com/twentyhq/twenty/assets/41576384/54a87c16-b58a-4a46-8373-f6c924201113
2024-04-18 13:47:12 +02:00