-
Notifications
You must be signed in to change notification settings - Fork 374
Conversation
0614e13 to
76993bf
Compare
|
@yeze322 I am a little out of context with this code, so go ahead and review and merge if it is all good. |
In this PR, we are targeting to fix the cursor move behavior based on old mechanism (node position, not the data structure solution we discussed offline) to make sure the user experience good enough. Alan and I was working on higher priority tasks yesterday, we will go through this PR together again this week. Now mark it as WIP until we finished. The new cursor move algorithm is still on top of our todo list but not P0 |
76993bf to
faa8392
Compare
|
This pull request introduces 3 alerts and fixes 1 when merging faa8392 into d65ae3b - view on LGTM.com new alerts:
fixed alerts:
|
faa8392 to
654cc22
Compare
8858b3a to
c906892
Compare
Composer/packages/extensions/visual-designer/src/utils/cursorTracker/arrowMove.ts
Outdated
Show resolved
Hide resolved
|
After several turns of optimizing the behavior and code structure of 'cursor move', now it has been improved a lot and in a better shape! Cursor move is a complicated feature which requires many tricky treatments. Current code defined a good up-layer interface and detailed implementation is encapsulated in the Of course we need further refactoring on So we have two remaining things |
Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx
Outdated
Show resolved
Hide resolved
Composer/packages/extensions/visual-designer/src/editors/ObiEditor.tsx
Outdated
Show resolved
Hide resolved
|
@alanlong9278 this is great work! |
Description
Cursormove refactor.
If pressing ↑ and ↓, cursor should move to previous / following node.
If cursor is focusing on a node with siblings, pressing ← and → should navigate to siblings.
If cursor is focusing on 'BotSays' node of a prompt type, pressing ↓ should nav to 'UserAnswers', then pressing → should nav to 'Exceptions'; if focusing on 'Exceptions', pressing ↑ should nav to 'BotSays'
Code Construction
TODO
Unit test
Task Item
closes #1082
Type of change
Please delete options that are not relevant.
Checklist
Screenshots