-
Notifications
You must be signed in to change notification settings - Fork 16
[UI][1/n] Edit/Command mode #398
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
Conversation
Thanks! |
Just checked, it seems that |
Still one bug. In the edit mode of a Rich pod, Hitting Esc should select the Rich pod. But now it drops me to its parent scope. |
To be more specific, this bug happens when the Rich pod is inside a scope. The cause is:
I tried a few methods, but none of them worked yet. |
ui/src/components/nodes/Code.tsx
Outdated
@@ -508,6 +508,8 @@ export const CodeNode = memo<NodeProps>(function ({ | |||
const autoRunLayout = useStore(store, (state) => state.autoRunLayout); | |||
|
|||
const prevLayout = useRef(layout); | |||
const ref = useRef<HTMLDivElement>(null); |
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.
Not needed?
Thanks! |
Thanks @senwang86 but sorry I probably come across some corner cases:
You can test in this repo: https://app.codepod.io/repo/eyusr62dyglelzg7m4jz |
Really appreciate the test, I can reproduce the bug, the states are not updated in response to the "drag handle click" event. Let me send a patch later. |
BTW, I think Esc is not a good key for jump-to-parent. We have many context menus and pop-up menus, and we need to use |
Moving the shortcut discussion to #418 |
Summary
Adding edit and command mode into Codepod regarding issue #88
Test