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

Dropdowns don't work on mobile #220

Closed
isaaclw opened this issue May 24, 2019 · 12 comments
Closed

Dropdowns don't work on mobile #220

isaaclw opened this issue May 24, 2019 · 12 comments

Comments

@isaaclw
Copy link

isaaclw commented May 24, 2019

The value is not populated in the field when clicking on it in a dropdown list.

This can be duplicated by using Chrome Development toolkit to test mobile.

Edit: for now I will use a text field and type in the value I need instead.

@bugy
Copy link
Owner

bugy commented May 25, 2019

Hi @isaaclw, thanks for reporting!
Unfortunately, I didn't put much attention to using the script server on mobiles, so there can be other weird issues

@bugy bugy added the bug label May 25, 2019
@bugy bugy added the resolved label Jul 17, 2019
@bugy bugy added this to the 1.15.0 milestone Jul 17, 2019
@diegorodriguezv
Copy link

Hello. Thanks for this amazing piece of software!
Unfortunately, this bug doesn't seem to be fixed for file parameters. I'll try to test other types of parameters tomorrow. I can confirm that the behavior has changed. Before this update, selecting any file wouldn't change the field value (it remained empty). Now one of the files is selected always (a wrong one) and you can't change it. The tip from @isaaclw is clutch!

@bugy
Copy link
Owner

bugy commented Aug 5, 2019

Hi @diegorodriguezv, thanks for reporting, I'll have a look!

@diegorodriguezv
Copy link

Ok, So I checked the "Very parameterized" sample config json and the problem is only present when the width is less than 1000px in the Chrome Development toolkit. I'm also testing in a Sony Xperia Z2 which has a resolution of 1080 x 1920 pixels but no matter if I use portrait or landscape orientation I can't select from: simple list, required list, very long list, secure list or server file. The other fields seem to work all right. Let me know if I can provide further assistance.

@bugy
Copy link
Owner

bugy commented Aug 6, 2019

Hi @diegorodriguezv thanks for the additional details. In the last comment, you mentioned, that "simple list, required list" doesn't work for you. But these are just simple comboboxes, which should have been fixed already.
Are you checking on dev version?

@isaaclw
Copy link
Author

isaaclw commented Aug 6, 2019

Thanks @bugy I've been meaning to find time to look at the patch needed. I'm still using text fields instead of a dropdown (which was my initial bug report).

Unfortunately, this doesn't seem to fix the problem I noted.
The easiest way to test is to just open up Chrome and use the Mobile Browser option.

There are two issues which are likely the same thing:

  • When you click an entry that is over the 'execute' button, it will execute immediately, unless the field is required because:
  • Selecting any element in the dropdown list results in no changes to the dropdown.

Perhaps it's an issue with the dropdown widget that the android browser doesn't like?

Edit: I pulled from git, and restarted the service.

@diegorodriguezv
Copy link

I checked with the git version, master branch, the last commit is 03a29b9 "#220 fixed dropdown selects on mobiles + improved mobile scaling". The OS is an updated raspbian jessie in a Raspberry Pi 3.

@bugy
Copy link
Owner

bugy commented Aug 7, 2019

Hi, @diegorodriguezv, @isaaclw
thanks for checking... I tested it on my Android phone and in a browser (mobile view), worked fine for me :(

@isaaclw, did you rebuild web after pulling from Git? like tools/init.py or npm build:dev?

@isaaclw
Copy link
Author

isaaclw commented Aug 9, 2019

@isaaclw, did you rebuild web after pulling from Git? like tools/init.py or npm build:dev?

I did not. Thanks for the suggestion. Unfortunately it crashes:

gi[@ohm:~/script-server] master ± git pull --ff
Already up-to-date.
[@ohm:~/script-server] master ± ./tools/init.py
Building web...
Traceback (most recent call last):
  File "./tools/init.py", line 59, in <module>
    prepare_project(project_path, prod=not args['dev'], download_web=args['no_npm'])
  File "./tools/init.py", line 40, in prepare_project
    build_web_files(prod, project_path)
  File "./tools/init.py", line 31, in build_web_files
    process_utils.invoke('npm install', work_dir)
  File "/opt/script-server/tools/../src/utils/process_utils.py", line 35, in invoke
    raise ExecutionException(result_code, error, output)
utils.process_utils.ExecutionException: Execution failed. Code 1: (node:2549) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
npm WARN package.json script-server@1.14.0 No description
npm WARN package.json script-server@1.14.0 No repository field.
npm WARN package.json script-server@1.14.0 No README data
npm WARN package.json script-server@1.14.0 No license field.
npm ERR! Error: Method Not Allowed
npm ERR!     at errorResponse (/usr/share/npm/lib/cache/add-named.js:260:10)
npm ERR!     at /usr/share/npm/lib/cache/add-named.js:203:12
npm ERR!     at saved (/usr/share/npm/node_modules/npm-registry-client/lib/get.js:167:7)
npm ERR!     at FSReqWrap.oncomplete (fs.js:135:15)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 4.19.42-v7+
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install"
npm ERR! cwd /opt/script-server/web-src
npm ERR! node -v v8.11.1
npm ERR! npm -v 1.4.21
npm ERR! code E405
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     /opt/script-server/web-src/npm-debug.log
npm ERR! not ok code 0

Sorry. I'm probably missing something minor, I can't remember exactly how I had installed it the first time.

@bugy
Copy link
Owner

bugy commented Aug 9, 2019

Hi @isaaclw, thanks for checking and sorry for the troubles :(
To avoid building yourself, you can download latest built web using
tools/init.py --dev --no-npm
It will skip npm phase and just download web sources directly

@isaaclw
Copy link
Author

isaaclw commented Aug 9, 2019

Great! Thanks for working with me on that. That works. I'll have to try the file options, I didn't notice 'file_upload' being an option before.

@diegorodriguezv
Copy link

Hello. It works!
After tools/init.py --dev --no-npm the problem seems fixed. I was just using git pull and restarting the service. Thanks a lot.

@bugy bugy closed this as completed Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants