* feat: create ViewField model
- Created ViewField prisma model
- Added ViewField server resolvers for findMany/updateOne
- Added getViewFields/updateViewField graphql queries
Closes#849
* chore: update node version in .nvmrc files
* Removed isSomeInputInEditMode
* Removed console.log
* Added a first version of generic cell text
* Removed metadata from entity table V1
* Fix
* Fix
* Fix
* docs: use PageDecorator
* docs: use decorators in TableHeader stories
* docs: use theming parameter in App stories
* docs: enable auto-generated docs for stories
Closes#702
* Enable company name edition from page
* Enable editing persons as well
* Add styling for titles
* Better manage style with inheritance
* Add stories for poeple editable fields
* Remove failing test
* Revert "Remove failing test"
This reverts commit 02cdeeba64276a26f93cf4af94f5857e47d36fff.
* Fix test
* Update name
* Fix location
* Rename tests
* Fix stories
* WIP
* Add menu for rename/color select
* Add stories
* Remove useless code
* Fix color name, add icon for selected color
* Remove useless comment
* Unify color vocabulary
* Fix rebase
* Rename story
* Improve hotkeys and imports
* feat: no atomic
* feat: update front not atomic operations
* feat: optional fields for person model & use proper gql type
* Fix bug display name
* Fix bug update user
* Fixed bug avatar URL
* Fixed display name on people cell
* Fix lint
* Fixed storybook display name
* Fix storybook requests
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* Removed console log
* Used current scope as default parent scope for fields
* Finished editable fields on people show page
* Added stories
* Console log
* Lint
* feat: add color scheme toggle
* feat: colorScheme stored in UserSettings model
* feat: add stories
* fix: AnimatePresence exit not working
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* feat: add back button in company details top bar
Closes#636
* Add back button on person page
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Add link to company page
* Have company chip background color matchin the card's
* Revert "Have company chip background color matchin the card's"
This reverts commit 8e9575fd933f9efb8d6614ec7287d6be28b81f7e.
* Create chip variants
* Lint
* code style
* Fix tests
* Fix tests
* Fix tests
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Get pipeline progress from stage IDs
* Rename hooks file
* Addd first amount filter
* Add remaining filters
* Design fixes
* Add filtering on creation date or amount
* Fix card updates and creations with the new state management
* Keep ordering when dropping a card
* Add remainint sorts
* Make board header more generic
* Move available filters and sorts to board options
* Fix decorators for test
* Add pipeline stage ids to mock data
* Adapt mock data
* Linter
* Move useFilteredSearchEntityQuery from relation picker to search module
* refactor duplicated code with useFilteredSearchCompanyQuery
* Implement similar pattern for people than for companies with useFilteredSearchEntityQuery
* Fix warning from a previous PR
* Enable search from menu
* Add companies to search
* Fix ESLint
* Refactor
* Fix according to peer review
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Move filter and sort compoenets in a separate lib
* Add SortAndFilterBar to the filter lib
* Abstract hotkeys scopes
* Fix hotkeys on filters
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Change placeholder color and design fixes for show page / sidebar
* Replace hardcoded border radiuses
* Improve border display for middle of button group
* Editor styling
* Editor font size
* Comment Bar positioning and remove scrollbar for 1px
* Add Comments section title
* Nit: match css style
---------
Co-authored-by: Emilien <emilien.chauvet.enpc@gmail.com>
* feat: colored avatar
* fix: use id instead of name & remove unused
* fix: remove unused
* Allow empty ID to avoid empty string
* Fix tests
* Add person chip story
---------
Co-authored-by: Emilien <emilien.chauvet.enpc@gmail.com>
* feat: workspace update name and logo
* fix: remove logs
* fix: disable warning until refacto
* Fix text
---------
Co-authored-by: Emilien <emilien.chauvet.enpc@gmail.com>
* fix: clean small back-end issues
* fix: apollo factory causing infinite loop on token renew
* feat: small refactor and add ability to remove workspace member
* fix: test
* Begin adding show view and refactoring threads to become notes
* Progress on design
* Progress redesign timeline
* Dropdown button, design improvement
* Open comment thread edit mode in drawer
* Autosave local storage and commentThreadcount
* Improve display and fix missing key issue
* Remove some hardcoded CSS properties
* Create button
* Split company show into ui/business + fix eslint
* Fix font weight
* Begin auto-save on edit mode
* Save server-side query result to Apollo cache
* Fix save behavior
* Refetch timeline after creating note
* Rename createCommentThreadWithComment
* Improve styling
* Revert "Improve styling"
This reverts commit 9fbbf2db00.
* Improve CSS styling
* Bring back border radius inadvertently removed
* padding adjustment
* Improve blocknote design
* Improve edit mode display
* Remove Comments.tsx
* Remove irrelevant comment stories
* Removed un-necessary panel component
* stop using fragment, move trash icon
* Add a basic story for CompanyShow
* Add a basic People show view
* Fix storybook tests
* Add very basic Person story
* Refactor PR1
* Refactor part 2
* Refactor part 3
* Refactor part 4
* Fix tests
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Move code to new folder
* Deduplicate code, remove dependancy on table
* Remove more table dependency
* Move close logic to input
* Migrate editable text cell
* Rename EditableTextInput
* Fix component test id
* wip
* - Added scopes on useHotkeys
- Use new EditableCellV2
- Implemented Recoil Scoped State with specific context
- Implemented soft focus position
- Factorized open/close editable cell
- Removed editable relation old components
- Broke down entity table into multiple components
- Added Recoil Scope by CellContext
- Added Recoil Scope by RowContext
* First working version
* Use a new EditableCellSoftFocusMode
* Fixes
* wip
* wip
* wip
* Use company filters
* Refactored FilterDropdown into multiple components
* Refactored entity search select in dropdown
* Renamed states
* Fixed people filters
* Removed unused code
* Cleaned states
* Cleaned state
* Better naming
* fixed rebase
* Fix
* Fixed stories and mocked data and displayName bug
* Fixed cancel sort
* Fixed naming
* Fixed dropdown height
* Fix
* Fixed lint
* fix: add firstname and lastanme to user model
* fix: avoid undefined in displayName resolve field
* fix: user firstName and lastName instead of firstname lastname
* fix: person table proper naming firstName lastName
* fix: migrate front with firstName and lastName
* fix: make front-graphql-generate not working
* wip
* wip
* - Added scopes on useHotkeys
- Use new EditableCellV2
- Implemented Recoil Scoped State with specific context
- Implemented soft focus position
- Factorized open/close editable cell
- Removed editable relation old components
- Broke down entity table into multiple components
- Added Recoil Scope by CellContext
- Added Recoil Scope by RowContext
* First working version
* Use a new EditableCellSoftFocusMode
* Fixed initialize soft focus
* Fixed enter mode
* Added TODO
* Fix
* Fixes
* Fix tests
* Fix lint
* Fixes
---------
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
* fix: add ellipsis in all table cells
* fix: workspace click redirect to home
* fix: add company chip story and edit comment cell story
* fix: remove cursor pointer on workspace name
* fix: snoop pill height
* fix: rebase
* feature: add navigation for opportunities
* chore: add companies in pipeline seed
* feature: make the board scrollable
* feature: make the board scrollable vertically
* feature: remove board container
* feature: fix newButton style
* feature: add onClickNew method on board
* feature: call backend with hardcoded id for new pipeline progressable
* feature: refetch board on click on new
* feature: use pipelineProgressId instead of entityId to ensure unicity of itemKey
* feature: avoid rerender of columns when refetching
* Fix some icon display size + fix padding issue on EditableChip component
* Fix according to PR
* Fix server generate and deploy scripts
* Fix image size on Opportunities board
* Fix lint
* Fix according to PR
* feature: create boardCard component
* test: add snapshot for BoardCards
* feature: fix typename of company
* feature: add max width on BoardItem
* feature: design CompanyBoardCard
* feature: Add People picture and name
* feature: design PeopleCard
* feature: fix font weight for card header
* test: fix storybook for board
* test: add unit test for column optimistic renderer
* Add a custom rule to prevent colors from being hardcoded in ESLint
* Refactor colors
* Create packages folder and fix colors
* Remove external dependency for css alphabetical order linting
* Fix install with yarn
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* feature: get pipelines columns from backend
* feature: display item not found instead of crashing
* feature: add BoardCard component
* feature: display items from the backend
* refactor: extract useBoard in a hook
* refactor: export only loading and error from useBoard
* refactor: create var pipelineStage
* feature: implement support for Company boards
* Created dropdown menu UI component with story
* Added all components for composing Dropdown Menus
* Better component naming and reordered stories
* Solved comment thread from review
* Make the sidebar collapsable
* Fix padding
* Automatically collapase sidebar and hide container on mobile
* Hide navbar content when navbar is collapsed
* Update naming convention for states
* Added comments and authors on drawer with proper resolving
* Fixed generated front graphql from rebase
* Fixed comment chip
* wip
* wip 2
* - Added string typing for DateTime scalar
- Refactored user in a recoil state and workspace using it
- Added comment creation
* Put theme and user state in generic providers
* Fix from rebase
* Fixed app theme provider removed from storybook
* Wip
* Fix graphql front
* Fixed backend bug
* - Added comment fetching in creation mode
- Fixed drawer overflows and heights
* - Fixed autosize validation button CSS bug
* Fixed CSS bug with drawer changing height if overflow
* Fixed text input too many event catched and useless error message
* Removed console.log
* Fixed comment cell chip
* Create comment thread on each comment action bar click
* Fixed lint
* Fixed TopBar height
* refactor: extract data from Board component
* feature: display board on opportunities page
* test: add strict mode in storybook
* chore: replace dnd to make it work with React 18 and strict mode
Atlassion has not fixed this issue in a year so we use the fork @hello-pangea/dnd
https://github.com/atlassian/react-beautiful-dnd/issues/2350
* refactor: move mocked-data in a file
* chore: use real column names in mock data
* feature: design columns
* feature: add New button at bottum of columns
* bugfix: move header out of dragable so the cards does not flicker on drop
* lint: remove useless imports
* refactor: rename board item key
* feature: add Board component
* feature: add BoardColumn
* feature: add BoardCard
* chore: install react beautiful dnd
* refactor: use children instead of item parameter
* feature: wrap board in DragDropContext
* feature: wrap columns in dropable
* feature: wrap boardCard in draggable
* feature: add a second column
* refactor: rename columns to initialBoard
* refactor: use itemKeys instead if item directly
* feature: add key for react to render
* refactor: type the onDragEnd callback
* feature: drag and drop elements between columns
* Added prisma to suggested extension in container
* Added comments and authors on drawer with proper resolving
* Fix lint
* Fix console log
* Fixed generated front graphql from rebase
* Fixed right drawer width and shared in theme
* Added date packages and tooltip
* Added date utils and tests
* Added comment thread components
* Fixed comment chip
* wip
* wip 2
* - Added string typing for DateTime scalar
- Refactored user in a recoil state and workspace using it
- Added comment creation
* Prepared EditableCell refactor
* Fixed line height and tooltip
* Fix lint
* Fixed right drawer width and shared in theme
* Added date packages and tooltip
* Added date utils and tests
* Added comment thread components
* Fixed comment chip
* Fix from rebase
* Fix from rebase
* Fix margin right
* Fixed CSS and graphql
* test: add story for table header
* feature: wrap chips in a container and set shrink to 0 so they don't grow vertically
* feature: cancel button is darker
* feature: set gap between chip to 4px instead of 8
* lint: remove unused code
* bugfix: ChipContainer has a starting margin
* test: add empty comment test
* test: comments section opens on click on comments chip
* test: add a failing test for opening comment section
* feature: open comments drawer on click on comment chip
* test: refactor company test, create folders
* refactor: use generated queries for Companies
* refactor: remove useQuery from service, use generated code
* refactor: rename to ts file instead of tsx
* bugfix: use generatd queries, and fix non existing id in workspace member query
* Added prisma to suggested extension in container
* Added comments and authors on drawer with proper resolving
* Fix lint
* Fix console log
* Fixed generated front graphql from rebase
* feature: add rightEndContent to editable cell
* refactor: use rightEndContent instead of comments sections
* refactor: move commentCount in a var
* feature: get commentsCount from backend
* refactor: use an index
* feature: use commentCount from backend on people
* refactor: rename commentCount for companies
* refactor: use generated queries, instead of useQuery
* Added on click on Checkbox component
* - Added test in story
- Added sleep util
- Fixed click target collision (thanks to test !)
* Use a new CheckboxCell to wrap Checkbox
* Fixed lint
* Refactored CSS after comment
* Fixed tests
* Lowercase all relations in prisma/graphql schema
* Add Comments data model and graphql schema
* Make comments availalble on the api through resolvers and guard them
* Update front graphql schema
* Fix PR
* Rename User to AuthUser to avoid naming conflict with user business entity
* Prevent query by workspace in graphql
* Make full user and workspace object available in graphql resolvers
* Add Seed to create companies and people accross two workspace
* Check workspace on all entities findMany, find, create, update)
* Fixed ActionBar paddings and added transition on button hover
* Added recoil library for state management
* Refactor table state with recoil :
- Removed table internal states
- Added refetchQueries to plug apollo store directly into tables
- Added an action bar component that manages itself
- Use recoil state and selector for row selection
- Refactored Companies and People tables
* Moved hook
* Cleaned some files
* Fix bug infinite re-compute table row selection
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
This PR is a bit messy:
adding graphql schema
adding create company creation on company select on People page
some frontend refactoring to be continued
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* chore: remove old resolvers
* refactor: move generated file in code base
* feature: use only necessary code in graphql
* feature: implement query companies
* feature: implement companies and relations
* feature: implement all companies resolvers
* feature: implement all people resolver
* feature: add use resolvers
* feature: implement resolvers for workspace and users
* Remove hasura and hasura-auth
* Move all models to prisma
* Start implementing graphql
* chore: clean package json
* chore: make the code build
* chore: get initial graphql.tsx file
* feature: use typegql as qgl server
* refactor: small refactoring
* refactor: clean tests
* bugfix: make all filters not case sensitive
* chore: remove unused imports
---------
Co-authored-by: Sammy Teillet <sammy.teillet@gmail.com>
* refactor: use AnyEntity instead of any
* refactor: remove any and brand company type
* refactor: add typename for user and people
* bugfix: await company to be created before displaying it
* feature: await deletion before removing the lines
* refactor: remove default tyep for filters
* refactor: remove default type AnyEntity
* refactor: remove USers from filterable types
* refactor: do not depend on Filter types in Table
* Add tests
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Create and EditableRelation component and make it generic
* Refactor EditableCell component to be more flexible
* Complete Company picker on people page
* Fix lint
* feature: add company filter by name
* feature: add fitler on URL
* feature: set icons for sorts
* feature: add creation date and address sorts
* Add tests
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* bugfix: use original row id in cells to make sure it rerenders
* feature: implement multiple sorts
* bugfix: recreate new array to make sure component rerenders
* feature: orderBy is an array to keep orders
* test: snapshot the searchTemplate methods
* feature: remove the console log and return undefined
* feature: use orderByTemplate instead of hardcoded orderBy
* refactor: move sort and where filters helpers out of service
* refactor: rename file helper
* refactor: move assert function in test
* feature: add email filter
* feature: add city filter
* test: fix company search tests
* test: use the right value in test
* refactor: test all the filters in a loop
* feature: add operand list to filters
* feature: implement not include
* feature: add operand on filters
* feature: use filters operand instead of defaults
* test: adapt test with new operands
* refactor: remove useless %% in gql where
* test: test fullname filter
* test: add test for where rendering of filters
* Add filter search logic
WIP Filter search
Implement filters
test: fix sorts tests
test: fix filter test
feature: search person and display firstname in results
feature: fix test for filter component
test: mock search filters
refactor: create a useSearch hook
refactor: move debounce in useSearch and reset status of filter selection
feature: debounce set filters
refactor: remove useless setSorts
feature: add where variable to people query
feature: strongly type Filters
feature: update WhereTemplate method
feature: implement filtering on full name
feature: type the useSearch hook
feature: use where reducer
refactor: create a type for readability
feature: use query and mapper from filters
feature: implement filter by company
feature: search filter results on filter select
feature: add loading and results to search results in filters
refactor: move render search results in a function
feature: display a LOADING when it loads
feature: split search input and search filter for different debounce
refactor: remove some warnings
refactor: remove some warnings
* Write test 1
* Write test 2
* test: useSearch is tested
* test: update names of default people data
* test: add a filter search
* Test 3
* Fix tests
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* Ignore node_modules
* Use bash-compatible dotenv format
While still being compatible with dotenv, this
also allows sourcing the file to export all
variables in bash.
* Add prettier extension to recommendations
* Move to port 5001 to avoid conflict with macOS services
* Add workspace
* Add devcontainer
This automatically starts with all environment
variables available locally.
It brings up services which are dependent on each
other individually and verifies health before
moving on to the next service.
* Split init into clean, up, and logs tasks.
This allows the developer to set up .env and .npmrc
files before running services, and does not require
starting from a clean db every time the devcontainer
is restarted.
* Copy .env when creating codespace
* Automatically run UP command upon devcontainer creation
* Fix log message
---------
Co-authored-by: Felix Malfait <felix.malfait@gmail.com>
* Add columns to companies:
* account_owner_id
* employees
* address
Add foreign key constraint companies_account_owner_id_fkey
to auth.users.id
* Add select permissions to:
* account_owner_id
* employees
* address
Add relationship between companies and auth.users.
* Update Companies interface to include:
* account_owner_id
* employees
* address
Opportunity is expected to be replace by actual opportunity in a separate PR.
* Add GetCompanies query
* Add initial companies table
* Update test to use mock apollo provider
* Update to match changed company column names
* Add company interface mapping tests
* Test entire object
* Add test for companies being rendered in table.
* Add test for sorting reduce.
* Fix prettier errors
* feature: add filter dropdown
* test: add story for FilterDropdown
* feature: display filterOperand on top of dropdown
* feature: display filter operand
* feature: fix index and display selected filter
* refactor: set TopOption button inside dropdown file
* feature: move availableFilters outside the fitler component
* refactor: make the available sorts and filter optionnal
* refactor: rename availableSorts
* feature: add a resetState property on onOutsideClick
* feature: add filters and set filters on Dropdown component
* feature: set filters on click in dropdown
* test: verify button is active after filters are set
* feature: display sorts and filters
* refactor: move SelectedFilters in SortAndFilter
* refactor: move SelectedFilters in dedicated file
* refactor: remove Id and use Key
* Fix html entities and newline handling
This forces contenteditable to behave as single line input,
and properly handles html entities.
* Proposal without reacteditable
* Fix tests and re-add focus styleé
---------
Co-authored-by: Charles Bochet <charles@twenty.com>
* refactor: use safe css selector
* feature: onclick update the order option
* feature: set option in the dropdown
* feature: display icon for sort options
* refactor: indent key so react does not complain of conflicting keys
* feature: align icon and text
* feature: fix size of icon to align text
* feature: create design for TopOption in dropdown
* refactor: set font weight in style
* feature: finalise design of TopOption
* refactor: rename option to sort
* refactor: remove order from the sortType
* refactor: move sort mapper in service
* test: selection of Descending in SortDropdownButton
* refactor: fix styme-component warning
* feature: add sorting by people
* refactor: set SortFields types for tables
* feature: add sort by company
* refactor: rename sortFields to singular
* refactor: rename option to SortDirection