WTH why is it so hard to edit in the code editor on mobile?

Tags: #<Tag:0x00007fc41e17a568> #<Tag:0x00007fc41e17a3d8> #<Tag:0x00007fc41e17a1a8>

It’s extremely frustrating when trying to make changes on a mobile device in the code editor text boxes. Sometimes it works most times it jumps all over the place.

And you can forget about copying and pasting anything in there, I tired fighting with it for to long I just gave up and have to wait now till I can open it up on a physical keyboard.

Indeed! copy-pasting is not possible.

I tried vscode addon but that’s not easy as well :slight_smile: (in relation to this topic).

1 Like

Yep editing with vscode on mobile is just as bad. Funny thing is if you use a bluetooth keyboard attached to your mobile device it works perfectly. But if I am getting that thing out I’d rather just grab my laptop.

I wish it was reliable though as there are many times I just need to make a quick change or test something out and… You cant.

Yes, and since home assistant is a typical “just-do-it-before-you-go-asleep-and-configure-it-in-your-bed-application” this is a must have :slight_smile:

6 Likes

Gotta do it while it fresh in the head :joy:

1 Like

on Android you can use Droidedit app very easy to make yr updates
the pro version has more useful features

Yes, there are many code editors out there. You mean by means of opening config files via samba…?

yes through sftp (ssh) or git using the droidedit pro version you can access yr local config remotely

I use QuickEdit and it works extremely well but I am taking about in the app or webview itself.

It is not quite perfect solution as it is not aware of HA services, entities, etc. and yaml functions, like ‘File editor’ and ‘Visual Studio Code’ add-ons are. This is just a workaround :slight_smile:

I would agree that ‘File editor’ and ‘Visual Studio Code’ could be improved for use on mobile devices. However, I also know that this is something “extra” and not HA per se :wink:

Those add-ons are not HA but the code editors in the webview are and that’s my WTH, they suffer the same issue as all editors do in a webview on mobile, and to that I say WTH.

I don’t tend you use the code editors (such as editing Lovelace views, etc.) on mobile, but I do sometimes want to test out templates in the Developer Tools on mobile and the editor there is just as bad.

The thing I hate is not being able to easily delete multiple lines. Selecting all and pressing backspace does nothing. Holding down backspace will only allow you to delete a single line at a time as it doesn’t wrap onto the previous line. This is particularly bad for the template editor, as the first thing I usually want to do is delete the default example template.

3 Likes

I wrote up an issue a year ago about this. It’s CodeMirror and it’s a pile of poop on mobile devices. They (CodeMirror people) claim they are working on it, but it seems like it’s taking forever. So unless we move away from CodeMirror, we’ll be having these issues for some time it seems.

3 Likes

Underlying engine for VSCode:

https://microsoft.github.io/monaco-editor/

… and nope, that still goofs up on my Android tablet. :man_shrugging:

1 Like

I have this issue every time I try to use the dev tools on mobile. The states and services tools are much less useful when I can’t copy and paste.

2 Likes

+1 I tried it a couple of times on an iPhone, gave up after a few minutes, even small edits (try copy pasting) are not working well at this moment.

Granted, I would use this only for very minor edits, not completely new stuff.

1 Like

Any development with this issue? It’s really annoying I cannot tune my smart devices from the bath tube on my ipad :slight_smile:

Yes! This was fixed for me on Android a couple releases ago, when the updated to code mirror 6. What release are you on and what device so you use?

I saw I said iPad, I saw a PR to fix an issue with safari but if you use Chrome or Firefox it works!

It does not work in my chrome, nor in the HA app. I have HA updated completely.