Commit Graph

2656 Commits

Author SHA1 Message Date
Félix Malfait
3df4b78e38
Fix dropdown menu header (#4835)
Fix an issue I add introduced by removing "position:static" and an other
regression from https://github.com/twentyhq/twenty/issues/4366
2024-04-05 10:31:08 +02:00
Ady Beraud
b82519301c
Website UI design (#4829)
**Fixed different issues** :
 
- Multiple CSS fixes: font-size, colors, margins, z-index ...
- Fixed hover on contributor avatars
- Added link to contributors in footer
- Made the year in the footer dynamic (2023 --> 2024)
- Added name of contributor in "Thank you" section of Contributor page
- Added footer in small screens
- Made Activity Log Responsive 
- Fixed bug in "saving issues to DB", title was null everywhere. I
needed to implement an "upsert" behaviour to update the existing
database on init

**To be noted :** 

There is the following bug on production happening on mobile when you
refresh a second time :

<img width="1440" alt="Screenshot 2024-04-05 at 01 30 58"
src="https://github.com/twentyhq/twenty/assets/102751374/b935b07a-63dc-463d-8dcb-070ad4ef6db0">


It seems to be related to the following issue on mdx :
[https://github.com/hashicorp/next-mdx-remote/issues/350](https://github.com/hashicorp/next-mdx-remote/issues/350)

I added the following code that fixed this bug for me in development
(this needs to be tested in production) :

```
const serialized = await serialize(content, {
    mdxOptions: {
      development: process.env.NODE_ENV === 'development',
    }
  })
```

---------

Co-authored-by: Ady Beraud <a.beraud96@gmail.com>
2024-04-05 08:41:08 +02:00
Charles Bochet
e8c58ae541
Make field input transparency consistent (#4828)
Minor fix until for the release 0.4.0 until we properly fix all input
background and backdrop-filters
2024-04-04 20:51:41 +02:00
Charles Bochet
499e1a09e3
Fix ScrollWrapper inner elements padding (#4827)
Closes https://github.com/twentyhq/twenty/issues/4824 and
https://github.com/twentyhq/twenty/issues/4788
2024-04-04 19:19:26 +02:00
Félix Malfait
65e665c74c
Add Sentry types to dependencies (#4825)
Someone reported an error during install that might be due to missing
types import.
2024-04-04 19:09:49 +02:00
Quentin G
5d6094dfa3
fix: update build script for twenty-emails (#4823)
Fix an issue with the build of the server in docker failing to find vite
2024-04-04 18:37:35 +02:00
Thaïs
e784dc8a98
chore: enable no-console eslint rule for tests and stories (#4816)
Re-enables no-console eslint rule in stories and tests files:
- In stories, use `action` from '@storybook/addon-actions' or `fn` from
'@storybook/test' instead of console.
- In tests, console methods can be mocked like this:
`global.console.error = jest.fn()`.
2024-04-04 18:36:39 +02:00
Charles Bochet
48b1be9917
Fix ViewPicker create mode: view type switcher (#4821)
In this PR, I'm fixing two things on the ViewPicker in Create mode:
- if the Dropdown has no max height, it should not be scrollable (which
is causing issue with inner dropdowns being cut by overflow: hidden
- if the user has changed the icon, the type or the name of the view,
consider the create form as isDirty and prevent its value to be
overriden by re-renders (cache updates for example)
2024-04-04 18:32:55 +02:00
Thaïs
1f98bc899d
feat: fetch database connections (#4813)
Closes #4757

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 17:27:36 +02:00
Weiko
f8edb6652e
Gracefully close Redis connection when cacheStorageModule is destroyed (#4812)
## Context
When running a command, the process should end normally however it stays
hanging due to the open connection with redis client (when
CACHE_STORAGE_TYPE=redis)
This PR adds the necessary logic to gracefully close the connection once
the module is destroyed. Thanks to that, the command process now
properly ends once executed.
2024-04-04 16:15:22 +02:00
Thaïs
f184541293
feat: add Database Connection Summary Card to Settings/Integrations/D… (#4791)
…atabase/Connection page

Closes #4558

<img width="542" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/16d7d8ce-57db-4e48-ba72-a2318a2d34a4">

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:56:52 +02:00
TRP
9d45f7811e
adjust window size for scroll (#4792)
related to #4749. 

Adjusted the max height for window so that it cuts the last option a
little.

I wanted to test the menu from the second pic in the issue with the
multi select option but could not figure out where it was in the
application.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:55:39 +02:00
Kanav Arora
18072d2935
Fixed attachment field type (#4811)
updatedAt and deletedAt field changed to string like createdAt field. On
file upload updatedAt field will be given date same as createdAt.

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:51:45 +02:00
Thomas Trompette
2e419091cc
Prevent remote object updates (#4804)
Backend: Adding a new util function that throw an error if the
objectMetadata is remote

Frontend: hiding the save button when remote

Also renaming `useObjectMetadataItemForSettings` since this hook is used
in other places than settings and is not in the settings repo. Name can
definitely be challenged!

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 15:47:08 +02:00
Thaïs
c5349291c8
chore: setup twenty-ui absolute path alias (#4732)
Split from https://github.com/twentyhq/twenty/pull/4518

- Setup `@ui/*` as an internal alias to reference `twenty-ui/src`.
- Configures twenty-front to understand the `@ui/*` alias on development
mode, so twenty-ui can be hot reloaded.
- When building on production mode, twenty-front needs twenty-ui to be
built beforehand (which is automatic with the `dependsOn` option).
- Configures twenty-front to understand the `@ui/*` alias when launching
tests, so there is no need to re-build twenty-ui for tests.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 15:38:01 +02:00
Thomas Trompette
41960f3593
Remote objects: Fix comment override - id typing - label (#4784)
Several fixes for remote objects:
- labels are now displayed in title case. Added an util for this.
- Ids are often integers but the foreign keys on the relations were
uuid. Sending the id type to the object metadata service so it can
creates the foreign key accordingly
- Graphql comments are override when several remote objects are
imported. Building a function that fetch the existing comment and update
it

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 15:35:49 +02:00
Kanav Arora
f8ec40dbfb
Fix: File Upload (#4806)
File upload issue fixed.
There was a type mismatch and isDate was returning false
2024-04-04 15:33:17 +02:00
Jérémy M
04c06e3f91
fix: isIconDisplayedOnHoverOnly marked as required (#4805)
Fix PR #4676, `isIconDisplayedOnHoverOnly` should be provided or not
marked as required
2024-04-04 14:38:54 +02:00
Basant Besra
9d2bb33646
fix: Add isIconStatic prop item to allow the icons to be always rendered statically ignoring hover behaviour (#4676)
Fix #4653

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-04 14:05:56 +02:00
bosiraphael
85caed3463
4702 rename calendareventattendee to calendareventparticipant (#4761)
Closes #4702
2024-04-04 14:00:10 +02:00
Marie
357882c395
[feat][FE] Enable deletion of custom fields in workspace (#4802)
**Context**
Fixes https://github.com/twentyhq/twenty/issues/4597
Enables deletion of custom fields that aren't active nor of type
relation ([BE PR](https://github.com/twentyhq/twenty/pull/4780))

**How was it tested?**
Locally tested

<img width="541" alt="Capture d’écran 2024-04-04 à 13 33 18"
src="https://github.com/twentyhq/twenty/assets/51697796/bc462b86-b494-409e-9836-69bdaeb812cb">
<img width="661" alt="Capture d’écran 2024-04-04 à 13 34 25"
src="https://github.com/twentyhq/twenty/assets/51697796/8fe47114-545e-48b5-a107-34be531b7ea5">
2024-04-04 13:45:15 +02:00
Charles Bochet
b1a586d324
Fix View creation, view fields re-ordering, view filters and view sorts erratic behaviors (#4800)
We used to not type properly the return of getRecordFromCache before the
work from last week.
The getViewFromCache function was patching this temporarily in a "dirty"
way.

Now that this is cleaner, I'm removing the typescript patch. This fixing
several behaviors on viewBar
2024-04-04 13:24:58 +02:00
Thaïs
eef1211463
chore: include react components in twenty-ui test config (#4709)
Split from https://github.com/twentyhq/twenty/pull/4518

Part of https://github.com/twentyhq/twenty/issues/4766

- Re-generates some of the twenty-ui test and storybook config with Nx
- Includes tsx files in twenty-ui tests and compiles them with swc

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 12:30:49 +02:00
Thaïs
932a8d68f5
chore: add script to generate twenty-ui barrels before build (#4707)
Split from https://github.com/twentyhq/twenty/pull/4518

Part of #4766 

Adds a script to auto-generate twenty-ui exports in `index.ts` files.

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 12:14:20 +02:00
Thaïs
bf8ee99ebb
chore: use common eslint config for most packages (#4705)
Split from https://github.com/twentyhq/twenty/pull/4518

Related to #4766 

Mutualizes eslint config between projects.
I didn't include `twenty-server` in this PR as this was causing too many
lint errors.
2024-04-04 12:05:26 +02:00
Muralidhar
ff0db8d716
fix: linked records redirection (#4312)
Closes: #4093 
---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 11:01:33 +02:00
Thaïs
f58d855097
feat: add Settings/Integrations/Database/New Connection form (#4787)
Closes #4554

<img width="556" alt="image"
src="https://github.com/twentyhq/twenty/assets/3098428/56738254-aa43-4bfd-b7c5-29a9e1b7258f">

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-04 10:03:40 +02:00
rostaklein
306ef1df9c
feat: schema version header check (#4563)
closes https://github.com/twentyhq/twenty/issues/4479

tried to catch the error inside various places including
https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/integrations/exception-handler/exception-handler.service.ts
but it seems like the error never reaches the GraphQL module 😮

any idea where we could intercept such an error `Cannot query field`?

---------

Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
2024-04-04 09:52:45 +02:00
Quentin G
eab65f34f9
feat(ci): use concurrency.group to cancel previous jobs (#4795)
As recommended on the repo of the action we were using
https://github.com/styfle/cancel-workflow-action, we should use
`concurrency.group` rather than a dedicated action.

Here is a PR to use it on all our workflows
2024-04-04 09:30:55 +02:00
Kanav Arora
bcf5268f7f
3886 - Shortcut Sort/Filter (#3901)
Closes #3886

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-04 00:43:44 +02:00
Félix Malfait
b65d82c274
Force explicit deletion behavior for relations (#4775)
We've seen a few cascading errors (e.g. comment.activityId would be non
nullable but cascade behavior is set to "set null"). I think it's safer
if we have to explicitly chose the deletion behavior it every time.

Especially since Postgres default to "No action" while we defaulted to
"Set Null", which is confusing.

In the future we will most likely introduce a second param
`onSoftDelete` in the decorator
2024-04-03 18:30:12 +02:00
Quentin G
ccd02fe58c
feat: init docker compose test (#4730)
Job testing if docker compose is working. It triggers on pull_requests.
2024-04-03 18:08:21 +02:00
martmull
6d23642d28
4777 multi select field backend implement multi select type (#4790)
- fix default value for multi select field metadata
2024-04-03 17:19:24 +02:00
Marie
ff6abacc86
[feat] Enable deletion of custom fields in workspace (#4780)
**Context**
cf. feature request
[#4597](https://github.com/twentyhq/twenty/issues/4597)
Enables deletion of custom fields that aren't active nor of type
relation

Also 
1. renamed a misnamed file
2. deleted redundant hook BeforeDeleteOneField as it seemed best to move
the logic to the resolver instead

**How was it tested?**
Did not write unit tests as code is to be migrated (discussed with
@Weiko).
Locally tested.

---------

Co-authored-by: Marie Stoppa <mariestoppa@MacBook-Pro-de-Marie.local>
2024-04-03 17:17:23 +02:00
martmull
358269c60e
Add IS_MULTI_SELECT_ENABLED feature flag (#4779)
closes #4776
2024-04-03 17:15:38 +02:00
Thaïs
5c3e5a0d8a
feat: create Settings/Integrations/Database/Connection page (#4785)
Closes #4556

- Renames some pages and components after discussion about terminology
with @thomtrp.
- Creates the Settings/Integrations/Database/Connection page.
2024-04-03 17:15:02 +02:00
Félix Malfait
7a34dc4910
Simplify docs and remove Docker local setup (#4783)
Having 2 different dev setups caused confusion, let's remove the Docker
local setup and recommend people install yarn locally.

Also simplified some docs by merging pages together, the recommend
self-hosting option is now the docker-compose / to adapt the
docker-compose.
2024-04-03 16:38:28 +02:00
Thomas Trompette
1c6f0eb577
Integrate relations for remote objects (#4754)
Foreign table id cannot be a foreign key of a base table. But the
current code use foreign keys to link object metadata with activities,
events... So we will:
- create a column without creating a foreign key
- add a comment on the table schema so pg_graphql sees it as a foreign
key

This PR:
- refactor a bit object metadata service so the mutation creation is
separated into an util
- adds the mutation creation for remote object relations
- add a new type of mutation to create a comment

---------

Co-authored-by: Thomas Trompette <thomast@twenty.com>
2024-04-03 14:56:51 +02:00
Félix Malfait
3b72eed2dc
Fix issue caused by a merge conflict (#4768) 2024-04-03 09:18:33 +02:00
Aditya Pimpalkar
6ed0a5e2d6
feat: Redirect to previous page after login (#4731)
fix: #4721
2024-04-03 08:05:18 +02:00
Thomas des Francs
5f6109bb53
Changelog for 0.4.0 (#4693)
**Wait for 0.4.0 to be deployed!**

![CleanShot 2024-03-28 at 15 53
31@2x](https://github.com/twentyhq/twenty/assets/19412894/f22eb1d5-bf91-413b-8dc8-8631ff48a89d)

![CleanShot 2024-03-28 at 15 53
46@2x](https://github.com/twentyhq/twenty/assets/19412894/5f91d0ae-ce90-41b1-b4bb-94c917bab42e)
2024-04-02 19:09:32 +02:00
martmull
7dc053c576
Add back export all action button (#4750)
![image](https://github.com/twentyhq/twenty/assets/29927851/e78186bf-c6ab-4ae6-8041-eb9ac2e86f90)

![image](https://github.com/twentyhq/twenty/assets/29927851/048dc9b3-c6e5-4049-8344-16b6fee48059)
2024-04-02 19:08:48 +02:00
Weiko
35ddb9acb5
[messaging] rename syncExternalId to syncCursor (#4752)
## Context

SyncExternalId should be renamed because this won't always represent an
id. For example, microsoft API does not use ids but dates for their
sync. Also we think external is a bit redundant so we are removing it.

Note: this field is not used by the front-end (and will probably never
be)
2024-04-02 18:18:43 +02:00
kikoleitao
9364a58477
Fix #4160: fix upload image bug (#4734)
# Context
This PR addresses the solving of the upload image issue.
(Fixes #4160)

# Cause
The `<StyledBlockNoteStyledContainer onClick={() => editor.focus()}>`
handler was the origin of the problem, after removing it the issue
disappeared, maintaining all the other functionalities.

# Outcome
_Videos before and after removal:_


https://github.com/twentyhq/twenty/assets/92337535/9d8eb635-4164-4fea-a763-19becabf44ac


https://github.com/twentyhq/twenty/assets/92337535/8fedb50f-5306-42ad-be21-58d89ff7d1c7
2024-04-02 16:31:18 +02:00
Simão Sanguinho
bc6db2d8b0
fix panel opening wrapping glitch (#4204) (#4673)
Fix: (#4204)

The issue was that when that panel was opened its content would wrap
instead of maintaining its desired structure. I fixed this bug by adding
a minimum width to the panel's contents so that they would stay
correctly formatted throughout the opening transition.

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-04-02 16:20:08 +02:00
Anoop P
bbffde1ca0
New field currency (#4338)
Closes #4122 
---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-02 15:29:57 +02:00
Jeet Desai
d694ab1b16
Fix: Update Icon Button Color and Menu Transparency with Icons (#4704)
Fixes: #4654
2024-04-02 12:32:17 +02:00
Charles Bochet
514417245a
Add JsDom to server dependencies (#4740)
We were missing `JsDom` dependencies in the package.json generated by nx
while running `twenty-server`: `yarn nx build:packageJson`

Detailed explanation: 
- we are currently using nx paradigm which is to put dependencies of all
projets at root, which enables global package migrations for the whole
monorepo
- for production containers, we only want specific project dependency to
be added. This is done by running `yarn nx build:packageJson` on
`twenty-server`. Nx is statically analyzing twenty-server dependencies
and generating a tailored package.json that production containers can
later use.
- However, `nx` static analysis is not flawless and is missing some
packages. We are going to stop using it as the value is not there yet
but the burden for developers is high. The guideline is to put back
project dependencies into specific package `package.json`
- Therefore, I'm adding `jsdom` to twenty-server `package.json`
2024-04-02 12:07:12 +02:00
bosiraphael
ffb1733f39
Fix invalid token after credentials change (#4717)
- If sync fails we set authFailedAt
- This information is displayed in the frontend in accounts with a `Sync
Failed` pill
- The user can reconnect his account in the dropdown menu
- A new OAuth flow is triggered
- The account is synced
2024-04-02 11:32:27 +02:00
Weiko
a3a15957f4
Revert company address field type (#4737)
## Context
A new ADDRESS field type has been introduced and the company object has
been updated to use this new type however this introduced a few
regressions.
The good strategy would be to introduce a new field and rename the old
one.

This PR revert that change to fix the issue.
2024-04-02 11:11:14 +02:00