Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Fixing multi-drag so you can drag the children of currently dragging … #153

Closed
wants to merge 1 commit into from

Conversation

CoryDCode
Copy link
Contributor

@CoryDCode CoryDCode commented Aug 17, 2016

…blocks.


This change is Reviewable

@CoryDCode
Copy link
Contributor Author

+@RoboErikG +@vicng (Also, can we talk to Apple about how many characters are in "shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer"? That's an absurd number of characters for one parameter.)


Review status: 0 of 1 files reviewed at latest revision, all discussions resolved.


Comments from Reviewable

@RoboErikG
Copy link
Contributor

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 827 [r1] ([raw file](https://github.com/google/blockly-ios/blob/a9249d431510afb41f9a46af53b757a03958305e/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L827)):

   dragging the parent.
   */
  public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer,

Are these overrides? If not where are they being used?

Also, public above private methods.


Comments from Reviewable

@CoryDCode
Copy link
Contributor Author

Review status: 0 of 1 files reviewed at latest revision, 1 unresolved discussion.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 827 [r1] ([raw file](https://github.com/google/blockly-ios/blob/a9249d431510afb41f9a46af53b757a03958305e/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L827)):

Previously, RoboErikG wrote…

Are these overrides? If not where are they being used?

Also, public above private methods.

They're not overrides, they're implementations of protocol methods. Which means they should be in a different spot - done!

Comments from Reviewable

@RoboErikG
Copy link
Contributor

Brevity is the soul of wit. :lgtm: but get Victor to take a quick look as I don't really follow how this protocol works.


Review status: 0 of 1 files reviewed at latest revision, 2 unresolved discussions.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 1047 [r2] ([raw file](https://github.com/google/blockly-ios/blob/25a0227352208abd6478a79c0860cbae81d40398/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L1047)):

    return true
  }

nit ws


Comments from Reviewable

@vicng
Copy link
Contributor

vicng commented Aug 17, 2016

Tested this on a device and dragging blocks is much laggier than before. It looks like the culprit is the shouldRequireFailure method -- if you comment it out, things are a lot more responsive (albeit broken).

Can you explore some more to find a more efficient solution? Responsiveness/smoothness is our #1 priority.


Review status: 0 of 1 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 1019 [r2] ([raw file](https://github.com/google/blockly-ios/blob/25a0227352208abd6478a79c0860cbae81d40398/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L1019)):

// MARK: - UIGestureRecognizerDelegate

extension WorkbenchViewController: UIGestureRecognizerDelegate {

It might be more performant to create subclasses for two separate delegates (toolbox and workspace), so we don't have it going through unnecessary code.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 1053 [r2] ([raw file](https://github.com/google/blockly-ios/blob/25a0227352208abd6478a79c0860cbae81d40398/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L1053)):

   */
  public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer,
                                shouldRecognizeSimultaneouslyWithGestureRecognizer otherGestureRecognizer: UIGestureRecognizer)

Line length.


Blockly/Code/UI/View Controllers/WorkbenchViewController.swift, line 1068 [r2] ([raw file](https://github.com/google/blockly-ios/blob/25a0227352208abd6478a79c0860cbae81d40398/Blockly/Code/UI/View Controllers/WorkbenchViewController.swift#L1068)):

   */
  public func gestureRecognizer(gestureRecognizer: UIGestureRecognizer,
                                shouldRequireFailureOfGestureRecognizer otherGestureRecognizer: UIGestureRecognizer) -> Bool

Line length.


Comments from Reviewable

@CoryDCode
Copy link
Contributor Author

Hmm. I'm not seeing that. Can you show me what you're talking about when you get in?


Review status: 0 of 1 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful.


Comments from Reviewable

@CoryDCode
Copy link
Contributor Author

I'm likely to abandon this one, in favor of the other pull request. But I'm leaving it here for comparison until I merge the other, in case anyone cares.


Review status: 0 of 1 files reviewed at latest revision, 5 unresolved discussions, all commit checks successful.


Comments from Reviewable

@CoryDCode CoryDCode closed this Sep 14, 2016
@CoryDCode
Copy link
Contributor Author

Duplicate - solved with #172

@CoryDCode CoryDCode deleted the cdMultiDrag branch September 14, 2016 23:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants