Uh oh!
There was an error while loading. Please reload this page.
Interactively autoincrement list when commenting - #53
Conversation
* Observes changes made in text view and autoincrements both numbered and unordered lists if list constructon is detected. * Preserves text insertion text attributes * Sets correct text selection after autoincrement text is inserted
SD10
commented
Mar 31, 2018
@viktorasl Thanks for submitting this PR ❤️ I haven't dug into your code, but I think this functionality may be better targeted as an extension to GitHawk itself. But I could be wrong, just passing by 😇 |
rnystrom
commented
Mar 31, 2018
Love this idea! But also agree it’d be better off in GitHawk itself because we shouldn’t have any actual features in this library. Sent with GitHawk |
viktorasl
commented
Apr 1, 2018
Oh, ok, I'll move the feature to GitHawk but not sure how I can implement there without modifying MessageViewController as I have to modify |
@viktorasl IIRC there is an abstraction |
viktorasl
commented
Apr 1, 2018
Yeah, but the replacement string is not passed to the listeners Sent with GitHawk |
SD10
commented
Apr 1, 2018
@viktorasl You can submit an initial PR making it available? It’s useful information. I almost did this before when needing to fix a bug Sent with GitHawk |
Sorry for close and reopen, was testing GitHawk accessibility, accidently closed the issue. Didn’t fully get the idea: shall I add the additional parameter in listeners metod to be able to pass replacement string in this repo? Sent with GitHawk |
SD10
commented
Apr 1, 2018
Yes @viktorasl that sounds 👌 to me |
I faced some problems:
Any ideas to solve those issues? I'm quite stuck not finding the balanced solution. |
viktorasl
commented
Apr 1, 2018
More to that: |
viktorasl
commented
Jan 15, 2019
Hey, long time no see! |
BasThomas
commented
Jan 16, 2019
cc @rnystrom |
Hello! 👋 It's my first try to contribute to this amazing tool. To make it even more efficient to construct lists I've worked on interactive auto-increment (seen the request GitHawkApp/GitHawk#1692).
Currently it does not do anything clever, just checks if a single new line text insertion occurs and then analyzes that text line. The work is done in
textView(_:shouldChangeTextIn:replacementString:)which means that pasted text is ignored but that could be changed probably without much effort as the actual logic is decoupled.In short what was done:
lists if list constructon is detected.
Next in feature polishing: