home.social

#textkit — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #textkit, aggregated by home.social.

  1. Finally almost done—so many edge cases, a ton of smoke and mirrors, but we've some slick tables in the Atlas's markdown editor. They support rich content, alignments, and have a pretty decent UI! They scroll when too wide! Columns size to content! Accessibility: Yes plz! They're sorta even cute!

    I spent weeks looking at other implementations and messing around with this to get it right so I am beyond excited for this addition.

    #iosdev #macdev #textkit

  2. Of course, I had to expand this already huge scope to include proper row and column selections with context menu like Notes because I can't help myself 🙃

    #iosdev #macdev #textkit

  3. Getting there—tables on both platforms now have cell editing, which took some elbow grease; selection behaviors are just about in place; and then a bit of polish to get those weird edge cases cleaned up. Excited about this one.

    #iosdev #macdev #textkit

  4. Well... this has been painful but looks oh so nice. Tables in Atlas and Fox's markdown editor on the horizon?!

    Support has been in the parser forever but I'd been needing to do the textkit pipeline refactor first before making use. I've been eager to give it a shot since and now am having too much fun hehe.

    #iosdev #macdev #textkit #pain

  5. Account auto-completion has arrived in #Oliphaunt!

    Start typing @ in the composer and you’ll get a native-style auto-completion window — right at the caret, just like in Xcode. No clunky bars or overlays — this is proper #Mac behaviour.

    It’ll be available in the next build.
    Is #Oliphaunt the first Mastodon client to do it like this?

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev

  6. Account auto-completion has arrived in #Oliphaunt!

    Start typing @ in the composer and you’ll get a native-style auto-completion window — right at the caret, just like in Xcode. No clunky bars or overlays — this is proper #Mac behaviour.

    It’ll be available in the next build.
    Is #Oliphaunt the first Mastodon client to do it like this?

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev

  7. Account auto-completion has arrived in #Oliphaunt!

    Start typing @ in the composer and you’ll get a native-style auto-completion window — right at the caret, just like in Xcode. No clunky bars or overlays — this is proper #Mac behaviour.

    It’ll be available in the next build.
    Is #Oliphaunt the first Mastodon client to do it like this?

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev

  8. Account auto-completion has arrived in #Oliphaunt!

    Start typing @ in the composer and you’ll get a native-style auto-completion window — right at the caret, just like in Xcode. No clunky bars or overlays — this is proper #Mac behaviour.

    It’ll be available in the next build.
    Is #Oliphaunt the first Mastodon client to do it like this?

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev

  9. Account auto-completion has arrived in #Oliphaunt!

    Start typing @ in the composer and you’ll get a native-style auto-completion window — right at the caret, just like in Xcode. No clunky bars or overlays — this is proper #Mac behaviour.

    It’ll be available in the next build.
    Is #Oliphaunt the first Mastodon client to do it like this?

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev

  10. I’ve upgraded the toot composer in #Oliphaunt to use TextKit 2 and improved the custom emoji picker — it now appears right at the caret position! I’m really pleased with how this turned out.

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev #Mac

  11. I’ve upgraded the toot composer in #Oliphaunt to use TextKit 2 and improved the custom emoji picker — it now appears right at the caret position! I’m really pleased with how this turned out.

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev #Mac

  12. I’ve upgraded the toot composer in #Oliphaunt to use TextKit 2 and improved the custom emoji picker — it now appears right at the caret position! I’m really pleased with how this turned out.

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev #Mac

  13. I’ve upgraded the toot composer in #Oliphaunt to use TextKit 2 and improved the custom emoji picker — it now appears right at the caret position! I’m really pleased with how this turned out.

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev #Mac

  14. I’ve upgraded the toot composer in #Oliphaunt to use TextKit 2 and improved the custom emoji picker — it now appears right at the caret position! I’m really pleased with how this turned out.

    #TextKit #TextKit2 #NSTextView #Cocoa #AppKit #Swift #SwiftUI #macOS #MacDev #macOSDev #Mac

  15. Anybody here know anything about fonts? I'm having an issue with the New York system font reporting different sizes across devices. I suspect my setup, yet I have no idea where this could come from 😭

    developer.apple.com/forums/thr

    Happy for any ideas or hints. Also let me know in which camp you are. I suspect the first output being the „correct one", yet I don't know for sure.

    #appkit #nsfont #textkit

  16. One of the coolest things I can create with DeclarativeTextKit and a syntax tree in #Swift and #TextKit is this:

    Use the same shortcut (here: ⌘B for Markdown bold face) to

    1) embolden a selection,
    2) or embolden word-at-point
    3) or remove bold markup around point or inside of the selection
    4) or combine 2+ bold spans into one

    The transformations are very simple to write. One to remove, one to add asterisks.

  17. The depicted code on its own doesn't make much sense for you, but what I see here is a template for same-ish behavior that I can refactor and reuse:

    1) find existing inline token ranges

    2) remove the markup pieces (backticks, parens, brackets, asterisks, underscores, ...) from all occurrences in the selected range (expanded to full "words")

    3) in cases of italics, bold, and inline code, wrap the result in markup again *if* the intent seems to be to unify 2+ spans into one

    #textkit

  18. 🏁 Milestone reached!

    This "Inline Code" shortcut implementation

    1. detects all existing inline code spans in the document
    2. removes their backticks
    3. wraps the result in a new pair of backticks.

    All in 27 lines of code 🎉

    (And many hundred lines of text mutation library and token tree traversal)

    #swift #textkit #markdown

  19. It lives, and it works!

    github.com/CleanCocoa/Declarat

    With this, I can now add wrappers to detect ranges in text buffers based on my AST/token tree information in the app and test-drive everything.

    #textkit #swift

  20. Performant #macOS TextView with line numbers and much more. (NSTextView replacement) #swiftlang #textkit

    Release 0.4.0 📦

    github.com/krzyzanowskim/STTex

  21. another #TextKit 2 issue added to the list FB11898356

    github.com/krzyzanowskim/STTex

    Reproduced with Apple provided Sample project. The selection API is buggy. Looks like I need to reimplement it to make it work #iosdev #macdev

  22. STTextView 0.1.2 with fixes that bugged me for a while. Enjoy whoever uses that besides myself 🥳 #macos #github #swiftlang #textkit

    github.com/krzyzanowskim/STTex