-
Notifications
You must be signed in to change notification settings - Fork 373
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unify example screenshots #2273
Comments
Figure out workflow and document it:
|
We should have
Instead of outputting a single link, the upload image script will output a responsive image element snippet after uploading all the image sizes:
This can still be directly pasted into a markdown file, and it should work in all browsers, becase unrecognized tags are treated as The script currently supports uploading any kind of media to |
|
With automatic image stack creation and support for reading from clipboard in #2411, the workflow now looks like:
I think this workflow gets us pretty far until more automation with blueprints is possible. We could consider formalising (2) a little more, but I'm not sure the technical pain of enforcing this is worth the value. |
Sounds great! |
…py (#2411) ### What Create and upload multi-resolution stacks with `upload_image.py` Clock example screenshot updated as an example of the result obtained. Relates to #2273 TODO: - [x] pngcrush stuff? - [x] docs - [x] test with jpg as well ### Usage ```sh $ just upload --help python3 "scripts/upload_image.py" --help usage: upload_image.py [-h] [--single] [--name NAME] [--skip-pngcrush] [--debug] [path] Upload an image. positional arguments: path File path to the image. If not provided, use the clipboard's content. options: -h, --help show this help message and exit --single Upload a single image instead of creating a multi-resolution stack. --name NAME Image name (required when uploading from clipboard). --skip-pngcrush Skip PNGCrush. --debug Enable debug logging. ``` ### Example output ``` INFO:root:Base image width: 2348px INFO:root:Resizing to: 480px INFO:root:Resizing to: 768px INFO:root:Resizing to: 1024px INFO:root:Resizing to: 1200px INFO:root:pngcrush reduced size from 76341 to 71599 bytes INFO:root:Uploading 30a2659cb4f9b6ac39c808c3312a3f89b71d040c_clock_480w.png (size: 71599, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 145632 to 134514 bytes INFO:root:Uploading acfb95102e353d67d0525e3a3d40fbe7f0ed638f_clock_768w.png (size: 134514, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 208771 to 188959 bytes INFO:root:Uploading 7b1b0435cd8de9318c301036853d5c0d190b155f_clock_1024w.png (size: 188959, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 254562 to 231188 bytes INFO:root:Uploading 51938f84bdb0df1baa1d72e09f2a1daac6e66d1c_clock_1200w.png (size: 231188, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 293024 to 265268 bytes INFO:root:Uploading 4040806d866f246eda1a1434f3a1ab083764eb56_clock_full.png (size: 265268, type: image/png, encoding: None) <picture> <source media="(max-width: 480px)" srcset="https://static.rerun.io/30a2659cb4f9b6ac39c808c3312a3f89b71d040c_clock_480w.png"> <source media="(max-width: 768px)" srcset="https://static.rerun.io/acfb95102e353d67d0525e3a3d40fbe7f0ed638f_clock_768w.png"> <source media="(max-width: 1024px)" srcset="https://static.rerun.io/7b1b0435cd8de9318c301036853d5c0d190b155f_clock_1024w.png"> <source media="(max-width: 1200px)" srcset="https://static.rerun.io/51938f84bdb0df1baa1d72e09f2a1daac6e66d1c_clock_1200w.png"> <img src="https://static.rerun.io/4040806d866f246eda1a1434f3a1ab083764eb56_clock_full.png" alt=""> </picture> ``` ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [ ] I've included a screenshot or gif (if applicable) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2411 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/479fa5f/docs Examples preview: https://rerun.io/preview/479fa5f/examples <!-- pr-link-docs:end -->
…py (#2411) ### What Create and upload multi-resolution stacks with `upload_image.py` Clock example screenshot updated as an example of the result obtained. Relates to #2273 TODO: - [x] pngcrush stuff? - [x] docs - [x] test with jpg as well ### Usage ```sh $ just upload --help python3 "scripts/upload_image.py" --help usage: upload_image.py [-h] [--single] [--name NAME] [--skip-pngcrush] [--debug] [path] Upload an image. positional arguments: path File path to the image. If not provided, use the clipboard's content. options: -h, --help show this help message and exit --single Upload a single image instead of creating a multi-resolution stack. --name NAME Image name (required when uploading from clipboard). --skip-pngcrush Skip PNGCrush. --debug Enable debug logging. ``` ### Example output ``` INFO:root:Base image width: 2348px INFO:root:Resizing to: 480px INFO:root:Resizing to: 768px INFO:root:Resizing to: 1024px INFO:root:Resizing to: 1200px INFO:root:pngcrush reduced size from 76341 to 71599 bytes INFO:root:Uploading 30a2659cb4f9b6ac39c808c3312a3f89b71d040c_clock_480w.png (size: 71599, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 145632 to 134514 bytes INFO:root:Uploading acfb95102e353d67d0525e3a3d40fbe7f0ed638f_clock_768w.png (size: 134514, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 208771 to 188959 bytes INFO:root:Uploading 7b1b0435cd8de9318c301036853d5c0d190b155f_clock_1024w.png (size: 188959, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 254562 to 231188 bytes INFO:root:Uploading 51938f84bdb0df1baa1d72e09f2a1daac6e66d1c_clock_1200w.png (size: 231188, type: image/png, encoding: None) INFO:root:pngcrush reduced size from 293024 to 265268 bytes INFO:root:Uploading 4040806d866f246eda1a1434f3a1ab083764eb56_clock_full.png (size: 265268, type: image/png, encoding: None) <picture> <source media="(max-width: 480px)" srcset="https://static.rerun.io/30a2659cb4f9b6ac39c808c3312a3f89b71d040c_clock_480w.png"> <source media="(max-width: 768px)" srcset="https://static.rerun.io/acfb95102e353d67d0525e3a3d40fbe7f0ed638f_clock_768w.png"> <source media="(max-width: 1024px)" srcset="https://static.rerun.io/7b1b0435cd8de9318c301036853d5c0d190b155f_clock_1024w.png"> <source media="(max-width: 1200px)" srcset="https://static.rerun.io/51938f84bdb0df1baa1d72e09f2a1daac6e66d1c_clock_1200w.png"> <img src="https://static.rerun.io/4040806d866f246eda1a1434f3a1ab083764eb56_clock_full.png" alt=""> </picture> ``` ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [ ] I've included a screenshot or gif (if applicable) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2411 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/479fa5f/docs Examples preview: https://rerun.io/preview/479fa5f/examples <!-- pr-link-docs:end -->
Closed by #2440 |
To improve the visual style and consistency of the examples page, all screenshots should follow the same style. More importantly this should also reduce the amount of decision making needed when adding screenshots.
My proposal:
Example:
TODO:
The text was updated successfully, but these errors were encountered: