Skip to content

Commit e160563

Browse files
committed
Merge branch 'main' of https://github.com/codesandbox/docs into PROD-293-drafts-docs
2 parents 8ecee59 + ad66ce9 commit e160563

File tree

83 files changed

+666
-1184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+666
-1184
lines changed

packages/projects-docs/next.config.js

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,64 @@ module.exports = withNextra({
583583
destination: "/learn/devboxes/overview",
584584
permanent: false,
585585
},
586+
/*
587+
Redirects for switch to vs code editor
588+
*/
589+
{
590+
source: "/learn/editors/web/overview",
591+
destination: "/learn/editors/web-interface",
592+
permanent: false,
593+
},
594+
{
595+
source: "/learn/editors/ios/overview",
596+
destination: "/learn/editors/overview",
597+
permanent: false,
598+
},
599+
{
600+
source: "/learn/editors/vscode/overview",
601+
destination: "/learn/editors/overview",
602+
permanent: false,
603+
},
604+
{
605+
source: "/learn/editors/ios/setting-up-ios",
606+
destination: "/learn/editors/overview",
607+
permanent: false,
608+
},
609+
{
610+
source: "/learn/editors/ios/shortcuts",
611+
destination: "/learn/editors/overview",
612+
permanent: false,
613+
},
614+
{
615+
source: "/learn/editors/vscode/overview",
616+
destination: "/learn/editors/overview",
617+
permanent: false,
618+
},
619+
{
620+
source: "/learn/editors/web/overview",
621+
destination: "/learn/editors/web-interface",
622+
permanent: false,
623+
},
624+
{
625+
source: "/learn/editors/web/commandpalette",
626+
destination: "/learn/editors/web-interface",
627+
permanent: false,
628+
},
629+
{
630+
source: "/learn/editors/web/shortcuts",
631+
destination: "/learn/editors/shortcuts",
632+
permanent: false,
633+
},
634+
{
635+
source: "/learn/editors/ios/setting-up-ios",
636+
destination: "/learn/editors/overview",
637+
permanent: false,
638+
},
639+
{
640+
source: "/learn/editors/themes",
641+
destination: "/learn/editors/overview",
642+
permanent: false,
643+
},
586644
];
587645
},
588646
});

packages/projects-docs/pages/faq.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ recommend using a [Devbox](/learn/devboxes/overview).
6868

6969
## Can I change the Node version used in a Devbox?
7070

