Commit Graph

6003 Commits

Author SHA1 Message Date
69f6796021 i18n - translations (#10813)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 17:21:20 +01:00
a818e76d61 i18n - translations (#10812)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 16:34:04 +01:00
daa501549e 271 remove is command menu v2 enabled (#10809)
Closes https://github.com/twentyhq/core-team-issues/issues/271

This PR
- Removes the feature flag IS_COMMAND_MENU_V2_ENABLED
- Removes all old Right drawer components
- Removes the Action menu bar
- Removes unused Copilot page
2025-03-12 16:26:29 +01:00
1b0413bf8b Add days schedule trigger (#10800)
<img width="1470" alt="image"
src="https://github.com/user-attachments/assets/660d79ba-60c7-4874-aa82-80a7575366ba"
/>
2025-03-12 15:25:07 +00:00
bfc542290b 545 replace objects icons and names with records avatars and labelidentifiers in command menu context chips (#10787)
Closes https://github.com/twentyhq/core-team-issues/issues/545

This PR:
- Introduces `commandMenuNavigationMorphItemsState` which stores the
information about the `recordId` and the `objectMetadataItemId` for each
page
- Creates `CommandMenuContextChipEffect`, which queries the records from
the previous pages in case a record has been updated during the
navigation, to keep up to date information and stores it inside
`commandMenuNavigationRecordsState`
- `useCommandMenuContextChips` returns the context chips information
- Style updates (icons background and color)
- Updates `useCommandMenu` to set and reset these new states


https://github.com/user-attachments/assets/8886848a-721d-4709-9330-8e84ebc0d51e
2025-03-12 15:26:14 +01:00
e030fc8917 i18n - translations (#10808)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 15:20:40 +01:00
0d7484389e Stop using labelIdentifier when adding record card (#10805)
When creating an object from kanban, we are using
`labelIdentifier.toLowerCase()` for the labelIdentifier field.
Issue is that labelIdentifier is translated.

Using `labelIdentifierField.name` instead.
2025-03-12 15:07:35 +01:00
5ddc34b182 Tablist bottom margin fix (#10801)
### Bug
The active tab bottom border appeared slightly above the TabList's light
bottom border.

### Investigation
- Initial fix: Adjusted margin-bottom to -1px in Tab component to align
borders
- This fix caused active bottom borders to disappear in tabs wrapped
with ShowPageSubContainerTabListContainer
- Found that ShowPageSubContainerTabListContainer was adding a redundant
bottom border that overlapped with TabList's border

### Solution
- Removed ShowPageSubContainerTabListContainer to eliminate the
redundant border
- Kept the -1px margin-bottom fix in Tab component
- This ensures consistent border behavior across all TabList
implementations
2025-03-12 14:45:50 +01:00
6102277de6 Settings counter alignment fix (#10802)
https://discord.com/channels/1130383047699738754/1349342363490844692
2025-03-12 13:09:54 +00:00
b12aa90d89 i18n - translations (#10804)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 14:02:23 +01:00
d3b6e2e621 Add Keystatic for twenty-website build (#10798)
The Keystatic's environment variables must be defined during the build.
@prastoin and I identified that the other environment variables aren't
defined during the build. We decided to add fake environment variables
directly in the Dockerfile to make the build pass. Later, the docker
image should be executed with the real environment variables that'll
make Keystatic work properly.
2025-03-12 13:50:59 +01:00
96931fa74c i18n - translations (#10797)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 11:35:02 +01:00
911647a279 Fix many bugs on advanced filters for CRUD to work (#10772)
This PR fixes many bugs on advanced filters, the goal here was to have
CRUD working with other simple filters and sorts.

In order to test this PR you'll have to run a sync metadata.

Fixes https://github.com/twentyhq/core-team-issues/issues/560

## Changed positionInViewFilterGroup field metadata type 

This PR changes the type of positionInViewFilterGroup to NUMERIC instead
of POSITION, there certainly was a confusion during the initial
development, where POSITION type seemed relevant but it is not for this
particular feature because the position in a view filter group is not
the position of a record, which is used for displaying and re-ordering
purpose in table and kanban views.

Here the positionInViewFilterGroup is a specific position concept tied
to a custom feature, and it is handled by the specific logic of this
advanced filter dropdown layout.

## Create new ids when duplicating a view

When we use create view from an existing view, the logic in
useCreateViewFromCurrentView will copy over filters, filter groups and
sorts. The problem is that it copies it with the same ids, and that if
the backend manages somehow to create new ids, the ids that are put in
parentViewFilterGroupId are corresponding to the old filter groups not
the duplicated new ones.

So we had to create a map of old id => new id so that everything that
has to be sent to the backend for creation already has the same mapping
of parent id but with new ids generated by the frontend.

## Bug with creating a simple filter

We couldn't create a simple filter when advanced filters were set, this
was because of findDuplicateRecordFilterInNonAdvancedRecordFilters which
wasn't doing what it's naming tells, it wasn't filtering on simple
filters only before looking for duplicates.

## Clean code

- Use lastChildPosition directly from
useChildRecordFiltersAndRecordFilterGroups instead of drilling it down
- Refactored AdvancedFilterDropdownButton to extract the code lower
where it is really needed in AdvancedFilterChip
- Renamed a few View to Record naming where relevant
2025-03-12 10:23:41 +00:00
8d1a4672de Add console logs to code step (#10796)
code review return -> move console interceptor to dedicated utils
2025-03-12 10:59:41 +01:00
1940fd5850 i18n - translations (#10795)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-12 10:45:46 +01:00
4036933c84 Add console logs to code step (#10786)
Works for local and lambda drivers

## After

![image](https://github.com/user-attachments/assets/ec082cf6-4159-4a15-99b6-243c73a13773)

![image](https://github.com/user-attachments/assets/f42e3f43-5ea4-4167-b4b5-9a17826fd224)
2025-03-12 10:40:59 +01:00
4d0450069c Fix fieldMetadata sync validation exceptions caught in exception handler (#10789)
## Context
Field metadata service was reusing validators from
validate-**OBJECT**-metadata-input which were throwing ObjectMetadata
exceptions not handled in fieldMetadataGraphqlApiExceptionHandler and
were going to Sentry.
To solve the issue since this validator is associated with both fields
and objects I'm moving the util to the root utils folder of metadata
module and throwing a common metadata user input exception
2025-03-11 18:41:29 +01:00
9880114853 Fix twenty-website CI (#10790) 2025-03-11 18:39:20 +01:00
d4c2fa9f66 Fix Keystatic configuration (#10783)
- Always use the `github` mode
- Set a `pathPrefix` as the repository is a monorepo
2025-03-11 18:17:20 +01:00
d9817d6b9c Fix tabler icons load (#10782)
As per
https://github.com/tabler/tabler-icons/issues/1233#issuecomment-2428245119
2025-03-11 18:01:28 +01:00
ddeba39a2c Reset step output schema when step is removed (#10762)
When a step is deleted in a draft version, its variable are still
available in the following steps. This is because step output schema was
not reset. We needed either to refresh or to change version so output
schema gets updated.

This PR:
- migrates to a family state global + context not linked to a component
- add a reset step output schema function
- reset when a step is removed
2025-03-11 16:38:47 +00:00
680935e605 i18n - translations (#10785)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 17:21:25 +01:00
5bbfbf68eb i18n - translations (#10784)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 17:06:05 +01:00
293e3f58c4 Fix TEST env not using the correct DB for datasources (#10780)
## Context
Config was programmatically loaded in our datasources however the
default behavior of dotenv is to ignore vars if they are already
defined. This means we need to be careful about the order of env
injection and sometimes it's done at a higher level (for example
db:reset will depend on build). To make things easier I'm using the
override flag to properly override the PG_DATABASE_URL if different (and
to properly work with the 'test' DB instead of 'default' during
testing).
2025-03-11 16:20:01 +01:00
0516e95330 i18n - translations (#10779)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 15:34:53 +01:00
8b523aec92 i18n - translations (#10778)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 15:20:37 +01:00
4e44ae59f7 Delete view & copy link (#10760)
adding the delete view and copy link additional menu option

Fixes https://github.com/twentyhq/core-team-issues/issues/480
Fixes https://github.com/twentyhq/core-team-issues/issues/481
2025-03-11 15:15:00 +01:00
3b40b2d50c i18n - translations (#10775)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 13:57:39 +01:00
0eb829dcb5 Remove system email address from cleaning emails (#10774)
as title, to avoid polluting the technical email address
2025-03-11 13:44:33 +01:00
48bd48753b Improve twenty-front build performance (vite rollup option) (#10771)
In this PR, I'm specifying to vite build that
'@scalar/api-reference-react' is an external dependency and should not
be considered as a module we maintain (it won't get its own chunk at
build time and we won't generate sourcemaps on our end).

I'm not sure why vite is considering it internal in the first place (I
can see that it's generating .vue.js files, might be the first time we
are relying on a vue library)
2025-03-11 12:39:54 +01:00
c39843dfd4 i18n - translations (#10770)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-11 12:19:41 +01:00
41f3a63962 [BUGFIX] ObjectMetadata item server validation (#10699)
# Introduction
This PR contains several SNAPSHOT files explaining big +

While refactoring the Object Model settings page in
https://github.com/twentyhq/twenty/pull/10653, encountered a critical
issue when submitting either one or both names with `""` empty string
hard corrupting a workspace.

This motivate this PR reviewing server side validation

I feel like we could share zod schema between front and back

## Refactored server validation
What to expect from Names:
- Plural and singular have to be different ( case insensitive and
trimmed check )
- Contains only a-z A-Z and 0-9
- Follows camelCase
- Is not empty => Is not too short ( 1 )
- Is not too long ( 63 )
- Is case insensitive( fooBar and fOoBar now rejected )

What to expect from Labels:
- Plural and singular have to be different ( case insensitive and
trimmed check )
- Is not empty => Is not too short ( 1 )
- Is not too long ( 63 )
- Is case insensitive ( fooBar and fOoBar now rejected )

close https://github.com/twentyhq/twenty/issues/10694

## Creation integrations tests
Created new integrations tests, following
[EachTesting](https://jestjs.io/docs/api#testeachtablename-fn-timeout)
pattern and uses snapshot to assert errors message. These tests cover
several failing use cases and started to implement ones for the happy
path but object metadata item deletion is currently broken unless I'm
mistaken @Weiko is on it

## Notes
- [ ] As we've added new validation rules towards names and labels we
should scan db in order to standardize existing values using either a
migration command or manual check
- [ ] Will review in an other PR the update path, adding integrations
tests and so on
2025-03-11 12:14:37 +01:00
de22872c6e i18n - translations (#10766)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 21:20:47 +01:00
e5a7aab733 Fix incorrect Scalar CSS import (#10763)
CSS was loaded in a global context (full screen which might be re-used
for other use cases in the future) instead of a local context.

\+ small update on .env.example
2025-03-10 21:10:40 +01:00
dc66d2498e i18n - translations (#10765)
Created by Github action

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:36:18 +01:00
d3e6879ee3 i18n - translations (#10764)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:21:42 +01:00
0861384351 i18n - translations (#10761)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 19:01:21 +01:00
5fb613a8f7 Fix permissions front followup (#10758) 2025-03-10 18:56:23 +01:00
c8b44aa242 Update design for not found variables (#10756)
<img width="494" alt="Capture d’écran 2025-03-10 à 14 09 37"
src="https://github.com/user-attachments/assets/ea4a55a1-c7f0-4138-a494-592b197ec8a2"
/>
2025-03-10 17:42:38 +00:00
252d95c741 i18n - translations (#10759)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 17:48:15 +01:00
d8197920dc Fixed hotkeys on advanced filters (#10733)
This PR fixes hotkey escape on advanced filter dropdown, which wasn't
working.

It adds a parameters to openDropdown, because in this particular case,
the dropdown is not opened from its clickable component but from an
openDropdown, in that case it wasn't possible for openDropdown to know
which hotkey scope to take, because the hotkey scope is generally passed
in the Dropdown component props.

We might want to find a more robust solution, where a dropdown knows its
hotkey scope without having to be mounted.

---------

Co-authored-by: Raphaël Bosi <71827178+bosiraphael@users.noreply.github.com>
2025-03-10 16:41:53 +00:00
f79165ff28 450 merge first second tab on side panel (#10757)
Closes https://github.com/twentyhq/core-team-issues/issues/450

## Before


https://github.com/user-attachments/assets/9b3b8fe7-0cf6-49b7-9f1b-d263b8f65dde



## After


https://github.com/user-attachments/assets/b8e48cae-0661-4fc2-912b-bf091d94bde6
2025-03-10 17:40:27 +01:00
dd26001372 Handle JSON viewer empty states (#10750)
- Display the number of descendants for object and array elements
- Display an empty state for arrays and objects
- Make the input and output visualizer scrollable horizontally 
  - Prevent JSON visualizer's text to wrap

## Demo: input


https://github.com/user-attachments/assets/d6bd6acf-a779-4fc7-a8b1-12b857cee7f9

Closes https://github.com/twentyhq/core-team-issues/issues/497
2025-03-10 17:39:49 +01:00
dc55fac1d5 Wrap all vizualizers into component context (#10755)
Steps are broken when a variable is set.
This is because component instance is not set for version and run
visualizers.
Each step viewer should be wrapped by the instance context.
Each diagram visualizer should be responsible for populating the output
schema.

Also fixing a billing error when running workflow.
2025-03-10 15:56:14 +01:00
3b79018609 fix 10604 them color (#10749)
fixes https://github.com/twentyhq/twenty/issues/10604
2025-03-10 14:36:47 +00:00
21ecfcaa72 i18n - translations (#10754)
Created by Github action

---------

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 15:20:23 +01:00
f0de6d31b7 Refactor MultipleObjectsPicker component (#10552)
Refactor to only have MultipleRecordPicker and SingleRecordPicker

What's done:
- SingleRecordPicker, MultipleRecordPicker
- RelationToOneInput
- RelationFromManyInput
- usage in TableCell, InlineCell, RelationDetailSection, Workflow

What's left:
- Make a pass on the app, to make sure the hotkeyScopes, clickOutside
are properly set
- Fix flashing on ActivityTarget
- add more tests on the code
2025-03-10 15:04:09 +01:00
7eabcc8774 i18n - translations (#10753)
Created by Github action

---------

Co-authored-by: github-actions <github-actions@twenty.com>
2025-03-10 14:36:03 +01:00
77574594f2 admin panel fast follows (#10723)
fast follows:
- https://discord.com/channels/1130383047699738754/1346433965451382845
- https://discord.com/channels/1130383047699738754/1346434512757981264
- https://discord.com/channels/1130383047699738754/1346453484911853610

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2025-03-10 19:02:40 +05:30
a1e0d7b7d7 Fix file preview text color in dark mode (#10748)
This PR fixes an issue where the file preview text was unreadable due to
white text on a white background in dark mode.

Dark mode ->

![image](https://github.com/user-attachments/assets/1f8f6fd0-b95b-4b78-ae8c-db51acfefac2)

Light mode ->

![image](https://github.com/user-attachments/assets/82996a31-e000-4f04-b8db-bd35838732ec)

Fixes #10743

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-03-10 13:54:01 +01:00