Commit Graph

1815 Commits

Author SHA1 Message Date
691fbbe576 Fix show page navigation bugs (#9199)
Fixes total count bug that was -1 the total count
Fixes a bug when trying to go from first to last or the other way around
Fixes a React array key bug

Follow-up issue (non critical) :
https://github.com/twentyhq/twenty/issues/9197
2024-12-23 14:24:15 +01:00
6abe735cad Fix optimistic rendering when deleting multiple records (#9198)
Fixes
https://discord.com/channels/1130383047699738754/1319676302944370730/1319676302944370730
2024-12-23 14:19:25 +01:00
ee0282bcc8 refacto(auth): Simplify workspace lookup and cleanup UI logic (#9160)
Streamlined workspace selection by defaulting to the first available
workspace. Adjusted conditional rendering for a separator between
authentication providers, improving clarity and reducing redundancy.
Minor formatting changes were also applied for consistency.

Close #9094
2024-12-23 13:17:00 +01:00
164f010501 Use uuid package instead of crypto package (#9191)
Fixes #9186
2024-12-23 12:04:15 +01:00
093f627e1d fix(auth): adjust button variant based on sign-in-up step (#9188)
Update the button variant to dynamically switch between 'secondary' and
'primary' based on the current step in the sign-in-up flow. Ensures the
UI reflects the correct state, improving user experience and
consistency.
2024-12-23 11:30:36 +01:00
f71527bf6d Fixes before 0-35 release (#9176)
Co-authored-by: Weiko <corentin@twenty.com>
2024-12-23 10:56:25 +01:00
c992be1694 Workspace logo is not visible (#9174)
Fixing "Workspace logo is not visible in the navbar" report issue from
@Weiko
2024-12-20 18:15:02 +01:00
1eee99cfd6 Don't register delete multiple records action when deleted filter is active (#9170)
Don't register delete multiple records action when deleted filter is
active
2024-12-20 15:49:55 +01:00
d08075f610 Command menu actions fixes (#9169)
- Fix command menu not closing after executing an action
- Add delete and favorite actions to workflow and workflow versions
2024-12-20 13:42:01 +00:00
f65a90d137 minor fix -- datamodel multiselect edit form dropdowns (#9168)
made sure dropdown gets unique ids.
2024-12-20 14:17:13 +01:00
2e216e7a73 Icon alignment in NavigationDrawerItems (#9164)
Icons are not aligned to the labels
before:
<img width="387" alt="Screenshot 2024-12-20 at 4 09 01 PM"
src="https://github.com/user-attachments/assets/c115abcd-9779-4597-b40e-6ceceeaa13b9"
/>

after: 

<img width="387" alt="Screenshot 2024-12-20 at 4 08 36 PM"
src="https://github.com/user-attachments/assets/a0535030-a810-4023-b677-8380b833f712"
/>
2024-12-20 11:53:21 +01:00
f499c728fd Fix activity editor (#9165) 2024-12-20 11:52:00 +01:00
0d2bfad3c9 Separate date and datetime components (#9161)
Add a 2 components solution for FormDate and FormDateTime
2024-12-20 10:50:30 +00:00
1acf845101 9018 fix batch delete follow ups (#9166)
Follow ups on #9018
2024-12-20 11:41:09 +01:00
2437572a5c Fix discard draft optimistic rendering (#9153)
Remove draft workflow version from cached workflow
2024-12-20 11:36:47 +01:00
925294675c 9018 fix batch delete (#9149)
Closes #9018
2024-12-20 10:46:24 +01:00
a0b5720831 Fix modals being unregistered inside command menu (#9155)
Fix modals being unregistered inside command menu
2024-12-20 10:45:22 +01:00
54c4d64ae8 Scrollable fixed dropdowns container minor refactor (#9159)
Co-authored-by: Lucas Bordeau <bordeau.lucas@gmail.com>
2024-12-20 10:43:48 +01:00
ded0a68b89 Fix tests 2024-12-19 17:49:29 +01:00
1d627039c0 Add possibility to destroy a record (#9144)
There are two follow ups to this PR:
- Bug: sometimes when opening Cmd+K from a deleted record, we are facing
a global error
- On Index page, actions in top right are displaying label and not short
name
- Implement multiple actions once refactoring on delete is complete

---------

Co-authored-by: bosiraphael <raphael.bosi@gmail.com>
2024-12-19 17:00:30 +01:00
360c34fd18 Phone country code unique (#9035)
fix #8775
2024-12-19 16:42:18 +01:00
ed56a68b7c Improve aggregate footer cell display (#9124)
Co-authored-by: Jérémy Magrin <jeremy.magrin@gmail.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-19 14:36:14 +00:00
53576245aa Fix version creation / update when opening an action (#9145)
Actions using tiptap trigger updates when called.

Flow is following:
- component using tiptap receive default value
- we separate the default value because we need to add specific
attributes to the editor when inserting breaks or variables
- editor performs an update for each value

It means that initialize our editor performs several updates. We need to
avoid persisting until the init finished.
2024-12-19 13:19:25 +00:00
784bc78ed0 add: objectName in fav folder (#8785)
Closes: #8549 

It was quite complex to get this right. So, I went through Notion's
website to see how they implemented it.
Instead of using `display: none` or having a space reserved for the
Icon, I used clip-path & opacity trick to achieve the desired behaviour.
This maintains accessibility and helps in label or ObjectName to take
the full space.

Also, truncation now works for label & objectName as a whole instead of
separately, as seen in my previous PR.

**Caveats**

The only problem that now remains is not having
`NavigationDrawerAnimatedCollapseWrapper`. Having it on top of any text
or div won't let the flex or truncation property work.

[Screencast from 2024-11-28
13-37-31.webm](https://github.com/user-attachments/assets/29255cd2-3f15-4b1d-b1e1-c041c70052e5)

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
Co-authored-by: martmull <martmull@hotmail.fr>
2024-12-19 11:51:03 +01:00
65586a00cc Add date time form field (#9133)
- Create a really simple abstraction to unify the date and date time
fields. We might dissociate them sooner than expected.
- The _relative_ setting is ignored
2024-12-19 10:46:21 +00:00
e84176dc0d Reactive form preview (#8663)
## Description

This PR fixes issues with field previews not updating immediately when
settings are changed in the Data Model Editor. The changes affect number
field types, ensuring that the preview updates in real-time as settings
are modified.

### Fixed Issues
- Number field preview not updating when changing decimals or number
type (e.g., percentage)

Recording

https://www.loom.com/share/14a30f67266d4a08a694c759ae06b0f3?sid=c0de35ef-9982-438b-b822-94ed106f6891

~~Fixes #8663~~
Fixes #8556

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-19 11:22:13 +01:00
32fef06734 Remove react hook form in send email action (#9130)
- remove react hook form
- put back multiline for body
2024-12-19 09:48:46 +00:00
5e03f4dfb1 fix icon shrink and use avatar for logo and icons (#9117)
- Fixed icon shrinking on tabs. The introduction of EllipsisDisplay
takes 100% of the width, thus shrinking the icons.
- Removed scroll wrapper tablist. This was removed in #9016 but
reintroduced in #9089. This reintroduction made the dark border below
the active tab disappear.
- Used Avatar for icon and logo rendering following the changes made in
#9093
2024-12-18 19:06:08 +01:00
f620fd3c18 Fixes person navigation after image upload (#9076)
Fixes #8949
2024-12-18 18:44:00 +01:00
71254bfca0 Fix workspace logo (#9129)
Follow up on:
https://github.com/twentyhq/twenty/issues/9042#issuecomment-2550886611
2024-12-18 18:09:52 +01:00
5586270df4 Remove buggy dependencies (#9115)
Fixes double download
2024-12-18 17:05:33 +00:00
2bcce44e08 feat(workspace): expand forbidden subdomain validation (#9082)
Added new forbidden words and regex patterns to subdomain validation in
`update-workspace-input`. Enhanced the `ForbiddenWords` validator to
support both strings and regex matching. Updated tests to verify
regex-based forbidden subdomain validation.

Fix #9064

---------

Co-authored-by: Weiko <corentin@twenty.com>
2024-12-18 16:46:59 +01:00
550756c2bf feat(auth): enhance workspace handling and error feedback (#9118)
Add support for setting a user's default workspace during sign-in if a
target workspace subdomain exists. Enhance error feedback by displaying
authentication error messages using a Snackbar in the front-end and
improving redirect logic for workspace-specific errors.
2024-12-18 16:46:25 +01:00
01fc70da0f fix: 3 first columns should be sticky view group (#9123)
Fix #9113 

<img width="591" alt="Screenshot 2024-12-18 at 3 33 05 PM"
src="https://github.com/user-attachments/assets/df55eff3-7b0d-4cf0-881b-167e1bf2f97b"
/>

<img width="543" alt="Screenshot 2024-12-18 at 3 34 37 PM"
src="https://github.com/user-attachments/assets/76fe06e1-0a46-4130-921d-1d480306bda2"
/>
2024-12-18 16:35:08 +01:00
94676215ad Add fields to update in update record action (#9108)
- update backend action so it handles composite fields
- add fields to update multiselect
- generate form based on that field
- add icons
2024-12-18 13:32:21 +00:00
b6508cc615 Add UUID form field input (#9121) 2024-12-18 14:26:35 +01:00
ae044c2fc8 fix: view group wrong cursor (#9119)
Wrong cursor was shown on `Load more` and `Add new` row in view group
mode
2024-12-18 12:54:09 +01:00
3b48920314 feat: NoValue is bot properly created the backend (#9110)
`No Value` view groups wasn't properly created when we select a group by
field metadata, this PR fix the issue.
Also a script is added to backfill the current view groups.

---------

Co-authored-by: Marie <51697796+ijreilly@users.noreply.github.com>
2024-12-18 12:26:38 +01:00
d895468ebe Removed unecessary dropdown container on MultiSelectFieldInput (#9116)
There was an unecessary dropdown menu container div that was conflicting
with the recent refactor of dropdowns. The OverlayContainer component is
now at the root of the tree of a cell.
2024-12-18 12:22:02 +01:00
deb37edd7c Add Raw JSON Form Field Input (#9078)
- Implemented the `renderText` method for `VariableTag`. This method
returns the `variable` attribute of the node, i.e. `{{test}}`.
- Used the `editor.getText()` function to simply get the textual
representation of the field without relying on `editor.getJSON()` and
`parseEditorContent`.
- Implemented the RawJSON form field, which is heavily based on the
`TextVariableEditor` component.
- This component is inspired from the `RawJsonFieldInput` field,
especially the JSON validation.

Closes https://github.com/twentyhq/private-issues/issues/180
2024-12-18 11:42:12 +01:00
8623585106 minor fix -- missing margin bottom for orphan favorites (#9111)
this PR is a followup of the favorites followups which was the follow-up
of some other PR :)
2024-12-18 09:27:29 +01:00
e0f1db2ed3 fix: recordBoard sticky header + scrollThumb (#8946)
Fixes: #8944 

[Screencast from 2024-12-08
00-43-19.webm](https://github.com/user-attachments/assets/b6e15fcc-46a1-4ab0-aacf-86056248bb69)

---------

Co-authored-by: ehconitin <nitinkoche03@gmail.com>
2024-12-18 11:08:54 +05:30
fb8d193238 Fix: Replace styled logo with Avatar component for workspace logo in NavigationDrawerHeader (#9093)
This PR addresses issue #9042

- Replaced the styled logo with the `Avatar` component.
- `Avatar` now handles the case when no `logo` is uploaded by using the
workspace name's first character as the `placeholder`.
- This ensures a consistent fallback when the `logo` is undefined.

---------

Co-authored-by: guillim <guigloo@msn.com>
Co-authored-by: Félix Malfait <felix@twenty.com>
Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-17 20:42:06 +01:00
07bde4883e feat(auth): add default workspace support for user handling (#9099)
Introduce `defaultWorkspaceId` to improve workspace redirection logic.
Updated GraphQL schema, server logic, and frontend components
accordingly to prioritize default workspaces when available.

## Summary
This PR adds a mechanism to handle and prioritize default workspace
selection for users during authentication. It updates the logic in
multiple components and services to ensure users are redirected to their
default workspaces if no specific selection is provided.

### Main changes:
- **GraphQL Schema Updates**:
- Enhanced `UserExists` GraphQL entity with a new `defaultWorkspaceId`
field to specify the user's default workspace.
  - Updated queries and mutations to handle the `defaultWorkspaceId`.

- **Client-Side Updates**:
- Enhanced `useAuth` hook to include logic for managing default
workspace redirection.
- Adjusted UI logic in `SignInUpGlobalScopeForm` to utilize the
`defaultWorkspaceId`.

- **Server-Side Adjustments**:
- Modified `AuthService` to include `defaultWorkspaceId` in
`checkUserExists`.
- Default workspace logic added to the backend flow for consistent
handling.

- **Tests/Helpers**:
- Added utility and type changes to integrate the new backend response
changes (e.g., `UserExists` GraphQL).
- **Subsequent function lifecycle** was adjusted to include recheck for
workspace token states when performing sign-in flows.
2024-12-17 19:56:19 +01:00
b033a50d7c 8978 add navigation inside the command menu for showpage (#9103)
Closes #8978

- Added new options in the actions config files: `shortLabel`,
`availableOn`
- Added two actions: Navigate to previous records and Navigate to next
records
- Modified `useRecordShowPagePagination` to loop on records when we are
on first record and we hit previous or when we are on last record and we
hit next
- Introduced a new component state
`contextStoreCurrentViewTypeComponentState`
2024-12-17 16:48:12 +00:00
bb8c763f9c Fix broken main post fix 2024-12-17 17:10:51 +01:00
edff53f5b8 fix - add new button on opportunity board company picker doesnt work (#8488)
Closes https://github.com/twentyhq/twenty/issues/8455


https://github.com/user-attachments/assets/fec269b9-abb4-47e4-811e-fa23b69ca040

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
2024-12-17 17:09:11 +01:00
d0f7270c28 Fix twenty-front to take twenty-shared into account 2024-12-17 16:07:03 +01:00
e0dfa9519a Fix Dockerfile twenty to take twenty-shared into account 2024-12-17 15:42:36 +01:00
860dec3428 Fixed dropdown blur and unified components (#9062)
- Removed disableBlur property from dropdown because it is no longer
needed since there's only one OverlayContainer component so there can be
only one blur at a time.
- Removed blur CSS properties from every component that used it because
one standalone OverlayContainer is able to handle all cases if placed
properly.
- Also removed disableBackgroundBlur property from SingleRecordSelect
- Removed FieldInputOverlay and FieldTextAreaOverlay components that
were a first attempt to create something like an OverlayContainer
- Used new unified OverlayContainer in RecordInlineCell and
RecordTableCell
- Fixed ScrollWrapper so that it works well both for dropdown with non
overflowing content and dropdown with overflowing content.
- Removed export default value on SearchVariablesDropdown as it is not
used in this codebase
- Refactored SearchVariablesDropdown function as component anti-pattern
- Refactored SearchVariablesDropdownFieldItems UI problems with
separator and missing ScrollWrapper behavior
- Refactored SearchVariablesDropdownObjectItems with UI problems with
separator and missing ScrollWrapper behavior
- Fixed blur bug on Firefox due to wrong placement of the element that
had the CSS property. Blur works on Firefox it it's on the container
that has the highest level in the tree.
- Fixed bug in ActivityTargetInlineCell by removing an unnecessary
container component StyledSelectContainer
- Unified problems of field height with a new common component
FieldInputContainer, instead of putting width and height at the wrong
abstraction level, width and height are a field's concern not a
dropdown, overlay or low-level input concern.
- Fixed block editor dropdown with new OverlayContainer
- Aligning field dropdown with their anchor on inline and table cells,
there are still many small pixel misalignments that give a low quality
impression.
- Fixed FormDateFieldInput that was missing OverlayContainer
2024-12-17 14:28:26 +00:00