71-
Yes, we have instructions [here](https://codesandbox.io/docs/learn/environment/vm#configuring-nodejs-version) that tell you how to change the Node version. All recent server sandboxes run in a Devbox.
71+
Yes, we have instructions on the [VM configuration](https://codesandbox.io/docs/learn/environment/vm#configuring-nodejs-version) page that tell you how to change the Node version. All recent server sandboxes run in a Devbox.
7272

7373
## How can I change the editor's theme?
7474

@@ -118,7 +118,7 @@ Yes, you can use multiple databases in the same project by running multiple Dock
118118

119119
### Can I use Docker Compose in CodeSandbox?
120120

121-
Yes, you can use Docker Compose in CodeSandbox to orchestrate multiple containers and define the relationships between them. However, you'll need to create a Docker Compose file and run the `docker-compose` command in the terminal to start the containers. We share more about this [here](https://codesandbox.io/docs/tutorial/getting-started-with-docker#4-create-docker-compose-file).
121+
Yes, you can use Docker Compose in CodeSandbox to orchestrate multiple containers and define the relationships between them. However, you'll need to create a Docker Compose file and run the `docker-compose` command in the terminal to start the containers. We share more about this [in our Docker tutorial](https://codesandbox.io/docs/tutorial/getting-started-with-docker#4-create-docker-compose-file).
122122

123123
### Is it safe to use a database in CodeSandbox with Docker support?
124124

@@ -268,9 +268,10 @@ The user will receive an email invitation and in-app notification asking them to
268268
You can leave or delete a workspace from the "Overview" tab of your [Workspace Settings](https://codesandbox.io/t/overview), by clicking on "Leave workspace", or "Delete workspace", respectively.
269269

270270
There are some cases where leaving a workspace is not permitted.
271-
1. You are the only workspace member with admin rights: Every workspace requires at least one admin member. Before you can leave the workspace, you must assign a new admin.
272271

273-
2. You are trying to leave the only workspace connected to your account: Every account must be associated with at least one workspace. If you want to leave the only workspace connected to your account, you may create a new workspace and then leave the workspace you want to be disassociated with. Alternatively, deleting your account will remove you from any workspaces that you are a member of.
272+
1. You are the only workspace member with admin rights: Every workspace requires at least one admin member. Before you can leave the workspace, you must assign a new admin.
273+
274+
2. You are trying to leave the only workspace connected to your account: Every account must be associated with at least one workspace. If you want to leave the only workspace connected to your account, you may create a new workspace and then leave the workspace you want to be disassociated with. Alternatively, deleting your account will remove you from any workspaces that you are a member of.
274275

275276
## How can I change my account's email address?
276277

@@ -343,8 +344,7 @@ If everything seems to be in order but you're still having issues with the payme
343344

344345
## Can I change my subscription?
345346

346-
Yes, you can upgrade or downgrade your plan at any time from the settings page.
347-
347+
Yes, you can upgrade or downgrade your plan at any time from the settings page.
348348

349349
## How can I add more credits?
350350

packages/projects-docs/pages/learn/_meta.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
22
"index": "Introduction",
33
"guides": "Getting Started",
4+
"editors": "Editors",
45
"-- cloud-development": {
56
"type": "separator",
67
"title": "Cloud Development"
78
},
89
"repositories": "Repositories",
910
"devboxes": "Devboxes",
10-
"editors": "Editors",
1111
"ai": "AI",
1212
"environment": "Environment",
1313
"integrations": "Integrations",

packages/projects-docs/pages/learn/ai/boxy.mdx

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,71 @@ description: Introduction to Boxy the AI-powered coding companion
55

66
import { Callout } from 'nextra-theme-docs'
77

8-
98
# Meet Boxy
109

11-
Boxy is an experimental AI-powered chat tool that is built directly into your editor. Boxy is aware of your code and can answer questions and make suggestions that consider best practices and conventions that are specific to your project.
10+
<Callout emoji="⚠️">Boxy will be deprecated on July 31, 2024.</Callout>
11+
12+
Boxy is an experimental AI-powered chat tool that is built directly into your editor. Boxy is aware of your code and can answer questions and make suggestions that consider best practices and conventions that are specific to your project.
1213

1314
![run project with boxy](../images/boxy-overview.jpg)
1415

1516
## Boxy in the Editor
16-
If you have granted AI permissions in the workspace settings. You will notice the newest addition to your team sitting next to your avatar.
1717

18-
![run project with boxy](../images/boxy-avatar.jpg)
18+
If you have granted AI permissions in the workspace settings. You will notice the newest addition to your team sitting next to your avatar.
19+
20+
![run project with boxy](../images/boxy-avatar.jpg)
1921

2022
The easiest way to work with Boxy is to select a piece of code and choose a saved prompt. When you select the code, you will see a toolbar hover above the top line of the selected code. From there, you can either open the DevTool to chat with Boxy or run a saved prompt.
2123

2224
![run project with boxy](../images/boxy-toolbar.jpg)
2325

24-
2526
- **Edit** shows prompts related to refactoring code.
2627
- **Ask** shows prompts related to chat actions.
2728
- The **AI icon** opens a chat DevTool.
2829

2930
### Command Palette
30-
Saved prompts are listed in the command palette. You can access them from the toolbar using `⌘ + ⇧ + H`.
31-
32-
From here, you can search for or select a prompt from the list. Alternatively, you can type a custom prompt, which Boxy will quickly respond to.
33-
31+
32+
Saved prompts are listed in the command palette. You can access them from the toolbar using `⌘ + ⇧ + H`.
33+
34+
From here, you can search for or select a prompt from the list. Alternatively, you can type a custom prompt, which Boxy will quickly respond to.
35+
3436
When you ask Boxy to perform an action like `Document Code` or `Improve Readability` and you have code selected in the editor, Boxy will make suggestions directly in the file.
3537

3638
If you ask Boxy to `Explain Code` or `Consider Security`, the chat DevTool will automatically open with Boxy's response.
37-
3839

3940
## Boxy Chat
41+
4042
Open a chat DevTool to have a conversation with Boxy. You can open a chat in two different ways:
43+
4144
- select the AI icon in the toolbar.
4245
- open a new DevTool and select `Chat with Boxy`.
4346

44-
You can have multiple chats open at the same time. If you need to change topics but don't want to lose your progress in your last conversation, simply select `+` in the input to create a new chat.
47+
You can have multiple chats open at the same time. If you need to change topics but don't want to lose your progress in your last conversation, simply select `+` in the input to create a new chat.
4548

4649
Below are a few tips and tricks that can help you make the most of your interactions with Boxy.
4750

4851
## Tips and Tricks
52+
4953
### Tips
54+
5055
**Keep chatting**
5156
Boxy remembers your previous conversations and takes them into account when providing responses. For example, if you have asked Boxy to include the file path for the suggested code repeatedly in the past, it will include it in future responses.
5257

5358
**Request response formats**
54-
Do you prefer that Boxy always provides suggestions in insertable snippets? Or do you prefer to see the code situated within the full file? Ask Boxy to `"always respond with ___"` to receive suggestions in the way you like.
59+
Do you prefer that Boxy always provides suggestions in insertable snippets? Or do you prefer to see the code situated within the full file? Ask Boxy to `"always respond with ___"` to receive suggestions in the way you like.
5560

5661
**When in doubt, provide more context**
5762
Boxy will give you what you ask for. They may make suggestions based on the way your frame your question. Boxy may have better responses when you ask them to consider specific files or libraries that may contain useful context for your question.
5863

5964
### Tricks
65+
6066
- use backticks for keywords or code segments
6167
- use "again" to repeat your last prompt
6268

6369
## Commit suggestions
70+
6471
Say goodbye to nondescriptive or confusing commit messages. When you enable AI to work on repositories, Boxy will automatically generate commit messages based on the files changed in your branch. You can easily edit or remove these suggestions according to your preference.
6572

73+
## Boxy for Sandboxes
74+
75+
Boxy is available only on repositories and Devboxes. If you want the support of Boxy in your Sandbox, you can easily [convert your Sandbox](/tutorial/convert-browser-sandbox-cloud) using the options in the toolbar.

packages/projects-docs/pages/learn/ai/faqs.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ Yes. Boxy is available in all plans.
2121

2222
No. Boxy is exclusively available in devboxes and repositories. However, you can easily [convert a Sandbox into a Devbox](/tutorial/convert-browser-sandbox-cloud) to get access to Boxy. This is available through the "Convert to Devbox" button at the top right of the Sandbox editor.
2323

24-
![Convert browser sandbox](../images/convert-sandbox-from-ai.png)
24+
![Convert Sandbox to Devbox](../images/convert-sandbox-to-devbox.jpg)

packages/projects-docs/pages/learn/ai/getting-started.mdx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,13 @@ description: Instructions for getting started with AI
44
---
55

66
# Getting Started
7-
All CodeSandbox AI tools are available for Pro users. To enable these features, admins need to grant permissions in the workspace settings.
8-
9-
![run project with boxy](../images/boxy-permission.jpg)
107

8+
All CodeSandbox AI tools are available to Free and Pro users. To enable these features, admins need to grant permissions in the [workspace settings](https://codesandbox.io/t/permissions).
119

10+
![AI Permissions](../images/ai-permissions.jpg)
1211

1312
Once you grant AI permissions, CodeSandbox will send information about the event to OpenAI for analysis. Under no circumstances will we send any event data to OpenAI without explicit instruction to do so. We will only share selected event data with OpenAI after you toggle on these permissions. OpenAI does not use the event data shared via this feature to train its AI models. To learn more about our privacy agreement with OpenAI, check out our [Privacy page](https://codesandbox.io/legal/privacy).
1413

1514
## Running AI
16-
Once permissions have been granted, you need to restart the VMs for the changes to take effect. You can do this by selecting `Restart Branch` in the main menu. If you are in a Devbox, the option will read `Restart Sandbox`.
17-
18-
## Boxy for Sandboxes
19-
Boxy is available only on repositories and Devboxes. If you want the support of Boxy in your Sandbox, you can easily [convert your sandbox](/tutorial/convert-browser-sandbox-cloud) using the options in the toolbar.
20-
21-
2215

16+
Once permissions have been granted, you need to restart the VMs for the changes to take effect. You can do this by selecting `Restart Branch` in the main menu. If you are in a Devbox, the option will read `Restart Sandbox`.
Lines changed: 14 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,30 @@
11
---
2-
title: DevTools - The Basics
3-
description:
2+
title: DevTools
3+
description: Learn how CodeSandbox DevTools work and how they can be useful to boost your productivity.
44
---
55

66
import { Callout } from 'nextra-theme-docs'
7-
import Video from '../../../../../shared-components/Video'
87

98
# DevTools
10-
11-
DevTools allow you to work faster and more efficiently. They are useful for debugging, testing, and developing. They are collaborative by default, allowing you to share their content: a terminal output, a preview error, a console log...
129

10+
The CodeSandbox DevTools panel aggregates a series of tools that allow you to work faster and more efficiently. Among these tools, you will find Previews, Tasks and Shared Terminals.
1311

14-
<Video src="../../devtools-management.mp4" />
15-
16-
Add as many DevTools as you want. Each one lives in its own tab and each tab can be moved around, reordered or dropped into another tab to split the view.
17-
18-
When a tab is closed, the layout will re-arrange to fill up all the available space. Your layout is persisted in the browser, so you will see the same DevTools when you come back later to your VM.
19-
20-
<Callout emoji="">
21-
Closing a DevTool will not stop it—it will keep running in the background. If you want to stop the process, you must select the option `Close and stop` from the dropdown menu `...`.
22-
</Callout>
12+
![CodeSandbox DevTools](../images/devtools.jpg)
2313

24-
## Open a DevTool
14+
## Previews
15+
Any [previews](./preview) associated with your project, namely those spun up by tasks, will be accessible in a port listed under `Previews` in the DevTools tab. Each preview will show a tag next to it to identify its associated task, or show `Unconfigured` if no task is tied to it.
2516

26-
There are three main ways to open a new DevTool:
17+
Clicking on a listed preview will open it on the right side of the editor.
2718

28-
1. Clicking on the `+` sign on the right side of any tabbed panel. This presents a list of available DevTools—and clicking on any DevTool will open it in the current tab.
29-
2. Double-clicking anywhere between the tabs and the `+` button.
30-
3. Pressing <kbd>Cmd/Ctrl</kbd> + <kbd>Shift</kbd> + <kbd>S</kbd>.
31-
32-
33-
## DevTools configuration
34-
35-
You can control the name and position of your DevTools, as well as define which DevTools run when you open the Web Editor. Check the [Tasks](./task) documentation for more information on how to configure the DevTools.
36-
37-
<Callout emoji="">
38-
Setting up the DevTools makes it easier for non-developers to access and run your project.
19+
<Callout emoji="💡">
20+
You can also see the list of ports in the terminal panel under the `Ports` tab at the bottom of the editor.
3921
</Callout>
4022

41-
## Available DevTools
42-
43-
- **[Preview](./preview)**
44-
- **[Task](./task)**
45-
- **[Terminal](./terminal)**
46-
- **VM resource usage**
47-
- **Debug ([Chrome DevTools](https://developer.chrome.com/docs/devtools/))**
23+
## Tasks
4824

49-
We are working on supporting other DevTools in the future, which may include:
25+
[Tasks](./task) set in the `tasks.json` file will be listed in the DevTools tab. This lists all the configured tasks and allow you to run, stop or restart them. Any tasks that are running will display a `Running...` tag next to them.
5026

51-
- Test runner UI
52-
- Viewing / editing [Design Tokens](https://css-tricks.com/what-are-design-tokens/) in a project
53-
- Viewing components in isolation and changing their props from a UI
54-
- [Postman](https://www.postman.com/) integration
55-
- Bundle size analyzer
27+
## Shared Terminals
28+
Any active shared terminals will be listed under `Shared Terminals` in the DevTools tab. These are a specific type of [terminal](./terminal) that is managed by Pitcher, which means that other users with access to the project can see them.
5629

57-
If you would like to collaborate on building a DevTool, please select 'something else' on our [support form](https://codesandbox.io/support) and get in touch!
30+
From this tab, you can also create new shared terminals, which will open in the Terminal tab at the bottom of the editor.

packages/projects-docs/pages/learn/devboxes/embedding.mdx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ website.
1616

1717
Embeds are now supported as a beta feature for Devboxes. There are a few distinctions between Sandbox and Devbox embeds worth noting. Devboxes have more computing power because they run in VMs. They also support any programming language, not just JavaScript. That said, Devbox embeds are currently limited in terms of interactions compared to Sandboxes, as explained further below.
1818

19-
### Embedding Devboxes
19+
### Embedding Devboxes
2020

2121
Devbox embeds are a great solution if you want to show examples of applications that go beyond front-end JavaScript (namely, Python, Go, Rust and more).
2222

@@ -32,11 +32,7 @@ You can generate a URL to embed by clicking the `Share` button inside the editor
3232

3333
This will give you HTML code with an iFrame that you can paste into your content.
3434

35-
![Devbox Embed](../images/embed-cloud-sandbox.jpg)
36-
37-
<Callout>
38-
MicroVM embeds are a feature of Devboxes. If you have an example from a repository you want to embed, you can import the repository as a [synced template](/learn/sandboxes/synced-templates), which allows you to access (and embed) the code as a Devbox.
39-
</Callout>
35+
![Devbox Embed](../images/embed-vs-code-web.jpg)
4036

4137
## Example Embed
4238

@@ -73,8 +69,9 @@ This code outputs the following embed:
7369
></iframe>
7470

7571
## Limitations
72+
7673
As Devbox embeds are in beta, some more advanced options are currently unavailable.
7774

78-
Notably, the embed viewer cannot make changes to the sandbox before forking it, so inline editing is not currently supported on these embeds.
75+
Notably, the embed viewer cannot make changes to the Devbox before forking it, so inline editing is not currently supported on these embeds.
7976

80-
Additionally, Devbox embeds still lack some of the customization options that are available in legacy sandbox embeds.
77+
Additionally, Devbox embeds still lack some of the customization options that are available in Sandbox embeds.

0 commit comments

Comments
 (0)