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

Allow to open project in VS Code or other editor from the preview #1561

Closed
JonnyBurger opened this issue Dec 12, 2022 · 17 comments
Closed

Allow to open project in VS Code or other editor from the preview #1561

JonnyBurger opened this issue Dec 12, 2022 · 17 comments

Comments

@JonnyBurger
Copy link
Member

Workflow:

I cd into a project, run npm start.
Then I realize I forgot to run code ., and I need to Ctrl+C, run it and then start the preview again.

Somewhere around here we could put a button "Open in VS Code", but of course it should be editor agnostic. The logic from the error overlay should be reused:

Screenshot 2022-12-12 at 09 17 44

@JonnyBurger
Copy link
Member Author

Better idea: Put it as another item in the File menu, then it can also be invoked using Cmd+K!

@MehmetAdemi
Copy link
Member

/bounty 100

@algora-io
Copy link

algora-io bot commented Dec 12, 2022

💎 $100.00 bounty created by MehmetAdemi
👉 To solve this bounty, join Algora and reply here with /solution <PR_NUMBER> (e.g. /solution 42)
📝 To receive payouts, you will complete a one-time step with Stripe Connect
💵 Payment arrives in your account 2-5 days after the bounty is rewarded
💯 You keep 100% of the bounty award
🙏 Thank you for contributing to remotion-dev!

@mykeels
Copy link
Contributor

mykeels commented Dec 12, 2022

How can an "Open in VS Code" button be editor-agnostic? Does it let you open in any editor of your choice? Perhaps, a link to the error overlay logic will help?

@MehmetAdemi
Copy link
Member

Hi @mykeels, this was just an example. The button doesn't have to be "Open in VS Code" but more like "Open in IDE". It should let you open in any editor of your choice 👍🏼. Yes, a link like that would help. 👍🏼
It's much appreciated that you want to tackle this issue! Nevertheless, we are still trying out the bounty platform Algora this month. Since you already contributed once, we would look for another contributor if you don't mind. I would suggest if there isn't anyone willing to tackle this issue by Wednesday, you are free to go ahead and solve it. Is this OK?

@mykeels
Copy link
Contributor

mykeels commented Dec 12, 2022

Sounds great!

@RohovDmytro
Copy link

I made a shallow search.

I'm not planning to proceed further. It should be easy to open a specific file, not sure about opening a specific folder.

@orimdominic
Copy link
Contributor

I've started working on this

@MehmetAdemi
Copy link
Member

@RohovDmytro Thanks for the input!
@orimdominic Let's go! 🚀

@uditkumar01
Copy link

Instead of showing a button, we can ask user to open the project in their preferred code editor, such as Visual Studio Code when the npm start command runs. This approach is much simpler and have a similar implementation here.

what do you think 🤔 ?

@orimdominic
Copy link
Contributor

I think that @uditkumar01 has a point.
If the button is on the UI, how many times would the user need to use it? Once the editor is opened, they will have no need to click on the button again.

@JonnyBurger
Copy link
Member Author

We already ask the user after they have initialized the project if they want to open it in their editor.
So this flow is intended for the all the times after the initialization of the project.

Allowing to do it via CLI is also a good idea, but it should never block the start of the preview server.
For simplicity, I suggest that we simply add a menu item that opens the folder in the users favorite editor from the preview.

This should be simple, as this functionality has already been implemented in the error overlay: https://github.com/remotion-dev/remotion/blob/a255b47c0daa632e4fbb49675853dff618a42788/packages/cli/src/preview-server/error-overlay/remotion-overlay/OpenInEditor.tsx

@MehmetAdemi
Copy link
Member

/solution 1569

@algora-io
Copy link

algora-io bot commented Dec 15, 2022

👉 @orimdominic Complete your account setup and reply here again with /solution <PR_NUMBER> (e.g. /solution 42)

@orimdominic
Copy link
Contributor

/solution 1569

@algora-io
Copy link

algora-io bot commented Dec 16, 2022

💡 Solution posted: #1569
👉 @MehmetAdemi To reward this solution, complete your payment on Algora

@algora-io
Copy link

algora-io bot commented Dec 16, 2022

🎉🎈 @orimdominic has been awarded $100.00! 🎈🎊

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

No branches or pull requests

6 participants