johnno1962 / injectionforxcode

Runtime Code Injection for Objective-C & Swift
MIT License
6.55k stars 566 forks source link

Stats Panel #89

Open ashfurrow opened 8 years ago

ashfurrow commented 8 years ago

This would be some panel that shows the user an estimate of the time saved using the plugin. Would use the work from #84 and #88. @orta is going to mock up some design. This is what Text Expander uses, for reference:

Text Expander is awesome

johnno1962 commented 8 years ago

Sounds good! I wonder how you’re going to get the data back from the injectSource.pl script though as only the script knows the path to the iOSInjection project. Perhaps it is best to store the time saved db globally for all projects injected in $HOME/.something.

ashfurrow commented 8 years ago

Good point! Hmm. Will need to think about that after some coffee...

orta commented 8 years ago

Xcode's user defaults?

On my phone, replies will be curt.

On Mar 13, 2016, at 11:44, Ash Furrow notifications@github.com wrote:

Good point! Hmm. Will need to think about that after some coffee...

— Reply to this email directly or view it on GitHub.

johnno1962 commented 8 years ago

I’d stick to a couple of dot files in the user’s home directory, one for the total injections and total time saved used by the script and one logging all injections (when, project, build time, injection time) for the stats panel, appended by the script. Xcode’s user defaults are a bit busy/slow for such a db.

ashfurrow commented 8 years ago

Makes sense! Is there a common Perl serialization format for the log, or you're thinking just a plaintext log?

johnno1962 commented 8 years ago

Plain old tab separated?

ashfurrow commented 8 years ago

Cool cool 👍

orta commented 8 years ago

Alright, so - think about what currently exists:

screen shot 2016-03-14 at 5 37 08 pm

and

screen shot 2016-03-14 at 5 37 16 pm

( and this proposal )

I'd like to talk about splitting the responsibility of some of the user-facing things into two separate places. An Injection Preferences panel, and a Tunable Parameters panel. With the prefs being focused on global state, and the parameters being about the current injection information. I don't have a mental space in this model for the Injection log so far given that it's often shown and is useful, and maybe it should stay as an external window. I do have a useful feature idea for it though

Injection Wide Settings Panel

Tunable Parameters

Injection Console

orta commented 8 years ago

I think the Settings panel can be turned into tabs, which can make it easier to focus collections of similar settings too, a good example of this is Alfred, which does it way, way better than I'd expect Injection to

screen shot 2016-03-14 at 5 39 02 pm

screen shot 2016-03-14 at 5 44 57 pm

screen shot 2016-03-14 at 5 39 00 pm

johnno1962 commented 8 years ago

I’m all ears.. I only have two requirements. A overall desire to keep things as simple as possible and whatever you do must absolutely never crash Xcode! I can’t offer much in the way of input until I see any specific mock-ups you do. Tabs seems a little OTT to me given how few options there are though I agree on the preferences tuning split :+1:

johnno1962 commented 8 years ago

I’m warming to tabs. what about preferences, tuning, Stats Panel tabs in a single window?

orta commented 8 years ago

I’m warming to tabs. what about preferences, tuning, Stats Panel tabs in a single window?

I mainly wanted to see tuning separated out, as it's about the immediate connection, whereas Pref/Stats are about Injection in general

johnno1962 commented 8 years ago

fair enough, It’s entirely up to you.

johnno1962 commented 8 years ago

I’ve created a branch for our furture endeavours “injection2” and given you push access. I hope to convert injection to ARC to make life easier soon

orta commented 8 years ago

👍🏾 - not sure how much time I'll have this next 2 weeks to help tout, heading out to siberia, but will be paying attention