visual-space / visual-editor

Rich text editor for Flutter based on Delta format (Quill fork)
MIT License
283 stars 44 forks source link

Selection - Mobile, Selection menu not rendered at all times #124

Closed adrian-moisa closed 7 months ago

adrian-moisa commented 1 year ago

In the mobile emoulator, it seems that the selection actions don't work properly. This issue might be caused by the forking from Quill and the subsequent refactoring. I'd try to run the quill codebase, follow the callstack in that codebase and attempt to follow the same callstack in our codebase. There will be many differences in files setup but overall the code logic is the same. Somewhere we are not doing something right. At the moment it is rather difficult to trigger the rendering of the actions menu.

image

Action handles wrongly placed A related issue is that the handles are not properly placed. After double tapping a word to trigger the selection we can see that the selection handles are rendered in the position of the previous selection. So this hints strongly that we are not passing correctly the latest selection data. It could be that somehow we messed up updating our state store. Once this one is figured I believe the issue described above will be resolved as well.

Simulator Screen Shot - iPhone SE (3rd generation) - 2022-09-30 at 14 12 25

After selecting some text on mobile/emulator tapping the text again should trigger a menu where the paste option is visible. This enables the user to do copy paste on mobile. The issue is that we seem unable to trigger it. This issue might be caused by the forking from Quill and the subsequent refactoring. I'd try to run the quill codebase, follow the callstack in that codebase and attempt to follow the same callstack in our codebase. There will be many differences in files setup but overall the code logic is the same. Somewhere we are not doing something right.

Join on discord to get advice and help or follow us on YouTube Visual Coding to learn more about the architecture of Visual Editor and other Flutter apps.