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

Change dimension upon loading an Image through UI #1395

Merged
merged 11 commits into from
Jan 6, 2020

Conversation

ataata107
Copy link

Fixes #1391

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with npm test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/is-reviewers for help, in a comment below
  • Dimension change is working as expected

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If 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!

Screenshot from 2019-12-26 18-03-50
Screenshot from 2019-12-26 18-04-10

@codecov
Copy link

codecov bot commented Dec 26, 2019

Codecov Report

Merging #1395 into main will decrease coverage by 0.01%.
The diff coverage is 25%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1395      +/-   ##
==========================================
- Coverage   66.36%   66.35%   -0.02%     
==========================================
  Files         125      125              
  Lines        2572     2574       +2     
  Branches      406      406              
==========================================
+ Hits         1707     1708       +1     
- Misses        865      866       +1
Impacted Files Coverage Δ
examples/lib/defaultHtmlStepUi.js 11.29% <25%> (+0.44%) ⬆️

@ataata107
Copy link
Author

ataata107 commented Dec 26, 2019

@harshkhandeparkar @jywarren @keshav234156
Please do check this out. I will refactor it after your reviews.

@harshkhandeparkar
Copy link
Member

Does this do the reloading? Instead, I think there should be a load image callback or even which could trigger just the dimensions function(or anything else if you want). What do you think?

@ataata107
Copy link
Author

Yes you’re correct
By the way this doesn’t do reloading. This PR just triggers the dimension function as one loads an image.

Copy link
Member

@harshkhandeparkar harshkhandeparkar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks fine to me except for a few comments which I think you will fix soon.

@ataata107
Copy link
Author

Sure

@ataata107
Copy link
Author

@harshkhandeparkar removed the comments and refactored please review

@@ -353,6 +351,12 @@ function DefaultHtmlStepUi(_sequencer, options) {
else $step('.wasm-tooltip').fadeOut();
}

function changeDimension(step){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this function be called updateDimensions? The current name may be misleading. Please add JSDoc description comment for the function too. Thanks!

@jywarren
Copy link
Member

jywarren commented Jan 6, 2020

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(displayed) Image dimensions do not change upon loading a new image
3 participants