Slate: Roadmap to Slate Mobile Support

Created on 23 Mar 2018  Â·  20Comments  Â·  Source: ianstormtaylor/slate

This is the roadmap to adding mobile support to Slate as per this issue https://github.com/ianstormtaylor/slate/issues/1656

Please help, especially if you have experience with Android which I don't.

Note: Any part of the roadmap is open for discussion

Browserslist

The list of supported mobile browsers is based on a combination of:

  • QuillJS, an editor that has mobile support
  • Saucelabs in case we wish to use them for testing
  • Availability of iOS version in Simulator from Apple
  • Added the latest version of iOS

The list is:

  • iOS 9.3, 10.3, 11.1
  • Android 6.0, 7.1

First Priority

These are the highest priority issues for adding mobile support

  • [ ] iOS Documentation: Create documentation for setting up a development environment for SlateJS on iOS
  • [ ] Android Documentation: Create documentation for setting up a development environment for SlateJS on Android
  • [ ] Android Input Bug: Fix bug "Input is wonky on Android devices" https://github.com/ianstormtaylor/slate/issues/725

Documentation is the first priority because proper documentation on setting up the development environment will enable others to get involved.

The "Input is wonky on Android devices" issue is important because it is a longstanding bug that other editors where the source of truth is outside of the DOM have been having trouble with. QuillJS appears to have solved the issue. I don't know of any other editors that have.

Later Issues

  • [ ] iOS Device Integration Tests: Add integration tests for iOS
  • [ ] Android Integration Tests: Add integration tests for Android

How to Get Involved with Adding Mobile Support

We need your help.

I will start with iOS Documentation.

If anybody can start documenting an Android development environment, please let me know.

The "Input is wonky on Android devices" issue is likely the biggest obstacle to mobile support. If possible, it would be nice to have multiple volunteers work on this issue collaboratively. Please let me know if you can participate on fixing this issue.

♥ help ⚑ cross platform ⚑ mobile

Most helpful comment

Update:

Just a quick update on the Roadmap.

  1. Both the iOS and Android Development guide are completed but it was decided to keep this outside of Slate proper since most of it could be used for any kind of mobile web development. My goal is to move this into a SAAS I've been working on for knowledge sharing (kind of like GitHub but for knowledge instead of code and simple enough for a layman to use).

  2. I've done some preliminary investigative work on the Android wonky input issue (https://github.com/ianstormtaylor/slate/issues/725). On the way there, @nathanfu88 who has probably done the most visible work on the issue through a plugin he was working on (https://github.com/humandx/slate-gboard), let me know he was putting together a summary of experience him and his team had while working on Slate with Android. I think this will help us approach this problem better.

  3. @dmitrizzle has also volunteered to add to the iOS guide by detailing a gotcha with respect to floating menus. After I post the dev guides, I'll figure out the best place to put this extra information. I'm not sure if my iOS/Android guide should be a generic "advanced mobile" guide, or specifically a "contenteditable mobile" guide.

Thanks @nathanfu88, @dmitrizzle and @ianstormtaylor for their contributions to the mobile issue as well as anybody else I'm sure I've missed out.

All 20 comments

Note: I added a #mobile channel in Slack to discuss mobile issues https://slate-slack.herokuapp.com/

@thesunny Please start with #725 instead of the documentation because it's a major PITA for Android users.

@crisu83 Those 3 are all considered the first priorities and I'm hoping to get different people to work on different projects. I can see from my wording that it was written in a confusing manner though.

I already completed the iOS guide (just waiting for an answer from @ianstormtaylor before I merge the PR) and, personally, I (and probably some others) can't work on the "Input is wonky" bug until we can setup a development environment for it anyways. At this point, I can't even see the bug as I don't use Android myself.

@thesunny is anyone working on #725 yet?

The short answer is not yet.

The iOS guide and the Android guide (the other top priorities) are pretty much done but need to be merged and cleaned up a little. This lets more people work on the Android problem on the desktop.

The long answer is, there are many that have taken a crack at it and I know of at least one that went pretty deep but this is a tough problem to solve so I don't think it's as easy as putting somebody on it and fixing it.

Because it is a hard problem that hasn't been solved yet, I'd like to try to get a few of the people that have taken a crack at solving it and see if I can get some to carve out some time where we can all work together on the same problem. Not sure if this can happen but I think the synergy might help. Even if we don't solve it in the time period, we may have ideas that we can follow or learn more about the architecture of Slate and/or the nature of the problem to better to figure out a solution.

Update:

