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

FIX: Histogram module selected value not displayed #1510

Merged
merged 2 commits into from Jan 17, 2020
Merged

FIX: Histogram module selected value not displayed #1510

merged 2 commits into from Jan 17, 2020

Conversation

VladimirMikulic
Copy link

@VladimirMikulic VladimirMikulic commented Jan 15, 2020

Fixes #1295

The histogram module values are "true" and "false".
jQuery would coerce them to Boolean true and false instead of String
"true" and "false" which would result in empty value being displayed.

ezgif com-video-to-gif (4)

@keshav234156 could you review this? Thanks.

@codecov
Copy link

codecov bot commented Jan 15, 2020

Codecov Report

Merging #1510 into main will not change coverage.
The diff coverage is 41.17%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1510   +/-   ##
=======================================
  Coverage   66.62%   66.62%           
=======================================
  Files         129      129           
  Lines        2661     2661           
  Branches      428      428           
=======================================
  Hits         1773     1773           
  Misses        888      888
Impacted Files Coverage Δ
src/modules/Blend/Module.js 61.01% <41.17%> (ø) ⬆️

@keshav234156
Copy link
Member

@VladimirMikulic @harshkhandeparkar cause of the problem seems to be correct. But was just wondering, we also have a "select" type option in Edge-detect.In Edge-detect datatype is identified as a string but in Histogram, data-type is identified as Bool. Do you know why that happening?

@harshkhandeparkar
Copy link
Member

harshkhandeparkar commented Jan 15, 2020 via email

@rishabhshuklax
Copy link
Member

options.gradient = JSON.parse(options.gradient);

Error is because of this line

@VladimirMikulic
Copy link
Author

Thanks @blurry-x-face. Yes, that is the error and I've updated the PR accordingly but I'll still keep my String constructor in defaultHtmlStepUi. It will serve like a security mechanism, if a programmer forgets to parse the value as a string, it will do it for him since everything in the DOM is a string.

@keshav234156 this is ready, could you also approve this on GCI dashboard? Thanks.

Copy link
Member

@keshav234156 keshav234156 left a comment

Choose a reason for hiding this comment

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

LGTM!!

@keshav234156
Copy link
Member

keshav234156 commented Jan 15, 2020

@VladimirMikulic Let's protect this with a UI test. Would you like to add a UI test for the test which check that all the modules the default options are displayed . I can publish a hard task related to this on the GCI dashboard if you want.

@VladimirMikulic
Copy link
Author

@keshav234156 I can't promise anything, but if you publish it I'll see what I can do.

@rishabhshuklax
Copy link
Member

@keshav234156 I'll be happy to write those UI tests!

@keshav234156
Copy link
Member

@blurry-x-face Ok, Go Ahead!!

@keshav234156
Copy link
Member

@jywarren it's ready for your final review!!!

@jywarren
Copy link
Member

This is weird. I used to see this:

image

And i still see that on #1453

Here I see this:

image

And there's no option to Update branch -- do you know why? Can you update it yourself by rebasing?

Thanks!

VladimirMikulic and others added 2 commits January 17, 2020 21:38
The histogram module values are "true" and "false".
jQuery would coerce them to Boolean true and false instead of String
"true" and "false" which would result in empty value being displayed.

Resolves #1295
@VladimirMikulic
Copy link
Author

@jywarren now it should be fine. Thanks.

@jywarren
Copy link
Member

I'm going to try to squash and merge. Maybe it just can tell it doesn't need to re-run checks?

@jywarren jywarren merged commit afc9031 into publiclab:main Jan 17, 2020
@VladimirMikulic
Copy link
Author

👍

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

Successfully merging this pull request may close these issues.

Selected value of the drop-down is not displayed
5 participants