-
Notifications
You must be signed in to change notification settings - Fork 15
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
Trigger autocomplete with paste as well as typing #354
Comments
Note that this behavior (of not triggering autocomplete on a paste) is NOT the expected behavior of SlickGrid, the library that the plating grid is based upon. To show that SlickGrid does trigger autocomplete on a paste:
|
Taking over from @wasade. |
This follows the solution described by @wasade in biocore#464. Two accompanying warts (both indicated in comments, search plateViewer.js for "TODO:") will have to be fixed before I want to merge this back into the main repo.
Adding @fedarko , as he's working on getting multicell-cut and paste to behave harmoniously with single cell cut and paste. Updating this issue w/text from Marcus's email update: I spent some time working with SlickGrid to see if there were any ways to get around the issue described here (and in Daniel's corresponding PR here), in order to make the CellExternalCopyManager SlickGrid plugin play nicely with google sheets/excel pasting. I wasn't able to reach the ideal solution of having all plugins on at the same time; my guess is that the problem is inherent to the way the CECM plugin works, since it (per its docs) adds another layer of indirection to SlickGrid input. Anyway! Since that path didn't work out, I implemented the solution that you and Daniel agreed on in this PR. I can confirm that it seems to work properly (the autocomplete-from-a-single-pasted-ID use case Amanda described in her issue is handled properly when the checkbox is disabled, and multi-select pasting is handled properly when the checkbox is enabled). Attaching a screenshot of what the first use case looks like on my system. Code Changes The PlateViewer initialize() method is getting called twice (verified this—if you put in a console.log('hi') statement at the start of initialize(), it'll get output to the dev console twice, once on the plate configuration being selected and once after the Create button is pressed). |
@fedarko Thanks again for investigating! Yeah, I think it's totally worth it to remove the warts while you're there. |
Closes biocore#567, and addresses one of the two "warts" needed before my fork can be merged back in (that will take care of biocore#354)
This checks to see if the multiSelectCheckbox is or isn't checked (it defaults to being checked, but it can be unchecked if the user uses the back/fwd buttons of their browser to return to this page after unchecking it). This is the second of the "warts" remaining in my solution of biocore#354, so my fork should now be ready for a PR. Also, I'm gonna tag biocore#562 in this -- this sort of solution might work there (although just using $(document).ready to force the <select> to start on `Choose plate type...` would probably be a better option).
Currently, pasting a sample id into the sample plating page does NOT trigger the autocomplete.
To reproduce:
![screen shot 2018-10-02 at 10 29 48 am](https://user-images.githubusercontent.com/10677935/46365887-90817a80-c62e-11e8-9f7e-11b53aaf090a.png)
5) In another well, *paste in* (do not type) 640202 6) See that autocomplete is not triggered, there is no option to select the correct sample with this id, and the sample is therefore shown as unknown:The text was updated successfully, but these errors were encountered: