syntax-prosody-ot / main

A webapp for the syntax-prosody analyst working in Optimality Theory, with automated Gen, Con and Eval. Download build files from syntax-prosody-ot/build
https://spot.sites.ucsc.edu/
GNU General Public License v2.0
12 stars 2 forks source link

Combinations and permutations input validation #491

Closed maxTarlov closed 3 years ago

maxTarlov commented 3 years ago

When "generate terminal strings" is clicked, the user has no good way of knowing if they used invalid inputs. Invalid inputs sometimes throw cryptic errors that can't be seen outside of the console (maximum call stack exceeded), and sometimes just do nothing at all. interface1.js should check that for each string

jbellik commented 3 years ago

Use the displayError() function -- I think it's defined in interface1.js

jbellik commented 3 years ago

Error if max or min is 10 or greater Warning if max or min is greater than 5

Error/warning message should say something about how it will generate too many terminal strings and may cause your browser to freeze. The number of terminal strings of length n generated from a set of m different terminals will be n to the power m.

jbellik commented 3 years ago

Try: Drop down menu solution

jbellik commented 3 years ago

Do this in a separate branch, possibly based on "save_load_update" branch to get the unit tests.

jbellik commented 3 years ago

Copied over from Max's comment on the pull request:

Unit Tests for save/load have been merged into master, no need to merge from save_load_test To run unit tests on this:

run testBuild.sh open interface1.html in JS console, use runStringTest() mocha reporter should appear at the top of the page N.B. the unit tests right now use numbers out of the range that you have defined. If that makes the test fail, you can change them in the unit test code, i am working on a better way to check that things have saved

sz245 commented 3 years ago

I tried the drop down options and we should probably just stick with the non-drop down option. I can get the value of the first terminal min and max but I can't find a way to get the value from terminal 2 and onward. I committed the changes I tried which is in save_load branch.