Monorepo for Tangled โ€” https://tangled.org

Add Firefox for Android PWA support #634 #635

open
opened by vielle.dev targeting master

the images could be generated from the dolly svg but that would probably require bringing in a large dependency like inkscape and wouldn't bring huge benifits imo (&& just sticking it in tree was mentioned as best in the discord)

0
by vielle.dev 3 comments
expand 1 commit
64c65aaa
appview/pages: add png icons to pwa manifest

the conversion is done quite easily with imagemagick:

convert -density 300 -background none dolly.svg -resize 144x144 dolly-144x144.png

want me to try add it in and replace the in-tree png?

yeah that would be nice! if the nix build step could produce PNGs as one of the steps that would be super.

sign up or login to add to the discussion
1
by vielle.dev 1 comment
expand 1 commit
520f21a4
appview/pages, nix/pkgs, /: generate png icons and add to pwa manifest

oops wrong area in commit msg 1 sec

sign up or login to add to the discussion
2
by vielle.dev 1 comment
expand 1 commit
04d6306c
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest

large icons are blurry for some reason, heres another fix (sorry for the spam lol)

sign up or login to add to the discussion
3
by vielle.dev 2 comments
expand 1 commit
a2034ea6
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest

looks pretty good! /dolly.svg is ... not ideal haha. i am going to have to think about what the best way to manage tangled's assets are. we want to be able to style this easily with tailwind, but also avoid turning this into a gohtml template for usecases like this one.

fwiw you could probably make a copy of the template then use sed to remove the template stuff (bc that makes it not valid svg) and then use that temp file and delete it after?

sign up or login to add to the discussion
4
by vielle.dev 0 comments
expand 1 commit
65ebef9f
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest
sign up or login to add to the discussion
5
by vielle.dev 0 comments
expand 1 commit
62b402c7
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest
sign up or login to add to the discussion
6
by vielle.dev 2 comments
expand 1 commit
2e9f61c9
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest

sorry for the resubmit spam (if you get notifications for it) i was having some issues w fixing the merge conflict but i managed to get it sorted !!

looking pretty good!

  • can you format the manifest.json with jq?
  • we can simplify the nix script to use a loop in bash
#!/bin/bash

sizes=(48 72 96 144 162 512)

for size in "${sizes[@]}"; do
  ${imagemagick}/bin/magick -density 3000 -background none \
    ${src}/appview/pages/templates/fragments/dolly/logo.svg \
    -resize ${size}x${size} \
    $out/pwa-${size}.png
done
sign up or login to add to the discussion
7
by vielle.dev 1 comment
expand 1 commit
057a2b1c
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest

struggling to get the pkgsStatic variant of appview building, imagemagick is unhappy with the env. its a nixpkgs thing and not an issue with this PR however.

sign up or login to add to the discussion
8
by vielle.dev 5 comments
expand 1 commit
68af6096
appview/state, nix/pkgs, /: generate png icons and add to pwa manifest

replaced imagemagick with librsvg and it seems to be working fine now

i really dont know why imagemagick wasnt building but as long as tangled builds lol

thanks for taking a look! i will try this out locally.

couple of thoughts now that i am coming back to this:

  • we have since introduced OG card drawing libraries (oksvg namely), which is capable of rendering PNGs, we could use that library to use the single-source of truth dolly logo to draw the PWA icons
  • i think the PWA icon should not be the silhouette, but the full logo IMO. i don't know if there is a degree of customization here (we could serve the silhouette at smaller sizes perhaps)

happy to take over and implement that if you wish to discontinue this, and apologies for the slow review cycle on this!

  • wrt oksvg, since afaict its just a go lib without a cli mode would you propose having some go script to generate the svg icons (or something like build.rs if that exists) (or generate them on demand which seems bad lol)
  • full logo makes sense , just went off what i had for the original PR which was just using the favicon for simplicity. should be fairly trivial to have the icon be the silhouette at smaller sizes but looking at how big the icons would be i dont imagine its a huge issue wrt readability if theyre all the full logo

also no worries about slow review cycle lol, happy to keep chipping away at this one !!

wrt oksvg, since afaict its just a go lib without a cli mode would you propose having some go script to generate the svg icons (or something like build.rs if that exists) (or generate them on demand which seems bad lol)

yes to generate on demand! with the right cache headers this would be negligible overhead on our end (we already do generate a lot of images for OG cards, and these are less cache-friendly mind you!)

failed to check merge status: invalid xrpc request
sign up or login to add to the discussion
Labels
enhancement
assignee

None yet.

Participants 2
AT URI
at://did:plc:4zht3z4caxwrw3dlsybodywc/sh.tangled.repo.pull/3m2cepmmyic22