Just a quick update on the Roadmap.

  1. Both the iOS and Android Development guide are completed but it was decided to keep this outside of Slate proper since most of it could be used for any kind of mobile web development. My goal is to move this into a SAAS I've been working on for knowledge sharing (kind of like GitHub but for knowledge instead of code and simple enough for a layman to use).

  2. I've done some preliminary investigative work on the Android wonky input issue (https://github.com/ianstormtaylor/slate/issues/725). On the way there, @nathanfu88 who has probably done the most visible work on the issue through a plugin he was working on (https://github.com/humandx/slate-gboard), let me know he was putting together a summary of experience him and his team had while working on Slate with Android. I think this will help us approach this problem better.

  3. @dmitrizzle has also volunteered to add to the iOS guide by detailing a gotcha with respect to floating menus. After I post the dev guides, I'll figure out the best place to put this extra information. I'm not sure if my iOS/Android guide should be a generic "advanced mobile" guide, or specifically a "contenteditable mobile" guide.

Thanks @nathanfu88, @dmitrizzle and @ianstormtaylor for their contributions to the mobile issue as well as anybody else I'm sure I've missed out.

Just another short update.

  1. @nathanfu88 has let me know that he has completed a draft of the Android issues write up and is awaiting a review for technical accuracy.
  2. I'm completing a feature on my project right now. The next feature will allow public publishing of knowledge which is where I will put the development guides.
  3. Once 1 and 2 are completed, I'll try and put some time into https://github.com/ianstormtaylor/slate/issues/725 and/or see if I can rally some volunteers to work on the issue, possibly collaboratively.

Thanks @thesunny for pushing forward mobile support in Slate. I suggested an approach a while back, perhaps this could be useful. Tackling this is time consuming, thus we need as much contributors as possible.

Hi,

I'm an iOS developer and going through this issue, I was not sure I understood if it's in regards to mobile browser support, or if it's in regards to support for using native iOS and Android UI libs/APIs to render structured text in apps written in Swift/Obj-C or Kotlin/Java. Can any clarification be made?

@loudmouth This is for Slate used in the context of a mobile browser, not in a React Native app or a native mobile app.

Note: Some updates and activity happening here https://github.com/ianstormtaylor/slate/issues/725

Also, I'll spend 1-2 weeks in August if the issue isn't resolved by then.

Is it possible to add auto scroll when insert new line by Enter? I checked few editor (draft, quill, trix and some less popular) and no one has this feature. It's native behavior in any app like email or google docs on ios.

Like here https://user-images.githubusercontent.com/822911/43647547-9726f9ae-9740-11e8-8d5c-5c9c5df2ce30.gif

In desktop browsers scroll working correct.

@bragovo Slate itself includes autoscroll but I disabled it because it does not work in iOS. It kept jumping to the wrong position. Most likely this is the reason you don't see it in the other editors.

Will be working on Android Fix the week of August 13-17 and created a separate issue to track progress:
https://github.com/ianstormtaylor/slate/issues/2047

@thesunny is it possible to enable it by some option or it's hardcoded? There is no way to fix wrong jumping? It is very inconvenient to type a long text, because you need to scroll the screen after each few lines.

@bragovo since iOS at least works for now, my priority will be on Android where it's unusable right now.

The overriding problem the last time I checked is that scrollTo is broken in iOS. It may be fixed now as it's been a few months. Here's the relevant comment where I diagnosed this in case you want to take a crack at it:

https://github.com/ianstormtaylor/slate/issues/1513#issuecomment-356411404

My apologies @bragovo, it's been a while since I was working on this.

So, it turned out that window.scrollTo was broken only in iOS 11. So if you earlier versions, scrolling should work. If it was fixed in later iOS versions, we'd have to update the code to abort only within the versions of iOS 11 where it was broken.

Here is the relevant PR: https://github.com/ianstormtaylor/slate/pull/1515

Closing in favor of https://github.com/ianstormtaylor/slate/issues/2062, if you think this is unrelated let me know and we can reconsider.

@thesunny @ianstormtaylor I am using Slate v47 and it's working perfectly on desktop and iOS devices but onChange is not triggering on Android devices. I would greatly appreciate any suggestion. Thanks.

@thesunny @ianstormtaylor I am using Slate v47 and it's working perfectly on desktop and iOS devices but onChange is not triggering on Android devices. I would greatly appreciate any suggestion. Thanks.

I'm having the same problem with our product. Can't use it on android because nothing is getting triggered/saved.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

gorillatron picture gorillatron  Â·  3Comments

ianstormtaylor picture ianstormtaylor  Â·  3Comments

JSH3R0 picture JSH3R0  Â·  3Comments

Slapbox picture Slapbox  Â·  3Comments

vdms picture vdms  Â·  3Comments