Skip to content
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

Better support for touch interfaces #3557

Open
1 of 5 tasks
EricRabil opened this issue Nov 20, 2018 · 17 comments
Open
1 of 5 tasks

Better support for touch interfaces #3557

EricRabil opened this issue Nov 20, 2018 · 17 comments
Labels
help wanted issues meant to be picked up, require help ipad issues related to iPad

Comments

@EricRabil
Copy link

EricRabil commented Nov 20, 2018

Hi there! I'm a big fan of Theia and it's potential, especially as a powerful IDE replacement for tablets (such as my iPad Pro). After using Theia on my iPad for a day, I can already see some weak points in terms of usability with a touch interface and mobile accessories.

Theia already serves as an excellent IDE on tablets, and I would love to see it get even better. I would love to contribute to the project and help improve usability on touch interfaces after I get more acquainted with the codebase and guidelines.

Patch List

@EricRabil EricRabil changed the title Better support for mobile devices Better support for touch interfaces Nov 20, 2018
@svenefftinge
Copy link
Contributor

Better support for touch would be very welcome. Let us know if you need help in getting started.

@sr229
Copy link

sr229 commented Nov 25, 2018

Hey @EricRabil even if we can get the interface to work, Monaco does not support touch natively AFAIK, so this would be useless if we can't use Monaco on iPad.

@svenefftinge
Copy link
Contributor

But there seem to be 'hacks' available that could be considered until someone solves it more holistically.
See here for reference: microsoft/monaco-editor#293

@EricRabil
Copy link
Author

@sr229 while you are correct in that Monaco does not support native touch, we (Theia) can still do our part to make it as usable as possible. Modifications that I made to my local Theia instance have made using Theia so much easier, even without changes to Monaco itself.

@jankeromnes
Copy link
Member

@EricRabil It's really cool that you've already looked into this! Could you please share some info on your local Theia modifications? (E.g. uploading some diff or braindump somewhere would be perfect.)

I'd love to see if I can help improve Theia on touch devices too (I do a lot of dev work on my smartphone and sometimes on my iPad). Maybe we can team up on this?

@sr229
Copy link

sr229 commented Feb 19, 2019

FWIW I think it's best we upstream any changes we can make for Monaco so everyone can benefit (including VSCode)

@jankeromnes
Copy link
Member

jankeromnes commented May 10, 2019

@EricRabil Ping -- how were you able to fix Theia's overscrolling on iPad? 🙂

I had to lightly mod my Theia instance to disable overscrolling.

I found this post that suggests a combination of:

html, body {
  overflow: hidden;
}

and

targetElement.ontouchend = (e) => {
  if (/* targetElement is scrolled to top or bottom */) {
    e.preventDefault();
  }
};

Was your fix something like that?

@EricRabil
Copy link
Author

EricRabil commented May 10, 2019 via email

@jankeromnes
Copy link
Member

Thanks a lot @EricRabil! That would be very helpful.

(Also, please don't bother cleaning up the patches, I'm perfectly happy to sift through a giant diff. 🙂)

@EricRabil
Copy link
Author

EricRabil commented May 17, 2019 via email

@EricRabil
Copy link
Author

Regarding overscrolling, there is no JavaScript required. I fixed it in my fork by modifying the .theia-ApplicationShell class as follows:

.theia-ApplicationShell {
  position: fixed; /** keeps element in place (necessary for MobileSafari) **/
  overflow: hidden; /** disables overflow **/
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--theia-layout-color0);
}

@EricRabil
Copy link
Author

EricRabil commented May 20, 2019

Regarding arrow keys on the smart keyboard, you can detect most (if not all) key events that are not currently fired by listening for document.addEventListener('selectionchange'). The only caveat is that there must be some kind of value in the textarea.inputarea element within Monaco, otherwise there is no selection to be changed. I'm gonna investigate how I can hack this in without altering functionality.

@EricRabil
Copy link
Author

Great news! In iPadOS 13b1, arrow key functionality is fixed. Apple has given MobileSafari on the iPad a desktop-class browsing experience, and as such, there is full keyboard access. I am able to use my arrow keys in any Monaco-based editor now.

jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 18, 2019
jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 18, 2019
jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 22, 2019
…iPad)

Ref: eclipse-theia#3557

Co-authored-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Jan Keromnes <[email protected]>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 22, 2019
…iPad)

Ref: eclipse-theia#3557

Co-authored-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Jan Keromnes <[email protected]>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 23, 2019
…iPad)

Ref: eclipse-theia#3557

Co-authored-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Jan Keromnes <[email protected]>
jankeromnes added a commit to jankeromnes/theia that referenced this issue Jul 23, 2019
akosyakov pushed a commit that referenced this issue Jul 24, 2019
…iPad)

Ref: #3557

Co-authored-by: Vincent Fugnitto <[email protected]>
Signed-off-by: Jan Keromnes <[email protected]>
@jankeromnes
Copy link
Member

Hi @EricRabil! Could you please edit your first comment, and make each item a checkbox? (You can simply start each item line with - [ ], or - [x] if the item is already addressed.)

This will allow us to more easily see which items are fixed, and which ones remain to address. 🙂

@vartanbeno
Copy link

I noticed two things:

  1. The inability to dismiss context menus, which is tracked in Context menus are not dismissible on iPad (iOS 12) #6322.
  2. I can open up multiple context menus at once if I do multiple long presses.

@jankeromnes
Copy link
Member

@vartanbeno Thank you for reporting these!

Which version of iOS are you using? I was also seeing these issues all the time, but since a recent iOS upgrade on my iPad (to iOS 13 I think), context menus are now always dismissed when I tap outside of them (thus I can't open multiple context menus).

On my Android Pixel phone, I also don't see these problems anymore, so maybe they're platform/browser-specific.

@paul-marechal
Copy link
Member

While the idea is interesting on its own, no active contributor currently has interest in implementing and maintaining such feature.

Were this to be supported, there's also the problem of preventing regressions: We don't have anyone with a touch surface to test, and ideally we would like an automated testing solution which I don't know if it exists for touch devices.

If anyone wants to champion this work, please come discuss at the dev meeting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted issues meant to be picked up, require help ipad issues related to iPad
Projects
None yet
Development

No branches or pull requests

7 participants