Skip to content
This repository has been archived by the owner on Nov 3, 2020. It is now read-only.

[Podfile Editor] Allow option clicking on a pod #333

Merged
merged 7 commits into from
May 17, 2016
Merged

[Podfile Editor] Allow option clicking on a pod #333

merged 7 commits into from
May 17, 2016

Conversation

pedrovieira
Copy link
Contributor

@pedrovieira pedrovieira commented May 13, 2016

This PR implements #302 - "Allow option clicking on a pod":

  • Option click/three finger tap on a pod name to show the popover with the cocoapods pod page
  • Hovering the pod name with the option key down will also underline the pod's name
  • Clicking on any link inside the popover's WebView will redirect the user to the browser
  • Custom CSS to remove cocoapods.org global menu from the popover's WebView

How it looks:
option click popover

Would love to get some feedback.

@orta
Copy link
Member

orta commented May 14, 2016

awesome, glad to see it ( might be worth a rebase ) will give it a real look tomorrow 👯

@nwest
Copy link
Member

nwest commented May 16, 2016

Is there a way we can do this without associated objects? Not sure for OS X, but they're a pretty bad idea to rely on in iOS.

What if we subclassed or extended SMLTextView to add the functionality we need for this?

@pedrovieira
Copy link
Contributor Author

pedrovieira commented May 16, 2016

@nwest What I'm currently doing is extending the SMLTextView for the option-click functionality. I can change this to be a subclass of SMLTextView but we also need to subclass MGSFragariaView since the textView property is read-only. This doesn't mean it's hard, I'm just putting all on the table.
This solution was primarily chosen because it needed less components to be changed in order to work.
What are your thoughts on this?

return (podName, podNameRange)
}

private func updateUnderlineStyle(forPodAtRange range: NSRange) {
Copy link
Member

Choose a reason for hiding this comment

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

nice touch with forPodAtRange

@orta
Copy link
Member

orta commented May 16, 2016

Alright, yeah, I'm happy with that explanation - I should fix the danger CI issue - but that's not a blocker here 👍

@orta
Copy link
Member

orta commented May 16, 2016

Ah, it has merge conflicts - good to go after that's handled

@pedrovieira
Copy link
Contributor Author

@orta fixed conflicts 💪

@orta orta merged commit c9a4596 into CocoaPods:master May 17, 2016
@orta
Copy link
Member

orta commented May 17, 2016

awesome - thanks

@orta
Copy link
Member

orta commented May 17, 2016

Given this a run through - looks and feels great, good job @pedrovieira7

@orta
Copy link
Member

orta commented May 17, 2016

2016-05-17 09_36_59

ace

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