Commit Graph

35 Commits

Author SHA1 Message Date
gitstart-app[bot]
4ceee4ab8f
Migrate to twenty-ui - feedback/loader (#7997)
This PR was created by [GitStart](https://gitstart.com/) to address the
requirements from this ticket:
[TWNTY-7528](https://clients.gitstart.com/twenty/5449/tickets/TWNTY-7528).

 --- 

### Description

- Move loader components to `twenty-ui`    
  
Fixes  twentyhq/private-issues#90

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-24 16:19:32 +02:00
Baptiste Devessier
05e8f8a0b1
Use <label> HTML element when possible (#7609)
This PR:

- Uses `<label>` HTML elements when possible to represent labels
- Uses the new `useId()` React hook to get an identifier to link the
label with its input; it's more suitable than generating a UUID at every
render

Fixes #7281

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-10-13 20:04:24 +02:00
gitstart-app[bot]
846953b0f4
Support for multiple values in the Phone field (#6882)
### Description

- This is the first PR on Phones field;


- We are introducing new field type(Phones)


- We are Forbidding creation of Phone field


- We Added support for filtering and sorting on Phones field


- We are using the same display mode as used on the Links field type
(chips), check the Domain field of the Company object


- We are also using the same logic of the link when editing the field

**How to Test**

1. Checkout to TWNTY-6260 branch
2. Reset database using "npx nx database:reset twenty-server" command
3. Add custom field of type Phones in settings/data-model

**Loom Video:**\

<https://www.loom.com/share/3c981260be254dcf851256d020a20ab0?sid=58507361-3a3b-452c-9de8-b5b1abda70ac>

### Refs

#6260

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
2024-09-11 11:15:04 +02:00
Charles Bochet
17a1760afd
Improve performance twenty orm (#6691)
## Context

As we grow, the messaging scripts are experiencing performance issues
forcing us to temporarily disable them on the cloud.
While investigating the performance, I have noticed that generating the
entity schema (for twentyORM) in the repository is taking ~500ms locally
on my Mac M2 so likely more on pods. Caching the entitySchema then!

I'm also clarifying naming around schemaVersion and cacheVersions ==>
both are renamed workspaceMetadataVersion and migrated to the workspace
table (the workspaceCacheVersion table is dropped).
2024-08-20 19:42:02 +02:00
Félix Malfait
f2cc385710
Fix frontend tests (#6585)
Fix a few broken tests
2024-08-09 08:38:01 +02:00
Aakarshan Thapa
1529148c04
Updated MessageChannelSyncStatus enum: changed COMPLETED to ACTIVE (#5965)
Fixes #5961

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-07-25 21:17:55 +02:00
Marie
26bffce23b
[Fix] Remove usage of deprecated FieldMetadata type probability (#6279)
Bad timing between merge of
364caf0fdf
and
c0f6f52669
a few minutes apart caused issues. Fixing it here !
2024-07-16 11:36:10 +02:00
martmull
cce9bf5730
Improve use set next onboarding state (#6076)
querying workspaceMembers may be slow leads to wrong
setNextOnboardingStatus value. So we added a resolved field in workspace
to get workspaceMemberCount directly
2024-06-30 21:00:20 +02:00
martmull
b8f33f6f59
5095 move onboardingstatus computation from frontend to backend (#5954)
- move front `onboardingStatus` computing to server side
- add logic to `useSetNextOnboardingStatus`
- update some missing redirections in
`usePageChangeEffectNavigateLocation`
- separate subscriptionStatus from onboardingStatus
2024-06-28 17:32:02 +02:00
Charles Bochet
158e7a31f4
Improve tests (#5994)
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
2024-06-23 20:12:18 +02:00
martmull
3986824017
5623 add an inviteteam onboarding step (#5769)
## Changes
- add a new invite Team onboarding step
- update currentUser.state to currentUser.onboardingStep

## Edge cases
We will never display invite team onboarding step 
- if number of workspaceMember > 1
- if a workspaceMember as been deleted

## Important changes
Update typeorm package version to 0.3.20 because we needed a fix on
`indexPredicates` pushed in 0.3.20 version
(https://github.com/typeorm/typeorm/issues/10191)

## Result
<img width="844" alt="image"
src="https://github.com/twentyhq/twenty/assets/29927851/0dab54cf-7c66-4c64-b0c9-b0973889a148">



https://github.com/twentyhq/twenty/assets/29927851/13268d0a-cfa7-42a4-84c6-9e1fbbe48912
2024-06-12 21:13:18 +02:00
martmull
9f6a6c3282
5622 add a syncemail onboarding step (#5689)
- add sync email onboarding step
- refactor calendar and email visibility enums
- add a new table `keyValuePair` in `core` schema
- add a new resolved boolean field `skipSyncEmail` in current user




https://github.com/twentyhq/twenty/assets/29927851/de791475-5bfe-47f9-8e90-76c349fba56f
2024-06-05 18:16:53 +02:00
Aditya Pimpalkar
a12c1aad5e
fix: user has to login every time chrome sidepanel is opened (#5544)
We can pass the auth tokens to our front app via post message, which
will also allow us to pass route names to navigate on it
2024-05-30 12:58:45 +02:00
Aditya Pimpalkar
008813f194
fix: twenty-chrome-extension:"graphql:generate" (#5649)
fixes: #5645
2024-05-29 14:45:32 +02:00
Thaïs
c7d61e183a
feat: simplify field preview logic in Settings (#5541)
Closes #5382

TODO:

- [x] Test all field previews in app
- [x] Fix tests
- [x] Fix JSON preview
2024-05-24 18:06:57 +02:00
Aditya Pimpalkar
f9a3d5fd15
chore: remove OAuth from chrome extension (#5528)
Since we can access the tokens directly from cookies of our front app,
we don't require the OAuth process to fetch tokens anymore
2024-05-24 00:01:47 +02:00
Charles Bochet
29c27800fb Fix vite.config duplicate cache configuration 2024-05-21 20:36:25 +02:00
Aditya Pimpalkar
eb78be6c61
feat: replace iframe with chrome sidepanel (#5197)
fixes - #5201


https://github.com/twentyhq/twenty/assets/13139771/871019c6-6456-46b4-95dd-07ffb33eb4fd

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-05-21 10:39:43 +02:00
Joe S
9bc9513845
Edit opacity from 0.8 to 0.5 and remove forBackdropFilter (#5291)
Update for #4836 

- edit primary and secondary transparency opacities from 0.8 to 0.5
- remove forBackdropFilter from themes
- update components referencing transparency/primary and
transparency/secondary to have the following backdrop-filter: blur(12px)
saturate(200%) contrast(50%) brightness(130%)

---------

Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
2024-05-16 17:19:27 +02:00
Aditya Pimpalkar
ea5a7ba70e
feat: add renew token query for apollo client (chrome-extension) (#5200)
fixes - #5203
2024-05-16 10:21:16 +02:00
Aditya Pimpalkar
2828492945
chore: add nx/project.json to twenty-chrome-extension (#5217)
Fix for `build` CI on `twenty-chrome-extension`

---------

Co-authored-by: Thaïs Guigon <guigon.thais@gmail.com>
2024-05-06 11:33:48 +02:00
Thaïs
c193663a71
chore: use Nx affected tasks in CI (#5110)
Closes #5097

- Uses "nx affected" to detect what projects need to be checked in the
current PR (for now, `ci-front` and `ci-server` workflows only).
- Caches results of certain tasks (`lint`, `typecheck`, `test`,
`storybook:build`) when a PR pipeline runs. The next runs of the same
PR's pipeline will then be able to reuse the PR's task cache to execute
tasks faster.
- Caches Yarn's cache folder to install dependencies faster in CI jobs.
- Rewrites the node modules cache/install steps as a custom, reusable
Github action.
- Distributes `ci-front` jobs with a "matrix" strategy.
- Sets common tasks config at the root `nx.json`. For instance, to
activate the `typecheck` task in a project, add `typecheck: {}` to its
`project.json` and it'll use the default config set in `nx.json` for the
`typecheck` task. Options can be overridden in each individual
`project.json` if needed.
- Adds "scope" tags to some projects: `scope:frontend`, `scope:backend`,
`scope:shared`. An eslint rule ensures that `scope:frontend` only
depends on `scope:frontent` or `scope:shared` projects, same for
`scope:backend`. These tags are used by `nx affected` to filter projects
by scope and generates different task cache keys according to the
requested scope.
- Enables checks for twenty-emails in the `ci-server` workflow.
2024-04-30 16:28:25 +02:00
Aditya Pimpalkar
c63ee519ea
feat: oauth for chrome extension (#4870)
Previously we had to create a separate API key to give access to chrome
extension so we can make calls to the DB. This PR includes logic to
initiate a oauth flow with PKCE method which redirects to the
`Authorise` screen to give access to server tokens.

Implemented in this PR- 
1. make `redirectUrl` a non-nullable parameter 
2. Add `NODE_ENV` to environment variable service
3. new env variable `CHROME_EXTENSION_REDIRECT_URL` on server side
4. strict checks for redirectUrl
5. try catch blocks on utils db query methods
6. refactor Apollo Client to handle `unauthorized` condition
7. input field to enter server url (for self-hosting)
8. state to show user if its already connected
9. show error if oauth flow is cancelled by user

Follow up PR -
Renew token logic

---------

Co-authored-by: Félix Malfait <felix@twenty.com>
2024-04-24 11:45:16 +02:00
Thaïs
d3170fc1ea
fix: fix root start script (#5032)
Fixes #5022

See https://nx.dev/recipes/running-tasks/root-level-scripts#setup
2024-04-19 18:28:02 +02:00
Aditya Pimpalkar
14f97e2e80
fix: "Add to Twenty" button render fix (chrome-extension) (#5048)
fix - #5047
2024-04-19 18:13:53 +02:00
gitstart-app[bot]
7211730570
New field type: DATE (#4876)
### Description
New field type: DATE

### Refs
https://github.com/twentyhq/twenty/issues/4377

### Demo

https://jam.dev/c/d0b59883-593c-4ca3-966b-c12d5d2e1c32

Fixes #4377

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: Toledodev <rafael.toledo@engenharia.ufjf.br>
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-04-11 17:29:29 +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
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
Aditya Pimpalkar
5c5dcf5cb5
feat: check if company/person saved (chrome-extension) (#4280)
* add twenty icon

* rest api calls for company

* check if company exists

* refacto

* person/company saved call

* gql codegen init

* type defs

* build fix

* DB calls with gql codegen and apollo integration
2024-03-26 14:37:36 +01:00
Danil
235e71ca02
Update backdrop-filter in OverlayBackground.ts (#4436)
* Update backdrop-filter in OverlayBackground.ts

* Fix backdrop-filter in OverlayBackground.ts

* Update opacity of menu item, to be constantly 0

* Fixes

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-03-15 17:19:27 +01:00
Aditya Pimpalkar
638a12c571
feat: iframe addition (chrome-extension) (#4418)
* toggle iframe addition

* React UI init

* remove files

* loading state files

* render iframe logic

* remove event

* build fix

* WIP

* Ok

* Cleaned

---------

Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-03-15 16:36:53 +01:00
Abdullah
2a05de5289
Chrome Extension: Update logo and change default routes to those of Twenty prod (#4046). (#4172)
* fix: replace twenty logo in the png format with one in the svg format for better resolution

* fix: toggle the custom url switch to true if the local storage contains a server base url different from that of the env variable

* fix: update the front base url and the server base url to those of the production environment in the .env.example file

* fix: update README to add a step for changing env variables to those of the development environment for contributors or local testers
2024-02-26 09:05:59 +01:00
Abdullah
d14bb2ea11
Add linter to Chrome Extension (#4044). (#4174)
* feat: configure eslint rules by replicating those in the twenty-front package and introduce scripts for linting, formatting code and removing build output

* fix: ensure each file of the extension package satisfies linting rules and disable some rules where necessary

* fix: update relative imports to absolute imports throughout extension code with the defined tilde and at symbols

* fix: import the updated ui module from the front package to the chrome extension package to prevent eslint rules from breaking subject to the recent merged changes into main

* fix: commit the case change for files that were missed by Git in the earlier commits due to default configuration
2024-02-25 17:32:08 +01:00
gitstart-app[bot]
f543191552
TWNTY-3825 - ESLint rule: const naming (#4171)
* ESLint rule: const naming

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>

* Refactor according to review

Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>

* refactor: Reverts changes on `twenty-server`

Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>

---------

Co-authored-by: gitstart-twenty <gitstart-twenty@users.noreply.github.com>
Co-authored-by: v1b3m <vibenjamin6@gmail.com>
Co-authored-by: KlingerMatheus <klinger.matheus@gitstart.dev>
2024-02-25 13:52:48 +01:00
Abdullah
1265dc74d0
Closes #2413 - Building a chrome extension for twenty to store person/company data into a workspace. (#3430)
* build: create a new vite project for chrome extension

* feat: configure theme per the frontend codebase for chrome extension

* feat: inject the add to twenty button into linkedin profile page

* feat: create the api key form ui and render it on the options page

* feat: inject the add to twenty button into linkedin company page

* feat: scrape required data from both the user profile and the company profile

* refactor: move modules into options because it is the only page using react for now

* fix: show add to twenty button without having to reload the single page application

* fix: extract domain of the business website instead of scrapping the industry type

* feat: store api key to local storage and open options page when trying to store data without setting a key

* feat: send data to the backend upon click and store it to the database

* fix: open options page upon clicking the extension icon

* fix: update terminology from user to person to match the codebase convention

* fix: adopt chrome extension to monorepo approach using nx and get the development server working

* fix: update vite config for build command to work per the requirement

* feat: add instructions in the readme file to install the extension for local testing

* fix: move server base url to a dotenv file and replace the hard-coded url

* feat: permit user to configure a custom route for the server from the options page

* fix: fetch api key and route from local storage and display on options page to inform users of their choices

* fix: move front base url to dotenv and replace the hard-coded url

* fix: remove the trailing slash from person and company linkedin username

* fix: improve code commenting to explain implementation somewhat better

* ci: introduce a workflow to build chrome extension to ensure it can be published

* fix: format files to display code in a consistent manner per the prettier configuration in codebase

* fix: improve the commenting significantly to explain important and hard-to-understand parts of the code

* fix: remove unused permissions from the manifest file for publishing to the chrome web store

* Add nx

* Fix vale

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-02-12 12:30:23 +01:00