Frederik Handberg's avatar
Frederik Handberg
npub1nj0c...2gqz
23 🇩🇰 I'm studying for a degree in Software Engineering while building fun projects and experimenting with drone technology. I'm also learning to sew garments as a hobby 🪡 Sometimes I work as a freelance photographer for different news outlets 📷 I mostly share progress updates as I'm working on my software and drone projects, and as I learn to sew. Basically, I just write about my hobbies...
I love blur effects and because of this, one of the first things I tried when I started learning AppKit, was how to implement a beautiful blurry background to elements. This is something that's super easy in HTML and CSS, and while it's also quite easy in AppKit, you don't get anywhere near as much customization - something as basic as blur radius cannot be changed in the `NSVisualEffectView` API provided by Apple. I always found this super annoying so I began looking for hacks to workaround this problem. Unfortunately, I never got very far with it... AppKit is complex and a lot of it is poorly documented, so for a beginner, it's a big and hardcore task. And therefore, I just decided to live with the default `NSVisualEffect`... But just now, I found this repository: This repository seems to have found a workaround to the _custom blur radius_ issue. However, they work in UIKit and I work in AppKit, so it's not quite the same, but should still be very useful as I think they use `CAFilter` which I believe works in both AppKit and UIKit. I've never worked with `CAFilter` before, so should be interesting. Apparently it's a super old thing, and also, it's a private API so I don't expect to be able to find any official documentation about it... #dev
The pictures are from 2 days ago 💚 #nature #photography 📷
Now that I have improved the media popup by implementing support for zoom-in and out with pinch gestures and an easier way to dismiss the media popup by either clicking the background or by swiping up and down, I think it's time to work on an easier to way switch between the different media attachments in a note document. I found this on Threads that I think looks quite good: Video credit: Initially, I just wanted to show chevron buttons to switch to next or previous attachment, but I think showing the actual thumbnails looks much nicer. I'll see if I can get that working 💻 #dev #inspiration View quoted note →
Been working on a different way to dismiss the image popup in the notes app. Before the only option was to either click Escape key or click in the background behind the image which will also close the popup. Now the user can simply swipe up or down, or "zoom out" by making the pinch gesture. I really want the image in the popup to animate back to its original position in the note document. I do have a semi-working solution, but it's still experimental. I'm having trouble with the opening animation being laggy, but the closing animation looks fine for some reason. #dev #macOS #Swift #SwiftUI #AppKit
I think it would be beneficial to have an easy way for the user to manage and clean/delete the assets (images and videos) in their vault. *The vault is the folder that contains all the files and folders in their Space.* It should show a list/grid of all the assets. Maybe have an import button. Be able to rename assets. Allow user to select and delete. Stuff like that. Then have filtering buttons. For example, filter by unused. This should display a list of all unused assets - meaning an asset that is not attached to any note or canvas. In case an asset is being used, the user should be able to see which notes and canvases are using it. I already have much of the backend for this, because once the user tries to delete an asset, the app will check to see if the asset is attached to any note or canvas, and if so, it’ll display a warning message that the user must confirm before the deletion will proceed. I just think it would be great to have a dedicated page to manage assets rather than doing this in the ‘Files’ sidebar. View quoted note →
I implemented an object to embed websites into visual canvas files in the notes app I'm building. image 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 need to show the actual website inside the minimap in the bottom-left corner. Currently, it just shows a dark box with a Safari logo. #dev #Swift #SwiftUI #AppKit #macOS
Think it’s time for me to try the KMP plugin in ItelliJ. https://plugins.jetbrains.com/plugin/14936-kotlin-multiplatform I only write native Swift code, so Kotlin Multiplatform is not interesting to me, but I’ve been using VSCode for a while now, and the Swift LSP is slow. Like really slow sometimes. Maybe IntelliJ is faster 🤷‍♂️ However, I am currently working on a macOS app, so will have to see if the plugin allows me to run the app directly from IntelliJ. And hopefully it actually prints the logs. I use a plugin in VSCode to be able to run my app, but often the logs just don’t appear at all in the terminal…
These problems are now fixed - moving on to the next bugs... Recently, I discovered a strange bug with lines that have wrapping. For example, if we have two lines that wrap around, and I then click the top half of index 0 of last line, then the caret is placed at last index of the line above. But then if I click bottom half of index 0, the caret is placed correctly at index 0 of that line. So yeah, for some reason it depends on the y-value of click position. Apparently, `NSSelectionAffinity` is using the `.midY` coordinate to determine where the caret will be placed. #AppKit View quoted note →
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. I’m having a problem with the floating formatting toolbar not appearing when selecting text in the table. So yeah, not completely working yet - a few bugs to be fixed. Also need to get all text formatting working. E.g. text alignment currently isn’t working. #dev image
Working on implementing support for tables in my notes app. Having trouble with `NSTextView` inside table cells not extending full height. Like if we have two cells in a row (which means there are two columns), then resizing column 1 will cause the text to wrap around. Cell 2 in column 2 will then increase its height leaving empty area below. This empty area is not clickable because the textview is not extending all the available height... Funny enough, when closing and reopening the note, then the height is calculated correctly. This means the available area is clickable. But as soon as I make a resize adjustment to a column divider, this available height is not calculated correctly... #bug
I just found out the Haven app can find all your Blossom media and save it locally as a backup. The only thing I can’t get working is videos in the ‘Viewer’ tab. I’m unable to play my Blossom videos and they also cannot show a thumbnail. Getting “No Preview ERROR 404”, but otherwise it’s working great.
It’s gotta be nice having all that fur to keep warm in the snow ❄️ It’s like a big winter coat 🧥 _(re-uploading with Blossom to keep a backup)_ image View quoted note →
This little RC nitro car has not been running for about 10 years. I replaced the glow plug to a new one and the tubes for fuel. It can start but then stops when I lower the RPM. It seems to not be getting enough fuel. image