Skip to content
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

Screenshot of examples folder #4391

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kler
Copy link

@kler kler commented Feb 26, 2025

This PR contains a simple Python script which will launch each example (that contains a main.py) and take a screenshot of the page. In this way it's a little bit easier to grasp the example.

Screenshots (for examples that worked out of the box) are also added in this PR in a separate commit.

@kler kler marked this pull request as ready for review February 26, 2025 21:08
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this pull request, @kler!

Adding screenshots certainly helps to get an idea of an example before running it. We have some concerns though:

So I propose the following plan:

  • Regenerate screenshots manually to better fit the UI content.
    We can use test_startup.sh to launch (almost) all examples automatically.

  • Add a README.md to every example folder, including at least

    If there is already a readme file, the first line after the title should contain the short description. The remaining content can remain unchanged.

  • Update examples.py to automatically load data from the examples folder, fetching title and description from the readme files.

  • Improve the example tiles on the main page to somehow include screenshots. Popups might be a good start.

What do you think? Would you like to tackle some of these tasks?
If this isn't what you anticipated and you just wanted to add some PNGs, I would understand completely. Then I can try to look into it myself when I find some time.

Important: When working on repetitive changes to so many files, it's always a good idea to start with a few examples and discuss the resulting code and UX before doing the rest. This avoids doing the work multiple times.

@falkoschindler falkoschindler added the documentation Improvements or additions to documentation label Mar 11, 2025
@kler
Copy link
Author

kler commented Mar 11, 2025

I think you're suggestions are excellent, I agree fully.
However I wasn't planning to put in that amount of work in the project as of now.

This was more of a half-ass effort in making the existing examples a little bit easier to grasp 😃
If you want to disregard this PR I understand.

A suggestion to anyone that would implement this feature would be to create a separate md (called screenshot.md or similar) exclusively for the screenshot, and then linking to this md inside the README.md, to avoid fiddling with the "main" README content.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants