-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
9426 migrate workflow pages to command menu #9515
base: main
Are you sure you want to change the base?
Conversation
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.
PR Summary
This PR migrates workflow-related pages to the command menu system, adding support for workflow step management and improving context reset functionality.
- Added 4 new workflow pages in
CommandMenuPages.ts
: trigger type selection, action selection, step viewing, and step editing - Updated
CommandMenuTopBar.tsx
to conditionally render search input only on root page - Added workflow components to
COMMAND_MENU_PAGES_CONFIG
map with corresponding right drawer mappings - Implemented
resetCommandMenuContext
function inuseCommandMenu
hook to properly reset targeted records, selected records count, and view type - Enhanced hotkey handling in
useCommandMenuHotKeys.ts
to only reset context on Backspace/Delete when on root page
6 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/command-menu/hooks/useCommandMenu.ts
Outdated
Show resolved
Hide resolved
Some regressions we can fix in a follow-up PR that someone else could be responsible of:
CleanShot.2025-01-09.at.17.45.29.mp4 |
Good catches @Devessier ! I will try to fix these regressions in this PR :) |
I spotted this code: const StyledCommandMenu = styled.div`
background: ${({ theme }) => theme.background.secondary};
border-left: 1px solid ${({ theme }) => theme.border.color.medium};
box-shadow: ${({ theme }) => theme.boxShadow.strong};
font-family: ${({ theme }) => theme.font.family};
height: 100%;
overflow: hidden;
padding: 0;
position: fixed;
right: 0%;
top: 0%;
width: ${() => (useIsMobile() ? '100%' : '500px')};
z-index: 30;
`; I don't know where this code comes from but I find it strange to call a hook in a style expression. I don't know how emotion works internally and can't be sure it won't break the Rules of Hooks. It would be more idiomatic to let the const isMobile = useIsMobile()
<StyledCommandMenu isMobile={isMobile} /> I spotted this code at several places. Not sure about them. |
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.
It looks good to me! As you said, you want to fix regressions in this PR. I will approve it once you've done them 😉 Thank you!
Closes #9426