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)
Add Firefox for Android PWA support #634 #635
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
flake.nix change just copies the files into the static
directory since its untracked.
Signed-off-by: afterlifepro <vielle.dev@proton.me>
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.
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
oops wrong area in commit msg 1 sec
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
large icons are blurry for some reason, heres another fix (sorry for the spam lol)
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
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?
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
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
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
expand 1 commit
hide 1 commit
this is required since firefox apparently doesn't
support png icons (in my testing)
Signed-off-by: afterlifepro <vielle.dev@proton.me>
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!)
the conversion is done quite easily with imagemagick: