thebaselab / codeapp

Building a full-fledged code editor for iPad
https://code.thebaselab.com
MIT License
2.95k stars 202 forks source link

Editor doesn't support touch controls #169

Closed James-lx closed 4 months ago

James-lx commented 3 years ago

It's hard to code using iPad virtual keyboard,and it doesn't support selecting using either hand or keyboard but sometimes it can do, I don't know why.

bummoblizard commented 3 years ago

Thank you for the message. This is a known issue from the very beginning. We use monaco-editor, which is the core editor from VS Code. While this gives us great performance, syntax highlighting and other features that VS Code users are familiar with, the editing experience without a hardware keyboard is poor.

I am attempting to patch monaco-editor to support touch controls, but it won't be easy. I am also considering to let users opting for an less powerful, but touch-friendly editor like CodeMirror 6.

James-lx commented 3 years ago

Thank you for your prompt reply Did you mean I can have better experience using hardware keyboard? But I can't use mouse(without keyboard)to select or others either.

bummoblizard commented 3 years ago

Yes. You can select text with mouse or trackpad in the latest build: https://testflight.apple.com/join/EgZ8sE2P

It will be released to the App Store in a few days.

vwkd commented 2 years ago

Currently Code is unusable with virtual keyboard due to selection not working.

CodeMirror 6 seems to support this fine. An entire replacement of Monaco or at least an option would be appreciated.

bummoblizard commented 2 years ago

Currently Code is unusable with virtual keyboard due to selection not working.

CodeMirror 6 seems to support this fine. An entire replacement of Monaco or at least an option would be appreciated.

Yes and I've thought about it. The issue is that CodeMirror doesn't provide many features that are tightly integrated to Code App and maintaining two sets of editor in one app seems troublesome. If you would like to see native controls and a more lightweight editor Runestone Editor does it really well (https://github.com/simonbs/Runestone).

I'm still open to this idea though.

bummoblizard commented 1 year ago

@benwu030 It's time to revisit this. Besides CodeMirror, Runestone is also a nice candidate for this: https://github.com/simonbs/Runestone. My plan is to support both Monaco Editor and the new editor. Now that we've completed the refactoring of the codebase this should not be too troublesome to implement.

We might need to give up certain feature like diff editors and searching though.

luni-moon commented 1 year ago

I use diff and searching pretty frequently, and would not like this to be removed :(

bummoblizard commented 1 year ago

I use diff and searching pretty frequently, and would not like this to be removed :(

We will keep both editors :)

redscorpse commented 1 year ago

I find this issue with text selection annoying too, and I would like to suggest adding something like in Online GDB. It uses the Ace editor (which I don't know if has the same issue as Monaco) but adds to the left column of line numbers the ability of folding and selecting multiple lines.

Select-text-with-column

jbschooley commented 1 year ago

If you're able to patch monaco-editor to support touch, would you consider upsteaming it? This app is great, but I sometimes use VS Code in safari and on my windows tablet, and touch doesn’t work there either. Fixing that would be incredible.

SRUKen commented 10 months ago

Hi @bummoblizard , new user to Code app, very good by the way, any updates on the second editor for better touchscreen support that you mentioned last year?

bummoblizard commented 6 months ago

In the latest TestFlight build, you might enable Runestone Editor under the experimental settings section for touch control support.

D1reW0lf commented 6 months ago

To bad the TestFlight beta is full. 😕

bummoblizard commented 6 months ago

@D1reW0lf I just opened up more slots :)

D1reW0lf commented 6 months ago

@D1reW0lf I just opened up more slots :)

Thank you so much!! 🖤 Will it, eventually, “color code” with Runestone?

bummoblizard commented 6 months ago

Currently there is syntax highlighting for C, C++, JS and Python.

D1reW0lf commented 6 months ago

Currently there is syntax highlighting for C, C++, JS and Python.

That explains why I didn’t see it (I was testing with html, php, .env files, json). Thank you for letting me know.

bummoblizard commented 4 months ago

1.8.0 brings support for Runestone editor which allows native text selection. It can be toggled in the settings menu or in the quick menu.

image

https://github.com/thebaselab/codeapp/assets/38398443/040c0554-6469-4ae7-86ec-6096d2e7ee38