Commit Graph

31 Commits

Author SHA1 Message Date
24aca790f7 Remove export action from the view options menu (#10517)
Closes https://github.com/twentyhq/core-team-issues/issues/64
Remove export action from the view options menu
2025-02-26 18:20:07 +01:00
9997cf5a4e 322 compact command chips dropdown (#10456)
Closes https://github.com/twentyhq/core-team-issues/issues/322



https://github.com/user-attachments/assets/d4806f04-e217-40f5-9707-93334bbd49ea

---------

Co-authored-by: Devessier <baptiste@devessier.fr>
2025-02-25 16:42:38 +01:00
05d00e6604 Store the current flow definition in a state to not depend on a specific workflow version (#10352)
This PR introduces a new Recoil state to store the flow.

A few parts of the application need to know the definition of the
current flow. Previously, we stored the workflow version's ID and
fetched its definition with the `useWorkflowVersion` hook. However, we
must use another strategy to visualize workflow runs. Indeed, we now
store the definition of the workflow in the workflow run output when it
is executed. This is useful for draft versions, which can change between
the moment they were executed and the moment they are visualized.
2025-02-20 17:12:03 +01:00
77caf36d90 Fix workflow run ouput format (#10302)
- Adapt the frontend to use the new output format
2025-02-19 15:10:59 +01:00
ade13826c2 Fix e2e tests (#10289)
- Remove the demo test as I don't think it provides much value
- Re-run a test that was discarded because it failed due to a bug;
modified the test so the bug doesn't make the test fail
- Fixed all workflow tests
2025-02-18 14:30:40 +01:00
179d3ae2a4 Add workflow success edge (#10120)
- Refactor the handles: the source handles are now part of the edges as
markerStart
- **As the source handles are now part of the edges, we can delete the
`markLeafNodes` logic; this can be done in another PR**. See
https://github.com/twentyhq/core-team-issues/issues/386
- Create a custom edge component for the default edge
- Create a custom edge component for the success edge; this includes a
label

**The edges can be tested in Storybook. I wrote two stories for the
edges.**

| Default | Success |
|--------|--------|
| ![CleanShot 2025-02-11 at 11 46
09@2x](https://github.com/user-attachments/assets/c7c42328-6502-4c77-bdc9-dea825d4651a)
| ![CleanShot 2025-02-11 at 11 46
16@2x](https://github.com/user-attachments/assets/572204de-299c-4cbc-9900-46744b59c351)
|
2025-02-11 13:01:11 +00:00
3cc66fe712 Remove the source handle for leaf nodes (#10057)
- Do not render a source handle for the leaf nodes
- Upgrade the `@xyflow/react` library

| Before | After |
|--------|--------|
| ![CleanShot 2025-02-06 at 16 21
08@2x](https://github.com/user-attachments/assets/42b7d11b-76bf-43b9-ba91-8d0c5c2f1792)
| ![CleanShot 2025-02-06 at 16 21
24@2x](https://github.com/user-attachments/assets/ac94aa32-45ad-4462-8db9-0078d6252ea4)
|

## Other options considered

React Flow exposes a hook to get the connections of the current node. I
tried to use this hook – which makes things way simpler – but I couldn't
find a way to make it work in Storybook. I had two options: 1. Set up
React Flow to render the nodes properly, 2. Mock the hook in Storybook.

The first option was hard to achieve as the `<Reactflow />` component
renders a whole flow, and it doesn't play well with the idea of
rendering a single node in a story.

The second option seemed overkill as mocking modules with Storybook is
not straightforward. See
https://storybook.js.org/docs/writing-stories/mocking-data-and-modules/mocking-modules.

I chose to keep the initial version of my code, written before I spot a
function simplifying the code. We can give it a look another time.
2025-02-07 13:17:43 +01:00
c27e930293 Make the e2e ci pass (#10059)
An E2E test always fails due to an identified bug. Since it's best to
keep the E2E CI pass rather than get used to it being broken, I mark the
test as needing to be fixed.

The identified bug:
https://discord.com/channels/1130383047699738754/1337002448602005567
2025-02-06 17:11:39 +01:00
7a0f2f8c0a Add logged out translations (#9983)
Add translation for logged in / sub pages
2025-02-03 22:00:54 +01:00
9d24bfb747 preparing version 0.42-caanry (#9938) 2025-02-03 10:53:05 +01:00
66296a4787 [1/n]: Migrate deleteOne Rest API to use TwentyORM directly (#9784)
# This PR

- Addressing #3644 
- Migrates the `DELETE /rest/*` endpoint to use TwentyORM
- Factorizes common middleware logic into a common module

---------

Co-authored-by: martmull <martmull@hotmail.fr>
2025-01-31 16:12:20 +01:00
591301f7ce Remove demo from readme as users can create free trial on production (#9952)
We have recently introduced the possibility to sign up on Twenty cloud
without having to input a credit card which makes the demo.twenty.com
useless. Deprecating it!
2025-01-31 15:36:30 +01:00
85df6ada52 Prevent all workflow node and edge deletions made through the UI (#9918)
## Old

In the demo, I press the `Delete` key multiple times, and it deletes the
nodes.


https://github.com/user-attachments/assets/75bf84d3-b182-488c-a781-bbe236985142

## New


https://github.com/user-attachments/assets/4ae4f387-e143-4ce8-8140-6cb2c549f5d2
2025-01-29 18:29:01 +01:00
a4011676f0 Add e2e tests for the Use as Draft feature (#9845)
Test with and without a draft version as the last version of the
workflow
2025-01-24 18:38:35 +01:00
8213995887 Open showpage on workflow creation (#9714)
- Created an new component state
`isRecordEditableNameRenamingComponentState`
- Updated `useCreateNewTableRecord` to open the ShowPage on workflow
creation
- Refactored `RecordEditableName` and its components to remove the
useEffect (This was causing the recordName state to be updated after the
focus on `NavigationDrawerInput`, but we want the text so be selected
after the update).
- Introduced a new component `EditableBreadcrumbItem`
- Created an autosizing text input: This is done by a hack using a span
inside a div and the input position is set to absolute and takes the
size of the div. There are two problems that I didn't manage to fix:
If the text is too long, the title overflows, and the letter spacing is
different between the span and the input creating a small offset.


https://github.com/user-attachments/assets/4aa1e177-7458-4691-b0c8-96567b482206


New text input component:


https://github.com/user-attachments/assets/94565546-fe2b-457d-a1d8-907007e0e2ce
2025-01-22 14:44:10 +01:00
8e0467e2e4 Workflow E2E tests – batch 2 (#9747)
- Fix the e2e according to the last changes in the workflows
- Create a few more tests regarding the workflow visualizer
2025-01-21 11:46:27 +01:00
a9f186e85c start 0.41.0-canary 2025-01-20 15:38:40 +01:00
7ed2c12e7a Workflow e2e tests – 1st batch (#9713)
- Clean Playwright's configuration:
  - Remove artificial 500ms delay between each step
- Group all tests under a `chrome` project relying on a `setup` project
to get an authentication state which all tests can reuse
- Changes on the `Sign up with invite link via email` test:
- Generate a new email for each test trial, as previously it was failing
when run many times
- Make deleting the account part of the test; if we write other tests
for account sign-up, we'll prefer to delete the accounts with an HTTP
call to speed up things
- Added some assertions to ensure we reached steps when expected, as we
removed the 500ms delay between each step, and it made some assertions
fail
- Wrote new tests for workflows:
- Created `Create workflow`, a test asserting we can create a workflow
from the record table
- Created `Create simple workflow`, a test asserting we can create a
simple flow; I will add more assertions to this test and write other
tests once this first PR is approved
- I make HTTP calls to delete and destroy workflows after they run to
keep the database clean
- Added a data-testid to ensure we focus elements from the Cmd+K; our
selectors are not strong – see `getByRole('textbox')` – and I preferred
to scope them to a root element
  - Added an `aria-label` to a button

---------

Co-authored-by: prastoin <paul@twenty.com>
2025-01-20 10:59:01 +01:00
c1847054f8 Playwright E2E test - sign up with invite link via email (#9332)
Related to
https://github.com/twentyhq/twenty/issues/8469#issuecomment-2471573054

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2025-01-12 21:52:30 +01:00
92c119ed43 Add suggested values for variable dropdown (#9437)
<img width="378" alt="Capture d’écran 2025-01-07 à 15 37 20"
src="https://github.com/user-attachments/assets/c15abcac-684a-4c3b-ad12-62cf91afe927"
/>

Here is a first version:
- simple fields have a suggested value
- composite do not, but sub values of composite do
- json, arrays or complex values do not
2025-01-10 16:18:37 +01:00
afae244057 Add E2E tests (#9309)
Try adding E2E tests when labelling the PR or merging on main branch
2025-01-02 13:28:02 +01:00
6e0002b874 Add NX commands to twenty-e2e-testing package (#9222)
Related to #8469
2024-12-31 15:49:52 +01:00
c754585e47 Basic test verifying if demo account is working properly (#8442) 2024-12-17 13:56:00 +01:00
182ebb6394 Playwright tests - stage 1 - login with email and password test (#8988)
Scenario:
https://github.com/twentyhq/twenty/issues/8469#issuecomment-2471420099

To launch this test, `yarn playwright test --project Authentication`
must be used in `packages/twenty-e2e-testing` directory (for some reason
when launching this test from IDE, be Webstorm or VSCode, it won't fetch
the data from .env)
2024-12-12 11:05:25 +01:00
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
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
736635a94b Begin moving to postgres spilo + adding pgvector (#8309)
We will remove the `twenty-postgres` image that was used for local
development and only use `twenty-postgres-pilo` (which we use in prod),
bringing the development environment closer to prod and avoiding having
to maintain 2 images.


Instead of provisioning the super user after the db initialization, we
directly rely on the superuser provided by Spilo for simplicity. We also
introduce a change that tries to create the right database (`default` or
`test`) based on the context.
  

How to test:
```
docker build -t twentycrm/twenty-postgres-spilo:latest -f ./packages/twenty-docker/twenty-postgres-spilo/Dockerfile .
docker images --no-trunc | grep twenty-postgres-spilo
postgres-on-docker:
	docker run \
	--name twenty_pg \
	-e PGUSER_SUPERUSER=twenty \
	-e PGPASSWORD_SUPERUSER=twenty \
	-e ALLOW_NOSSL=true \
	-v twenty_db_data:/home/postgres/pgdata \
	-p 5432:5432 \
	REPLACE_WITH_IMAGE_ID
```
2024-11-15 09:38:30 +01:00
c571c9bdca Playwright POM (#8109)
Related to #6641
2024-11-07 15:38:28 +01:00
c3343d3600 Playwright basic utils (#7930)
Related to #6641
2024-11-07 15:34:53 +01:00
b1fbf4b683 E2E tests (#6717)
Continuation of #6644 

Now chromium browser is used in workspaces tests instead of firefox and
screenshots after each test are properly saved in one folder when run
from IDE and from terminal using `yarn test:e2e` command
2024-08-27 11:07:10 +02:00
197bca57ba feat(e2e): twenty-e2e-testing with playwright (#6539)
## ISSUE (e2e) - Introduces e2e for twenty

 - Closes #6360
 
##  Description

- [x] Create Package. 
- [x] Setup environments such as baseUrl.
- [x] ignore CI configuration for now.
- [x] write a simple test to check if table is visible in companies tab.

### Running test with UI

```
yarn run test:e2e:ui
```

https://github.com/user-attachments/assets/a7b7ae35-8898-461e-8c7c-d3e4e9515aeb

### Running all test and seeing report

```
yarn run test:e2e
yarn run test:e2e:report
```



https://github.com/user-attachments/assets/2558a1f9-97cc-4f06-86f0-806f207eac5a

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-08-14 17:23:32 +02:00