Skip to content
This repository was archived by the owner on Aug 23, 2025. It is now read-only.

Make installable share target on Android#24

Open
leonhandreke wants to merge 9 commits into
fonsp:masterfrom
leonhandreke:leonhandreke/whaaaaa
Open

Make installable share target on Android#24
leonhandreke wants to merge 9 commits into
fonsp:masterfrom
leonhandreke:leonhandreke/whaaaaa

Conversation

@leonhandreke

Copy link
Copy Markdown
Contributor
  • Use newer version of x/canvas that supports Deno >= 2
  • .gitignore deno.lock
  • Serve printi page on /
  • Set API server URL from request or reverse proxy
  • Implement installing from Chrome and sharing from Android
  • After first printi sent, prompt to install share target on Android
  • Set h1 from template rendering instead of JS
  • Center that shit

This is good for several reasons:

First, better DX, can run a local printi stack without too much hassle

Second, serving out the manifest for fancypants sharing dialog on
Android requires setting the right headers, and GitHub can't do that.
@leonhandreke leonhandreke force-pushed the leonhandreke/whaaaaa branch from 1a6f6c5 to 341e906 Compare July 22, 2025 23:31
@leonhandreke

leonhandreke commented Jul 22, 2025

Copy link
Copy Markdown
Contributor Author

Yeah, it works and it's cool. Sometimes the commit messages contain more info on why I did something.

I also added Docker things. Can now run with docker compose up --build api. Let's talk about how to host this in the future. Need to get rid of that github.io setup (it did not support serving the web manifest).

I'll take a look at the tests later...

@leonhandreke leonhandreke force-pushed the leonhandreke/whaaaaa branch from 341e906 to d8903e1 Compare July 22, 2025 23:34
@leonhandreke

Copy link
Copy Markdown
Contributor Author
Screenshot_20250723-104118 Screenshot_20250723-005532 Screenshot_20250723-005544

@leonhandreke

Copy link
Copy Markdown
Contributor Author

I also thought a bit about how to make the share targets a bit more distinctive. We could easily render a per-printer banner.svg with a (stable) color from a pastel color palette (I think every messenger app does this).

Merlijn also suggested emojis. I thought this could really be a good machine learning usecase, picking the right emoji for a printi. But then we need a database urgh...

@fonsp

fonsp commented Jul 28, 2025

Copy link
Copy Markdown
Owner

OMG SOOO GOOOOOODDDDD

@fonsp

fonsp commented Jul 28, 2025

Copy link
Copy Markdown
Owner

Yehehhhhhh

@fonsp

fonsp commented Jul 28, 2025

Copy link
Copy Markdown
Owner

Creating a banner.svg is super cool! I really like the idea of a stable color from a palette! Like a "hash" function that outputs a hue? I did that for the outline colors in https://featured.plutojl.org/

https://github.com/fonsp/Pluto.jl/blob/118b3a64ba8bf54ea23768684501644ba20af71a/frontend/components/welcome/FeaturedCard.js#L8

@fonsp

fonsp commented Jul 28, 2025

Copy link
Copy Markdown
Owner

So now instead of https://api.printi.me/ (hosted with Deno on digitalocean) and https://printi.me/ (hosted with github pages from https://github.com/fonsp/printi-static) we just have a single server for both on the same domain, right? I like it!

I'll give you access to digitalocean so you can mess with it, feel free to use something different also. I like deno deploy but it would also be nice to use something simple and less amerikaans

@fonsp

fonsp commented Jul 28, 2025

Copy link
Copy Markdown
Owner

So each printer page installs as its own app, right? And different printers show up in the Share panel as separate "apps" that you can share with? I like it!

@leonhandreke

Copy link
Copy Markdown
Contributor Author

So each printer page installs as its own app, right? And different printers show up in the Share panel as separate "apps" that you can share with? I like it!

Yes!

I also thought about making it install one app that then takes you to a page where you can share to one or more printis (I think Snapchat does this). WDYT? we could keep your favorite printis in local storage.

@fonsp

fonsp commented Jul 29, 2025

Copy link
Copy Markdown
Owner

Both are fine!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants