EXPERIMENTS

#020 Search Suggestions
    Feature
by Cam, 01/18/23

Realization

Feature Overview

Search Engine Preferences

The above video highlights different search suggestions for “dub” dependent on the search engine used. Users of Dub can set their preferred search engine. This lays the foundation for us to customize search in blockchain-oriented way (injecting blockchain-focused results and information.

Command Palette

Search Suggestions are also at the core of bringing the familiar ‘⌘K’-like, natural language navigation to Dub. With Dub’s command palette, users can easily navigate both the Internet and Blockchains. More on this coming soon.

App Settings

app-settings.png As part of giving users a Search Engine preference, I explored and added basic app settings for Dub. Soon, users will have the ability to customize the theme, keyboard shortcuts, and core settings of Dub from a native settings panel.

Window Exploration

Lastly, I explored (yet fully failed) to find a swift-y way to create a full-window overlay (for when the command palette is active). I’ve explored basic ways of achieving this like overlays and ZStacks, but both of these options only meet ~80% of the desired effect / functionality. I’ve moved onto more advanced NSWindow manipulation to try and find a better solution.

Process

Primary Challenges

Poor documentation is my pain. Almost all of the search engines that we are leveraging for search suggestions do not offer official APIs and I was left to scour, parse, and wrangle data from each of the six featured search engines.

Learnings

In my efforts to wrangle terrible source data, I learned quite a bit about Data encoding / decoding which will be incredibly helpful for leveraging Native MacOS features like external drag-and-drop and Data Persistence.

Next Steps

What’s left to do?

The interface (Command Palette) for searching and navigating Dub is only ~20% complete. I’ve been exploring some existing demos to pull-in advanced functionality like keyboard navigation and text selection, which has put me a bit behind on delivering a completed Command Palette interface for searching things on Dub.

What are you working on for the next week?

Over the next week, I will be bringing this interface (or at least minimum viable version of it) across the finish line. I will also be collaborating with Pavan on designing and building more of the wallet interface for Dub.