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

Home page touch-ups #2135

Merged
merged 25 commits into from May 23, 2024
Merged

Home page touch-ups #2135

merged 25 commits into from May 23, 2024

Conversation

franknoirot
Copy link
Collaborator

@franknoirot franknoirot commented Apr 17, 2024

Start of an implementation toward #2133. Dialed back this to not include the screenshot functionality so we could land the PR sooner rather than later. However, I'm going to keep this in draft form until we have a "zoom to fit" endpoint in the engine, and then use the take_snapshot modeling command to get a much more consistent snapshot.

Another design dilemma I'm in is how to capture new snapshots from the home page. I want to make this more robust, so that when either:

  1. the app.theme setting is changed
  2. a project does not yet have a thumbnail
    the card is put into a loading state and a new image is captured without leaving the home page

Demo with current limitations

Screenshare.-.2024-04-16.8_19_51.PM-compressed.mp4

Copy link

vercel bot commented Apr 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview May 23, 2024 2:29pm

@franknoirot franknoirot marked this pull request as draft April 17, 2024 00:21
@franknoirot
Copy link
Collaborator Author

Some open questions:

  1. How do we take snapshots from the home page?
  2. Is there a different method other than saving a frame from the stream that allows me to have a transparent background to these images?
  3. Do we want users to be able to self-author their file thumbnails via a menu?
  4. How would that self-authorship work with default thumbnail capture behavior?

@Irev-Dev
Copy link
Collaborator

we can definitely store the camera position, which will go more neatly into the project.toml than an actually image would.

And take_snapshot is the endpoint used for taking a snapshot (websocket endpoint), pretty sure that's the same thing the cli uses, so you could try that instead when the user leaves to get something transparent. Updating all of the snapshots everytime the user changes the theme sounds messy to me.

Getting snap shots for projects the user hasn't open 🤷 not sure hey.

@Irev-Dev
Copy link
Collaborator

image

image

@franknoirot
Copy link
Collaborator Author

we can definitely store the camera position, which will go more neatly into the project.toml than an actually image would.

Sorry I used imprecise language in the video, I meant just save the path to the image in project.toml. But that should just be a constant anyway.

I like the idea of using take_snapshot to take a PNG, and setting the camera's position for the project thumbnail in project.toml. If they haven't manually Set project thumbnail we have some sensible camera default camera position, and regardless we always call zoom_to_fit to get the whole geometry in view once that's available.

@franknoirot franknoirot marked this pull request as ready for review May 22, 2024 22:59
@franknoirot franknoirot changed the title Save last video frame as project image, load them on Home page Home page touch-ups May 23, 2024
@franknoirot
Copy link
Collaborator Author

This PR resolves #2337

@franknoirot franknoirot linked an issue May 23, 2024 that may be closed by this pull request
@franknoirot franknoirot merged commit 023ed1a into main May 23, 2024
15 of 16 checks passed
@franknoirot franknoirot deleted the franknoirot/project-images branch May 23, 2024 15:47
@franknoirot franknoirot mentioned this pull request May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Put "New Project" at the Top of File Menu
3 participants