Comments (9)
Really great write up on the issue, makes it super clear!
Thoughts I have so far:
-
I can update the icon using this property in the script filter:
"icon": { "type": "fileicon", "path": "~/Desktop" }
-
If we are updating the search result icon for notion pages with custom icons (ie not emojis) then perhaps we should consider doing this for every notion page to create a consistent experience. Plus design-wise it feels better to use the notion icon functionality rather than having the emoji within the text space of the search results, where it is currently.
A limitation here is that alfred requires an actual image file to load the icon, you can't just paste an emoji code in there. So we would need a lookup table of emoji to emoji-image, with a set of images that represent emojis. A consideration here is that emojis look different depending on your platform so we would be locking everyone into the same visual style if we used one set images that represent emojis.
-
Notion store the custom icons in S3, called through Notion.so itself, I think I could reverse engineer this link and dynamically create it each time in the Alfred workflow, I don't see a problem here.
-
Over time images will build up in a temp directory. There are probably a number of different options on how to clear that up over time.
from notion-search-alfred-workflow.
Hey
I've been working on some changes to enable custom icons. Alongside this, I've changed the design so it uses Alfred's native icon functionality, which means there is a big design improvement IMO.
Have a look and try it out https://github.com/wrjlewis/notion-search-alfred-workflow/releases/tag/v0.3
Thanks, Will.
from notion-search-alfred-workflow.
It was odd, because I actually do have that library installed, but I guess something's just weird in my path? But of course, using something like that isn't ideal for every user. That all being said, 0.3.1 is a smashing success, everything is working like a charm for me. Sincerely appreciate the effort! This really does take an already powerful workflow up a notch 💪
from notion-search-alfred-workflow.
Yep I’ve seen a couple of times where the path has acted strangely or there can be multiple versions of Python getting in the way.
Anyway. That’s so Awesome and I’m really glad to hear it’s working!
Thank you for the suggestion and raising this issue. It’s been a fun one to work on (minus my new found hatred for Emoji encoding 😂).
from notion-search-alfred-workflow.
Thanks for taking the time to consider it. I hadn't thought about converting emoji to emoji images for the result icon. That makes sense.
It might be a long-shot, but maybe the user can somehow choose their set of emojis, with a variable? I'm not totally sure what the variants are, but it might be an option, if it's a big enough issue.
As for the S3 storage, you're right- about custom images that a user uploads to Notion. However, if you use the "embed link" option for a custom icon, it will only use that external link. I'm not sure if that changes anything regarding your third point.
from notion-search-alfred-workflow.
Hey Will,
I can't believe you got this done so quickly! That's amazing. Unfortunately for me, I'm having some issues after installing the workflow and migrating my settings. It seems as though it's having trouble importing requests for some reason?
[16:55:22.679] Logging Started...
[16:55:24.752] Notion Search[Script Filter] Queuing argument 'r'
[16:55:24.879] Notion Search[Script Filter] Script with argv '(null)' finished
[16:55:24.881] ERROR: Notion Search[Script Filter] Code 1: Traceback (most recent call last):
File "notion.py", line 10, in <module>
import requests
ImportError: No module named requests
Did something change there, or did something happen to my Python installation?
from notion-search-alfred-workflow.
Ahhh I used the requests library - I didn't realise that isn't a standard library.
I've updated it to use the httplib library instead, which you will have by default. Can you please try again with version 0.3.1?
from notion-search-alfred-workflow.
Just my $0.05
:
-
issues with displaying
SVGs
, try converting toPNG
but don't use imagemagick, use shakiba/svgexport` and try serve Alfred that instead. -
regarding lookup table for emoji, if you don't get an actual emoji glyph returned from Notion, try see if using
emojidex/emojidex-web
service can work, or see if you can utilize emoji.json. -
if you get an actual emoji glyph back, you can use this free API to resolve it to an image: emoji to image
from notion-search-alfred-workflow.
The emoji to image free API is really cool, thank you for that!
Regarding your other points, I have been hesitant to introduce third-party libraries since each individual user would need to install those prior to using the workflow.
from notion-search-alfred-workflow.
Related Issues (20)
- search by text HOT 2
- Notion SVG icons are not displayed HOT 7
- Breadcrumb Separator HOT 1
- Not working in Alfred 5 Mac M1 HOT 8
- Having "In page" Notion Quick Search Option implemented into the Notion Search Alfred Workflow ? HOT 16
- The error "xcrun: error" is output HOT 2
- "notion search option" disappears from Alfred HOT 2
- SSL Certificate verify failed HOT 6
- Python processes uses 300% of my CPU on version 0.5 (intel Mac) HOT 11
- Add Support to Open Search Results in New Window (Notion for MacOS) HOT 3
- "Payload" object has no attribute "pages" HOT 3
- Notion app does not launch since update HOT 6
- No result display and show back HOT 8
- Have tried all solutions discussed previously, SSL certificate issues still exist HOT 7
- The Alfred 5 download link is broken HOT 1
- Search result: 'Payload' object has no attribute 'results' HOT 4
- Keyword "Competitor" seem to break plugin HOT 4
- SVG Icons do not show: due to cairo libraries not found on apple silicon HOT 1
- Feature Request: 2 separate Alfred triggers to search Notion Page Title vs. Notion in-page
- WORK GR8! thanks! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from notion-search-alfred-workflow.