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 slider bug #65

Merged
merged 1 commit into from
Jun 11, 2019
Merged

Fix slider bug #65

merged 1 commit into from
Jun 11, 2019

Conversation

diegoserranoa
Copy link
Contributor

Fix slider bug when first selecting 0 and then sliding to other values caused the SEND button not to be enabled.

Changes

  • Fix slider bug
  • Remove Tracking Pixel

Test

  1. To replicate the bug: in master, setup the project to make the survey show up.
  2. Once the survey is shown, select 0 and then slide to other values (1, 2, 3 ... 10). The SEND button should still be disabled.
  3. To test the fix checkout this branch.
  4. Repeat Step 2. The SEND button should now be enabled whenever a score is selected.

Internal Trello Ref: link

@hachibu
Copy link

hachibu commented Jun 4, 2019

Who's qualified to review this?

@diegoserranoa
Copy link
Contributor Author

@hachibu usually @prabhatjha takes a look at the code or @marinhero who knows a little bit of Objective-c, I think 😄

@hachibu
Copy link

hachibu commented Jun 4, 2019

@diegoserranoa cool, I assigned them to this.

@@ -63,7 +63,8 @@ - (instancetype)initWithSuperview:(UIView *)superview viewController:(UIViewCont
[self setThumbImage:image forState:UIControlStateHighlighted];
[self setTranslatesAutoresizingMaskIntoConstraints:NO];
[self addTarget:superview action:NSSelectorFromString(@"updateSliderScore:") forControlEvents:UIControlEventValueChanged];
UITapGestureRecognizer *gr = [[UITapGestureRecognizer alloc] initWithTarget:viewController action:NSSelectorFromString(@"sliderTapped:")];
UILongPressGestureRecognizer *gr = [[UILongPressGestureRecognizer alloc] initWithTarget:viewController action:NSSelectorFromString(@"sliderTapped:")];
Copy link
Contributor

@prabhatjha prabhatjha Jun 4, 2019

Choose a reason for hiding this comment

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

So was it working with tap before but not with long press? Now it will work with long press but not tap ? @diegoserranoa

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@prabhatjha that's why I'm setting the minimumPressDuration to 0 in the next line. So no matter if it's a tap or a long press, the sliderTapped method would be called.

Copy link

Choose a reason for hiding this comment

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

Makes sense!

Copy link

@hachibu hachibu left a comment

Choose a reason for hiding this comment

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

🚢

@diegoserranoa diegoserranoa merged commit 07b47cc into master Jun 11, 2019
@diegoserranoa diegoserranoa deleted the ds-fix-slider-bug branch June 11, 2019 00:54
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.

None yet

3 participants