-
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
Fix action menu dropdown #8368
Merged
Merged
Fix action menu dropdown #8368
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b9c48ce
create helper functions to get the ids of the components
bosiraphael e662fdd
fix record table id being undefined
bosiraphael 0ad5d9d
fix useResetTableRowSelection
bosiraphael 37f0d8b
fix useRecordBoardSelection
bosiraphael acedfdc
fix useRecordBoardSelection
bosiraphael 0ec5adc
use helper functions
bosiraphael 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
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
18 changes: 12 additions & 6 deletions
18
packages/twenty-front/src/modules/action-menu/hooks/useActionMenu.ts
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
9 changes: 9 additions & 0 deletions
9
...enty-front/src/modules/action-menu/utils/__tests__/getActionBarIdFromActionMenuId.test.ts
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getActionBarIdFromActionMenuId } from '@/action-menu/utils/getActionBarIdFromActionMenuId'; | ||
|
||
describe('getActionBarIdFromActionMenuId', () => { | ||
it('should return the correct action bar id', () => { | ||
expect(getActionBarIdFromActionMenuId('action-menu-id')).toBe( | ||
'action-bar-action-menu-id', | ||
); | ||
}); | ||
}); |
9 changes: 9 additions & 0 deletions
9
...t/src/modules/action-menu/utils/__tests__/getActionMenuDropdownIdFromActionMenuId.test.ts
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getActionMenuDropdownIdFromActionMenuId } from '@/action-menu/utils/getActionMenuDropdownIdFromActionMenuId'; | ||
|
||
describe('getActionMenuDropdownIdFromActionMenuId', () => { | ||
it('should return the correct action menu dropdown id', () => { | ||
expect(getActionMenuDropdownIdFromActionMenuId('action-menu-id')).toBe( | ||
'action-menu-dropdown-action-menu-id', | ||
); | ||
}); | ||
}); |
9 changes: 9 additions & 0 deletions
9
...ty-front/src/modules/action-menu/utils/__tests__/getActionMenuIdFromRecordIndexId.test.ts
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { getActionMenuIdFromRecordIndexId } from '@/action-menu/utils/getActionMenuIdFromRecordIndexId'; | ||
|
||
describe('getActionMenuIdFromRecordIndexId', () => { | ||
it('should return the correct action menu id', () => { | ||
expect(getActionMenuIdFromRecordIndexId('record-index-id')).toBe( | ||
'action-menu-record-index-record-index-id', | ||
); | ||
}); | ||
}); |
3 changes: 3 additions & 0 deletions
3
packages/twenty-front/src/modules/action-menu/utils/getActionBarIdFromActionMenuId.ts
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const getActionBarIdFromActionMenuId = (actionMenuId: string) => { | ||
return `action-bar-${actionMenuId}`; | ||
}; |
5 changes: 5 additions & 0 deletions
5
...ges/twenty-front/src/modules/action-menu/utils/getActionMenuDropdownIdFromActionMenuId.ts
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export const getActionMenuDropdownIdFromActionMenuId = ( | ||
actionMenuId: string, | ||
) => { | ||
return `action-menu-dropdown-${actionMenuId}`; | ||
}; |
3 changes: 3 additions & 0 deletions
3
packages/twenty-front/src/modules/action-menu/utils/getActionMenuIdFromRecordIndexId.ts
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export const getActionMenuIdFromRecordIndexId = (recordIndexId: string) => { | ||
return `action-menu-record-index-${recordIndexId}`; | ||
Comment on lines
+1
to
+2
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. style: Consider adding input validation to ensure recordIndexId is not empty/undefined |
||
}; |
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
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.
style: Consider adding type validation for actionMenuId to ensure it's not empty/undefined