Skip to content

Add option to use floating windows for model previews on macOS #19

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ccampbell
Copy link

Hi there. I have been exploring different options for using code to generate 3D models, and so far I am really enjoying ShapeScript. As a macOS and iPad user it seems to fit naturally into my workflow. So far this is the only feature I felt was missing since I don’t like to use spaces or split screen or anything else.

This adds a Float Window option to the View menu to allow a model window to float over other applications on macOS. This allows you to keep the preview open to the side of the document in your text editor to see changes in real time.

I couldn’t decide if this should go in the View menu or the Window menu, but I chose View since that is where all the other view specific options are. Happy to change it if you feel strongly. Let me know if there is anything I am missing here.

I am also working on a grammar for Sublime Text that is coming along pretty nicely and supports jumping to symbols as well. Here is a video of the floating window behavior in action:

shapescript-floating.mp4

@ccampbell ccampbell changed the title Add option to use floating windows for model previews Add option to use floating windows for model previews on macOS Apr 28, 2025
This adds a `Float Window` option to the `View` menu to allow a model
window to float over other applications on macOS. This allows you to
keep the preview open to the side of the document in your text editor to
see changes in real time.
@nicklockwood
Copy link
Owner

Great idea!

Although I wonder if it would work better as a persistent "preview" window that always shows the most recently edited file rather than a per-window setting? (Similar to how Deckset's preview works)

@nicklockwood
Copy link
Owner

so far I am really enjoying ShapeScript

I'm so glad to hear that ☺️ I'd love to hear about what you're using it for or to see any examples of what you've made! Let me know if you have any other feature requests or suggestions.

@ccampbell
Copy link
Author

Although I wonder if it would work better as a persistent "preview" window that always shows the most recently edited file rather than a per-window setting?

Hmm that is a good point. I did notice one issue which is that if you enable tabs within the same window, the floating setting doesn’t stick if you change tabs so at the very least I think that should be fixed although not sure the best way to handle that (maybe an argument to move it under the Window menu 😕). Your idea would kind of solve that problem too. That said, it still requires that you open each .shape file up front, I think?

Also, I think it could get a little messy with imports. For example if you change a file that is imported into multiple files or imported into files that are imported into other files, how do you know which one to display in the preview? I suppose it would have to be the last file saved that imports that file, but then the logic starts to get pretty complex since you have to track the full import tree to do it properly. The per window setting is at least simple to implement, easy to understand as a user, and doesn’t require tracking any really complicated state 😅.

I'd love to hear about what you're using it for or to see any examples of what you've made!

Just simple things for now. I’m new to 3D design and had been using tinkercad, but I am trying out different things as a next step. I’m currently attempting to port a design I made there over. I can share more later. Also will definitely let you know if I have other feature requests.

Copy link

codecov bot commented May 25, 2025

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

Thanks for integrating Codecov - We've got you covered ☂️

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.

2 participants