-
Notifications
You must be signed in to change notification settings - Fork 93
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
Interactively autoincrement list when commenting #53
base: master
Are you sure you want to change the base?
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
@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 😇 |
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 |
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 |
Yeah, but the replacement string is not passed to the listeners Sent with GitHawk |
@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 |
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. |
More to that: |
Hey, long time no see! |
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: