### 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>
## 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).
querying workspaceMembers may be slow leads to wrong
setNextOnboardingStatus value. So we added a resolved field in workspace
to get workspaceMemberCount directly
- move front `onboardingStatus` computing to server side
- add logic to `useSetNextOnboardingStatus`
- update some missing redirections in
`usePageChangeEffectNavigateLocation`
- separate subscriptionStatus from onboardingStatus
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
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>
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.
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>
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()`.
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.
* 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
* 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>
* 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
* 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
* 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>