Closes#5924.
Adding the "many" side of relations in the table view, and fixing some
issues (glitch in Multi record select, cache update after update).
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
This PR introduces an `upsert` parameter (along the existing `data`
param) for `createOne` and `createMany` mutations.
When upsert is set to `true`, the function will look for records with
the same id if an id was passed. If not id was passed, it will leverage
the existing duplicate check mechanism to find a duplicate. If a record
is found, then the function will perform an update instead of a create.
Unfortunately I had to remove some nice tests that existing on the args
factory. Those tests where mostly testing the duplication rule
generation logic but through a GraphQL angle. Since I moved the
duplication rule logic to a dedicated service, if I kept the tests but
mocked the service we wouldn't really be testing anything useful. The
right path would be to create new tests for this service that compare
the JSON output and not the GraphQL output but I chose not to work on
this as it's equivalent to rewriting the tests from scratch and I have
other competing priorities.
Fixes https://github.com/twentyhq/twenty/issues/6016
This was another side effect of the optimization made on
RecordTableCellContainer to avoid using recoil states, but which causes
too many unpredictable side effects.
I just put back the previous system which works well. We'll see how to
optimize it again later.
As per title!
Also, I'm removing an incorrect logic in the enum migration runner that
takes care of the case where we have no defaultValue but non nullable
which is not a valid business case.
# This PR
- Revise my previous work (PR #5969)
Because it would break the current logic and cause unexpected behavior.
(Issue #5979)
- Solve (Issue #5915) with another way
@lucasbordeau What do you think about my current approach?
@JarWarren Please check it out—I'd love to get your feedback too!
---------
Co-authored-by: Achsan <achsanh@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Hi Twenty team,
I'd love to have Australian dollar as an option in Twenty! Please let me
me know if I have missed anything I need to change to enable this.
Thanks for a a great product
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
We had an issue on infinite scroll on table view.
The fetch more logic was modifying isTableLastRowVisible state (which is
wrong, how could it know)? This was done to prevent loading too much
data at once. This was causing some race condition on
isTableLastRowVisible (as the table itself was also changing it
depending on the real visibility of the line)
I have remove this hacky usage of isTableLastRowVisible and replaced it
by a setTimeout to let the user some time to scroll and introduce a
throttle logic.
Our tests on FE are red, which is a threat to code quality. I'm adding a
few unit tests to improve the coverage and lowering a bit the lines
coverage threshold
## Fixes#5902 :
- [x] Navigation items' height should be risen to 28px.
> For clarity:
- [x] Also increased the height of NavigationDrawerSectionTitle to 28px
to match navigation item.
- [x] The gap between sections should be reduced to 12px
> Was already completed it seems.
- [x] The workspace switcher should be aligned with the navigation items
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Closes#5915
This issue occurs only when there is no select field.
The user then creates a new one in settings and returns back to the view
picker.
And the bug arises, it because `viewPickerKanbanFieldMetadataId` is not
being set correctly.
When a user navigate to settings, the dirty state should be set to
false. As a result, after re-rendering the view picker component, it
triggers the effect to set `viewPickerKanbanFieldMetadataId`
---------
Co-authored-by: Achsan <achsanh@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
Timezone with a negative offset weren't working good with date pickers.
I split the logic for display and parsing between date only and
datetime.
Date time is sending and displaying using timezone, and date only is
sending and displaying by forcing the date to take its UTC day and month
and 00:00:00 time.
This way its consistent across all timezones.
Previously the error boundary component was re-rendering with the same
state as long as we stayed in the same router, so for page change inside
an index container, it would stay on error state.
The fix is to memorize the location the error page is on during its
first render, and then to reset the error boundary if it gets
re-rendered with a different location even in the same index container.
Fixes : #3592
Greetings from Seoul! I found this amazing project a few days ago, and
trying to introduce it to my team. However there is a tiny but
significant problem, that South Korean won is not available in twenty.
So I added `KRW` to the enum `CurrencyCode` and the constant
`SETTINGS_FIELD_CURRENCY_CODES`. I tested it locally and apparently
works fine.
The display for Rating field type was missing, I just added it based on
RatingInput in readonly mode and optimized a bit for performance also.
Fixes https://github.com/twentyhq/twenty/issues/5900
I have fixed the scrolling the record container page on mobile making it
hidden.
This PR aims to fix#5745
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>