Commit Graph

4735 Commits

Author SHA1 Message Date
Guillim
2c0d3e93d2
Error 500 (#8845) 2024-12-04 14:03:06 +00:00
Weiko
c735026f6c
Fix seed-demo command (#8866)
## Context
Fix seed demo command since we added a subdomain non-nullable column we
needed to update the command to fill that info for the demo workspace
2024-12-04 11:24:48 +01:00
Raphaël Bosi
743169a260
Fix message participant assignation bug (#8857)
Closes #8846
2024-12-03 23:27:08 +01:00
Marie
2fc247cb21
Display and update aggregate queries in kanban views (#8833)
Closes #8752, #8753, #8754

Implements usage of aggregate queries in kanban views.

https://github.com/user-attachments/assets/732590ca-2785-4c57-82d5-d999a2279e92

TO DO

1. write tests + storybook
2. Fix values displayed should have the same format as defined in number
fields + Fix display for amountMicros

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-03 22:46:57 +01:00
Weiko
5e891a135b
Fix CI (#8862) 2024-12-03 21:58:43 +01:00
Antoine Moreaux
7943141d03
feat(*): allow to select auth providers + add multiworkspace with subdomain management (#8656)
## Summary
Add support for multi-workspace feature and adjust configurations and
states accordingly.
- Introduced new state isMultiWorkspaceEnabledState.
- Updated ClientConfigProviderEffect component to handle
multi-workspace.
- Modified GraphQL schema and queries to include multi-workspace related
configurations.
- Adjusted server environment variables and their respective
documentation to support multi-workspace toggle.
- Updated server-side logic to handle new multi-workspace configurations
and conditions.
2024-12-03 19:06:28 +01:00
nitin
9a65e80566
Remove the heart icon button to add the view as a favorite from the top bar (#8769)
closes #8546 

@Bonapara please check the behaviour, if this is what you were looking
for! ;)
2024-12-03 13:49:00 +01:00
Weiko
3c7805c6d0
Add field isLabelSyncedWithName (#8829)
## Context
The recent addition of object renaming introduced issues with enum
names. Enum names should follow the pattern
`${schemaName}.${tableName}_${columnName}_enum`. To address this, and to
allow users to customize the API name (which is included in the enum
name, columnName), this PR implements behavior similar to object
renaming by introducing a `isLabelSyncedWithName` boolean.

<img width="624" alt="Screenshot 2024-12-02 at 11 58 49"
src="https://github.com/user-attachments/assets/690fb71c-83f0-4922-80c0-946c92dacc30">
<img width="596" alt="Screenshot 2024-12-02 at 11 58 39"
src="https://github.com/user-attachments/assets/af9a0037-7cf5-40c3-9ed5-d51b340c8087">
2024-12-03 13:22:12 +01:00
Guillim
7e4277fbe4
Better errors handling (#8835)
- [ ] Catch this specific `500` error
- [ ] Make sure catched `500` errors are sent to sentry for the Cloud
version
- [ ] Hide the option to sync email with google in this situation where
the according env var is missing
- [x] Add Worskpace information to all catched errors for better
debugging

fix #8607
2024-12-03 12:16:38 +01:00
Raphaël Bosi
32194a88b3
Implement contextual actions for the workflows (#8814)
Implemented the following actions for the workflows:
- Test Workflow
- Discard Draft
- Activate Draft
- Activate Workflow Last Published Version
- Deactivate Workflow
- See Workflow Executions
- See Workflow Active Version
- See Workflow Versions History

And the following actions for the workflow versions:
- Use As Draft
- See Workflow Versions History
- See Workflow Executions

Video example:


https://github.com/user-attachments/assets/016956a6-6f2e-4de5-9605-d6e14526cbb3

A few of these actions are links to the relations of the workflow object
(link to a filtered table). To generalize this behavior, I will create
an hook named `useSeeRelationsActionSingleRecordAction` to automatically
generate links to a showPage if the relation is a Many To One or to a
filtered table if the relation is a One to Many for all the record
types.
I will also create actions which will allow to create a relation.

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-03 12:09:51 +01:00
Antoine Moreaux
7b2d9894f3
fix(environment): Make SSL variables optional (#8843)
Previously, SSL_KEY_PATH and SSL_CERT_PATH were required if the
SERVER_URL started with 'https'. This change makes these variables
optional, allowing greater flexibility in dealing with SSL
configurations. This update helps in scenarios where SSL paths are
managed differently or not needed.
2024-12-03 11:20:24 +01:00
martmull
d0ff1ffd5f
8723 workflow add editor in serverless function code step (#8805)
- create a serverless function when creating a new workflow code step
- add code editor in workflow code step
- move workflowVersion steps management from frontend to backend
  - add a custom resolver for workflow-version management
  - fix optimistic rendering on frontend
- fix css
- delete serverless function when deleting workflow code step

TODO
- Don't update serverlessFunction if no code change
- Factorize what can be between crud trigger and crud step
- Publish serverless version when activating workflow
- delete serverless functions when deleting workflow or workflowVersion
- fix optimistic rendering for code updates
- Unify CRUD types

<img width="1279" alt="image"
src="https://github.com/user-attachments/assets/3d97ee9f-4b96-4abc-9d36-5c0280058be4">
2024-12-03 08:41:13 +00:00
Baptiste Devessier
9d7632cb4f
Update best-practices-front.mdx (#8836) 2024-12-02 17:26:31 +01:00
Nathaniel Brough
64500d07d3
Use builtin number validation (#8819)
The regex approach doesn't work great for the many different number
formats. Even a simple decimal failed e.g. '1.1' was considered invalid.
I've switched this over to use javascripts builtin conversion and
validation. This now supports other formats e.g. '-1.0e15' would now be
considered valid.

Closes: #8820
2024-12-02 15:03:49 +01:00
eliasylonen
b6701a81e1
Prefill workspace invitation email (#7174) (#8826)
Prefill workspace invitation email, fixes #7174

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Antoine Moreaux <moreaux.antoine@gmail.com>
2024-12-02 14:22:53 +01:00
Naifer
2b0f67191a
toggle Field on label between singular and plural based on relation type (#8817)
#7683 

![labelPlural](https://github.com/user-attachments/assets/3e620d7e-dd51-4e4e-a9ba-289f2685ddf3)

![labelSingular](https://github.com/user-attachments/assets/84739ac5-29b4-48c8-8a71-3f8f2816641b)
Hello,
I’ve implemented the logic for dynamically toggling the Field on label
between singular and plural based on the relation type selected by the
user. Here's an overview of the changes:

Added a variable selectedRelationType to store the user’s selected
relation type.
Based on this variable, I determine whether to use labelPlural or
labelSingular from the selectedObjectMetadataItem.
Please review my changes and let me know if there's anything that needs
improvement .

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-12-02 14:14:21 +01:00
Guillim
0527bc296e
Default address country 🗺️ & Phone prefix ☎️ (#8614)
# Default address 🗺️ country & Phone ☎️ country

We add the ability to add a Default address country and a default Phone
country for fields in the Data model.

fix #8081

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-02 12:34:05 +00:00
Félix Malfait
39a9cd0d51
Fix Make Postgres on Docker (#8830)
Fixes #8630
2024-12-02 09:58:03 +01:00
Charles Bochet
69f052e3ad
Fix activity target picker (#8812)
This PR is fixing the Task/Note Target picker.

## Issue

A few weeks ago, we have simplified the recordPicker logic. During this
refacto, we stopped making sure the selected records were fetched.
However, the optimistic update of the activity supposed that current
activityTargets are present in the selection in the picker in order to
filter out the removed items.

## Fix

In case we don't find the record in the picker selection, we don't
filter it out (it means the user cannot have removed it)

## Next step

@ijreilly I think we should put it back, as the selected records do not
appear on top anymore
2024-11-30 10:48:43 +01:00
Thomas Trompette
b542b43878
Add record picker with variables (#8813)
- Add update actions
- Create a folder for workflow actions
- Add a SingleRecordPicker with variables handler



https://github.com/user-attachments/assets/9fd57ce1-1b8d-424a-8aa1-69468d684fa1
2024-11-29 20:33:45 +01:00
Félix Malfait
29eb9fe77b
Don't show summary/fields on workflow record pages (#8804)
Hiding the left column on workflow pages


This raises additional questions: how do we edit the title then?
Probably need a significant refacto of PageHeader


<img width="1094" alt="Screenshot 2024-11-29 at 10 01 08"
src="https://github.com/user-attachments/assets/b98d55cb-5097-4e46-bac5-5570d9ca0ad8">
2024-11-29 18:11:44 +01:00
Félix Malfait
ebc381f009
Small text improvement to number field type (#8816)
Micro improvement to the number field type text
2024-11-29 18:06:00 +01:00
nitin
a7bbc9e00d
Render IconFolderOpen when folder is open (#8811)
closes #8809 


https://github.com/user-attachments/assets/519e03ea-ae5e-4e4b-b03f-cf60d61dea49
2024-11-29 16:13:22 +01:00
Suhotra Dey
27eae53d0a
Updated website docs and /twenty-server/.env (#8801)
Fix for the issue Incorrect Database Connection String in .env File
#8741

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-29 14:12:09 +01:00
Baptiste Devessier
0136be65d1
Fix delete trigger node (#8806) 2024-11-29 13:58:23 +01:00
Jérémy M
a2d55a8694
feat: table record group (#8781)
Fix #8401 #8402

This PR is only taking care or displaying properly the record group on
the table.
Record-reorder within group has also been prepared.
Start of collapsible animation has been done, but not working for now.

<img width="1381" alt="Screenshot 2024-11-28 at 2 52 07 PM"
src="https://github.com/user-attachments/assets/514bb3e6-3475-4c47-a91c-64f7d20bbe73">
2024-11-29 13:04:27 +01:00
Raphaël Bosi
05149feb00
Do not mount the command menu when the user is logged out (#8808)
Fixes two bugs:
- The command menu contains hooks which were trying to execute queries
even when the user was logged out
- The command menu could be opened with the command + K shortcut even
when the user was logged out
2024-11-29 12:19:58 +01:00
eliasylonen
c878f09d72
Fix token expiration error loop (#6731) (#8802)
Fixes issue https://github.com/twentyhq/twenty/issues/6731

**Problem:** After access token token expires, scrolling down the
`RecordTable` component will put it to an infinite loop of trying to
fetch records and printing errors on every iteration.

**Solution:** Disable fetching until component remount if a `FORBIDDEN`
error is encountered.

---------

Co-authored-by: ad-elias <elias@autodiligence.com>
2024-11-29 10:59:19 +01:00
Thomas Trompette
83223eeae3
Upgrade relation picker (#8795)
- Rename all parts using the name "relation" to "record" when component
is only selecting record
- Remove the use of scope states in folder
- Rename entities to records

This PR prepares the use of the record picker in workflows
2024-11-28 18:08:39 +01:00
Baptiste Devessier
d73dc1a728
Create form field number (#8634)
- Refactor VariableTagInput to have a reusable low-level TipTap editor
- Create three primitive form fields:
  - Text
  - Number
  - Boolean

## Notes

- We should automatically recognize the placeholder to use for every
FormFieldInput, as it's done for FieldInputs.

## Design decisions

Our main challenge was for variables and inputs to be able to
communicate between each other. We chose an API that adds some
duplication but remains simple and doesn't rely on "hacks" to work.
Common styles are centralized.

## Demo

"Workflow" mode with variables:

![CleanShot 2024-11-26 at 10 43
25@2x](https://github.com/user-attachments/assets/cc17098a-ca27-4f97-b86a-bf88593e53db)

FormFieldInput mode, without variables:

![CleanShot 2024-11-26 at 10 44
26@2x](https://github.com/user-attachments/assets/fec07c36-5944-4a1d-a863-516fd77c8f55)

Behavior difference between fields that can contain variables and static
content, and inputs that can have either a variable value or a static
value:

![CleanShot 2024-11-26 at 10 47
13@2x](https://github.com/user-attachments/assets/1e562cd8-c362-46d0-b438-481215159da9)
2024-11-28 17:03:24 +00:00
Thomas Trompette
3573d89c3c
Add a few tests on workflow hooks (#8800)
As title
2024-11-28 16:54:41 +00:00
Baptiste Devessier
38b83f0866
Write more tests (#8799) 2024-11-28 17:43:15 +01:00
Raphaël Bosi
b857d45182
Add ongoing stale crons commands to doc (#8776)
Add ongoing stale crons commands to doc
2024-11-28 17:26:07 +01:00
Raphaël Bosi
541bbb93cb
Fix: Put workflow run actions behind feature flag (#8798)
Fix: Put workflow run actions behind feature flag
2024-11-28 17:21:46 +01:00
Raphaël Bosi
33159e29b7
Put workflow run actions behind feature flag (#8796)
Put workflow run actions behind feature flag
2024-11-28 16:03:34 +01:00
Weiko
75f5afb968
Rename enum types when tables are renamed (#8794)
## Context
Enum are named after this pattern
`${schema}_${tableName}_${columnName}_enum` however now that we allowed
table name update, we need to make sure their enums are renamed as well.
2024-11-28 15:39:20 +01:00
Félix Malfait
fbe042db3b
Calendar event cursor flashes (#8792)
Fixes #4692 

This is not the most beautiful fix (I think the right fix is to add 1px
somewhere), but this issue is old and deserved to be closed quickly
without spending too much time as this will likely be refactored and is
not very important
2024-11-28 15:05:59 +01:00
Guillim
041b1f21bf
line breaks in tooltips & text (#8783)
This feature goal is to :

1 - clean variables not used any longer

2 - add line breaks for tooltips and text wrapped

<img width="329" alt="Screenshot 2024-11-27 at 18 37 18"
src="https://github.com/user-attachments/assets/b3d7ed76-df30-4377-9d73-08d55c0f5c49">
<img width="468" alt="Screenshot 2024-11-27 at 18 37 31"
src="https://github.com/user-attachments/assets/48ef343e-6071-4a89-a73f-fb271f8284c0">


Request From @Bonapara

---------

Co-authored-by: guillim <guillaume@twenty.com>
2024-11-28 14:30:23 +01:00
Charles Bochet
8aab063da3 Demo new onclick behavior 2024-11-28 14:17:01 +01:00
Jérémy M
812ed6ed69
feat: record board component state refactor (#8779)
Fix #8758 

This PR is migrating the recoil component state from v1 to v2 for board.
It also now share some states and logics between board and table,
further can be done later.
Lastly this PR fix an issue since the PR #8613 that was treating
no-value as a normal record-group.
2024-11-28 13:44:21 +01:00
nitin
e96ad9a1f2
Admin panel init (#8742)
WIP
Related issues - 
#7090 
#8547 
Master issue - 
#4499

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-28 13:43:11 +01:00
gotjoshua
abe9185f48
Devenv setup via devenvious (#8774)
This PR adds a devenv template based on [devenv.sh](https://devenv.sh/),
this is a nice to have for devs that use nix, direnv, and devenv.
It provides a quick and easy way to ensure that all packages that are
needed to start up the dev environment are installed.
I've initialized using devenvious, which is a @tennox creation: [source
on gitlab](https://gitlab.com/txlab/dx/devenvious).

I acknowledge that this "clutters" the root dir with some less common
files, but they are harmless for those that don't use the tools, and
helpful for those that do... a bit like .vscode and .idea folders.

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-11-28 11:33:22 +01:00
nitin
525a2c2bed
minor-fix: console errors (#8782) 2024-11-28 11:09:00 +01:00
Weiko
c9fd194695
Fix index renaming (#8771)
Fixes https://github.com/twentyhq/twenty/issues/8760

## Context
Index names are based on table names and column names, which means
renaming an object (or a field) should also trigger a recompute of index
names. As of today it raises a bug where you can't create an object with
a name that was previously used.

I also took the occasion to refactor a bit the part where we create and
update (after renaming) relations. Basically the only relations we want
to affect are standard relations so I've aligned the logic with
sync-metadata which uses standardId as a source of truth to simplify the
code.

Note: We don't create index for custom relations
Next step should be to do that and update that code to update the index
name as well. Also note that we need to update the sync-metadata logic
for that as well
2024-11-28 10:21:03 +01:00
Antoine Moreaux
2fab2266d5
feat(front): improve logo component (#8720) 2024-11-27 19:26:45 +01:00
Harsh Singh
3ad1113173
fix: scroll dropdown listing in hidden fields (#8738)
Fixes: #8716 

[Screencast from 2024-11-25
22-06-24.webm](https://github.com/user-attachments/assets/35bd66cc-942f-4903-abda-0d67a75b6582)

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-11-27 18:06:11 +01:00
Raphaël Bosi
a9cb1e9b0d
Refactor actions (#8761)
Closes #8737 
- Refactored actions by creating hooks to add the possibility to
register actions programatically.
- Small fixes from #8610 review
- Fixed shortcuts display inside the command menu
- Removed `actionMenuEntriesComponentState` and introduced
`actionMenuEntriesComponentSelector`
2024-11-27 15:08:27 +01:00
Raphaël Bosi
0d6a6ec678
8764 incorrect email sorting (#8768)
Closes #8764
2024-11-27 10:11:57 +01:00
Marie
149ce680d5
[Fix] Custom object icon update (#8762) 2024-11-26 18:03:19 +01:00
Guillim
315938215e
Fix Table text wrapping (#8683)
As discovered during the last release, text fields in the table were
wrapped. This PR fixes this unwanted behaviour

Current :
<img width="1077" alt="Screenshot 2024-11-22 at 14 17 42"
src="https://github.com/user-attachments/assets/080c5b1f-b793-46de-8733-9c69a4eb6b3b">

Wanted : 
One line ellipsed
<img width="244" alt="Screenshot 2024-11-22 at 14 20 46"
src="https://github.com/user-attachments/assets/c1d32859-4ffe-42e3-bfed-66db20c8c0c7">

---------

Co-authored-by: guillim <guillaume@twenty.com>
2024-11-26 17:58:05 +01:00