Open Spomky opened 6 months ago
Icon mgmt is a bit boring.... The user shall:
Repeat for the application or each shortcut.
# Configuration (today)
pwa:
manifest:
...
icons:
- src: "icons/logo.svg"
sizes: [0]
- src: "icons/logo_48x48.png"
sizes: [48]
- src: "icons/logo_96x96.png"
sizes: [96]
- src: "icons/logo_144x144.png"
sizes: [144]
- src: "icons/logo_180x180.png"
sizes: [180]
- src: "icons/logo_256x256.png"
sizes: [256]
- src: "icons/logo_512x512.png"
sizes: [512]
This could be drastically simplified by formatting/converting the files during the compilation time
# Expected configuration
pwa:
manifest:
...
icons:
- src: "icons/logo.svg"
formats:
# Tuples format: sizes
svg: [0]
png: [48, 96, 144, 180, 256, 512]
During the compilation, the bundle should:
For dev/test, the images are not converted and formats are merged. The browser will moan about that in these envs, but not in production.
When done, this will be on a similar way for #66
Great idea.
I was also playing around with generating screenshots as a separate yaml file and importing it in the main pwa.yaml. That is
# pwa.yaml
imports:
- screenshots.yaml
Then the screenshots.yaml file can be independently maintained. I've been playing around with a screenshot generator using zenstruck/browser, because it handles the authentication so easily. The screen size options are still a bit clunky, though.
I think we could get rid of symfony/panther or zenstruck/browser by using screen capture API. From the profiler footes bur (maybe?).
Hmm, interesting. I'm not familiar with how to use that, especially from the command line.
I like the idea of having a utility that automates the screen captures into a script.
Description
As per discussion here: https://github.com/Spomky-Labs/pwa-bundle/discussions/100#discussioncomment-8692986
Example
No response