-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Right drawer to edit records #5551
Merged
Merged
Changes from all commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
12cc126
Basic edit in right drawer implem
FelixMalfait bcd26ad
Remove viewableActivityIdState
FelixMalfait 79d6732
Remove viewableEmailThreadIdState
FelixMalfait b2cf04b
Actually better if we close the sidepanel on click outside
FelixMalfait 98ea5fa
Fix linter
FelixMalfait 3f4ca28
Change first cell behavior
FelixMalfait ec11e45
Remove panel for creation from index, focus on creation from show ins…
FelixMalfait dc5df24
Remove viewableCalendarEventIdState
FelixMalfait c144747
Summary tab
FelixMalfait a8dac2b
Improve mobile display
FelixMalfait 3ec0298
Merge main (with regressions...)
FelixMalfait f061741
Merge branch 'main' into poc-right-drawer
FelixMalfait ae5cf01
Bring back button
FelixMalfait 3ea22e9
WIP
FelixMalfait 33465fe
Add context
FelixMalfait a5016c9
Create relationship
FelixMalfait 32cfd54
Fix tabs issue
FelixMalfait 0289968
Smarter firstname/lastname split
FelixMalfait ccf60c0
Add ability to add relation from list view
FelixMalfait 0efd78e
Fix scroll
FelixMalfait 62d858a
Fix strange relation on picker (although fix isn't that great either)
FelixMalfait 684334b
Disable right drawer access from list
FelixMalfait 6b67ade
Improve relation creation
FelixMalfait 8674e61
Rename panel to right drawer
FelixMalfait 5059239
Always show add new
FelixMalfait 89df595
Code style updates
FelixMalfait 1941b50
Merge branch 'main' into poc-right-drawer
FelixMalfait 51b5c92
Typo
FelixMalfait 1b210a2
Fix drawer transition glitch
FelixMalfait 0b7bd6c
Improve drawer top bar
FelixMalfait 2aa2795
Design fix
FelixMalfait 337a1fc
Quick fix
FelixMalfait 09cd6ed
Fix a broken typescript validation (unrelated to this PR)
FelixMalfait File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
packages/twenty-front/src/modules/activities/calendar/states/viewableCalendarEventIdState.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import { useRecoilCallback } from 'recoil'; | ||
|
||
import { useOpenEmailThreadRightDrawer } from '@/activities/emails/right-drawer/hooks/useOpenEmailThreadRightDrawer'; | ||
import { viewableEmailThreadIdState } from '@/activities/emails/states/viewableEmailThreadIdState'; | ||
import { viewableRecordIdState } from '@/object-record/record-right-drawer/states/viewableRecordIdState'; | ||
import { useRightDrawer } from '@/ui/layout/right-drawer/hooks/useRightDrawer'; | ||
import { isRightDrawerOpenState } from '@/ui/layout/right-drawer/states/isRightDrawerOpenState'; | ||
|
||
export const useEmailThread = () => { | ||
const { closeRightDrawer } = useRightDrawer(); | ||
const openEmailThredRightDrawer = useOpenEmailThreadRightDrawer(); | ||
const openEmailThreadRightDrawer = useOpenEmailThreadRightDrawer(); | ||
|
||
const openEmailThread = useRecoilCallback( | ||
({ snapshot, set }) => | ||
|
@@ -17,19 +17,19 @@ export const useEmailThread = () => { | |
.getValue(); | ||
|
||
const viewableEmailThreadId = snapshot | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. viewableRecordId |
||
.getLoadable(viewableEmailThreadIdState) | ||
.getLoadable(viewableRecordIdState) | ||
.getValue(); | ||
|
||
if (isRightDrawerOpen && viewableEmailThreadId === threadId) { | ||
set(viewableEmailThreadIdState, null); | ||
set(viewableRecordIdState, null); | ||
closeRightDrawer(); | ||
return; | ||
} | ||
|
||
openEmailThredRightDrawer(); | ||
set(viewableEmailThreadIdState, threadId); | ||
openEmailThreadRightDrawer(); | ||
set(viewableRecordIdState, threadId); | ||
}, | ||
[closeRightDrawer, openEmailThredRightDrawer], | ||
[closeRightDrawer, openEmailThreadRightDrawer], | ||
); | ||
|
||
return { openEmailThread }; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
packages/twenty-front/src/modules/activities/emails/states/viewableEmailThreadIdState.ts
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider removing unused imports to keep the code clean.