-
Notifications
You must be signed in to change notification settings - Fork 209
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
Disables Take a Photo Button and File Chooser While Camera is Active #1357
Conversation
@publiclab/is-reviewers Please review this, thank you! |
Codecov Report
@@ Coverage Diff @@
## main #1357 +/- ##
==========================================
- Coverage 66.57% 66.41% -0.16%
==========================================
Files 125 125
Lines 2546 2552 +6
Branches 397 397
==========================================
Hits 1695 1695
- Misses 851 857 +6
|
@Ryan10145 Can you please upload a gif of the changes made. After the change "click picture" and "close" buttons were not working for me and also the camera was not able not. |
@keshav234156 I'm not sure why that's happening, as it works fine on my machine, as shown in the GIF below. Can you check to make sure that the webcam works properly before the changes? Even before my changes, I had an issue before where on my computer without a webcam, the webcam stream wouldn't show (because it didn't exist) and also the buttons wouldn't work, which sounds similar to your situation. To test and incorporate these changes, I switched to a laptop which did have a webcam. I was going to further investigate and if necessary, create an issue/pull request to fix this problem.
|
src/modules/ImportImage/Ui.js
Outdated
@@ -9,7 +9,7 @@ module.exports = function ImportImageModuleUi(step, ui) { | |||
// add a file input listener | |||
var dropZone = '\ | |||
<div class="dropzone import-image-zone" id="' + dropzoneId + '">\ | |||
<p>\ | |||
<p id="dropzone-text">\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change was not needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, that was one of my testing changes that I forgot to remove before committing. You're correct, that change was not needed. Thanks for pointing that out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Thanks, all!!! 🎉 |
…1357) * Disables Other Buttons While Camera is Active * Remove dropzone-text id from ImportImage UI
Fixes #1321
This disables the other two buttons after the "Take a Photo" button is pressed and reenables them once the camera is closed.
Before "Take a Photo" is pressed and after camera is closed:
![Screen Shot 2019-12-13 at 9 04 17 PM](https://user-images.githubusercontent.com/8119928/70841998-2006e980-1ded-11ea-95ca-e63038b832ed.png)
After "Take a Photo" is pressed (I covered the webcam with my finger which is why the camera stream appears all black):
![Screen Shot 2019-12-13 at 9 04 28 PM](https://user-images.githubusercontent.com/8119928/70842009-2bf2ab80-1ded-11ea-9696-1f263904d727.png)
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
npm test
@publiclab/is-reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Please make sure to get at least two reviews before asking for merging the PR as that would make the PR more reliable on our part
Thanks!