Posts by Frederik Handberg
I did some debugging by printing all the views on screen to figure out exactly what is showing. I needed to know the names in order to “kill” those views.
I figured out the two layers was called `EventPassthrough` and `MovableView`. Now I could explicitly hide those.
This did not work quite as expected… Even though the playback buttons did get removed, there was still a blurry rectangle that I could not seem to get rid of.
I wanted to conditionally show and hide the playback controls of the AVPlayer in AppKit.
I did this by providing a decimal, so when the value was below a certain number, I would hide the playback controls.
#dev #AppKit #SwiftUI #macOS
I’m building the app that I haven’t been able to find: a beautiful and native notes app for macOS that is perfect for writing note documents and creating mood boards in an infinite canvas.
#dev #SwiftUI #AppKit
The website objects are live, meaning that if the user double-clicks on an object, they can scroll, zoom, select text, and click links - just as they would in a real browser.
I implemented an object to embed websites into visual canvas files in the notes app I'm building. #SwiftUI #AppKit
I implemented a table block for my notes app.
The total table width can be resized but also each individual column.
Columns and rows can be added and removed in the context menu.
But I’m happy with how this feature turned out! 🚀
I will probably lower the opacity of the sidebar overlays just a bit, so they match the appearance of the app with the translucent blurry background. Because right now, I don’t think the dark solid background color of the sidebar overlays match the app’s appearance.
I just finished working on a sidebar overlay for the notes app I'm building 💻
When hiding a sidebar, the user can now move their cursor to the edge of the window, to show an overlay of the sidebar. I think it looks nice the way it slides out. #dev #macOS
Worked on a color picker today for my notes app.
It's fully functional, except for the alpha/opacity slider. After that's implemented, I'll work on making the UI look nice.
#dev #macOS #Swift #SwiftUI #AppKit
This is currently implemented for image blocks, normal text blocks, and headings - so I still got a few more blocks to work on...
Next task will be getting it to work in list blocks.
I just implemented a very essential feature in the notes app I'm building 😁
It's now possible to rearrange blocks by moving them up and down. Added two options to the context menu that appears when right-clicking a block: "Move Up" and "Move Down".
#dev #macOS #AppKit #Swift #SwiftUI
Next task: Currently the user must drop directly over a folder to relocate. Instead, dragging over a folder’s contents should highlight the parent folder’s background and allow the user to drop the dragged file or folder to relocate it.
Files and folders can now be relocated by drag and drop.
Would be cool to have an animation that shows the files being moved from one folder to another. Something I could work on in the future...
#dev #macOS #Swift #SwiftUI #AppKit
Also, I have worked on making a small preview overlay that appears when hovering notes. It's not quite done yet. Still need to work on the UI of it, but I think it's pretty nice.
Bookmarks are saved locally on the user's device in a file called `bookmarks.json` located in the hidden folder `.space/`.
I have now finished implementing support for adding and removing note documents as bookmarks.
The user can simply right-click a note and then select the option called 'Bookmark'. #dev #macOS #AppKit #SwiftUI
Code block in notes app
I just finished implementing code blocks in my notes app 🚀 #dev #macOS #Swift #AppKit
I finished drafting my t-shirt pattern in CLO3D and got it printed.
Now I need to trace it onto real pattern paper.
In the video, the red borders show the boundaries of each text view. Notice how I'm able to move between them seamlessly, as if it were one continuous editor.
My solution lets the user move the caret smoothly between text views just by using the arrow keys. On top of that, the implementation also supports making text selections across text views.
The user can even copy text from a selection that spans multiple text views.
The problem is that by default #macOS doesn't natively support caret navigation or text selection across multiple text views. This would be a big problem for the user experience in my app, so I had to build a solution!
For the past month or two, I've been working on some pretty complex logic to support caret navigation and text selections across multiple sequential `NSTextView`s in #AppKit.
I need this functionality for my block-based notes app, where each block lives inside its own text view. #dev
Luckily, I figured out a solution based on `INDSequentialTextSelectionManager`.
GitHub repository:
github.com/indragiek/IN...
An example of this is text selection:
The problem with having separate and independent text views is that selecting text across multiple `NSTextView`s is not natively supported.
Though, I’m not saying that having separate text views is solving all problems, because it does indeed create its own set of problems that must be fixed to ensure a good user experience.
I have tried to combine all block types in a single `NSTextView`, but it gets problematic converting the JSON structure to `NSMutableAttributedString` because the ranges gets screwed up very easily.