Skip to content

Commit 8170d7f

Browse files
authored
copy all guest docs on signup (#357)
* copy all guest docs on signup * fix console errors * fix * fix * fix * remove markdown export * change ci order * fix test * fix test? * fix test * docs fixes * fix tests * fix test? * startscreen changes
1 parent 633d895 commit 8170d7f

27 files changed

+368
-239
lines changed

.github/workflows/build.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,6 @@ jobs:
116116
env:
117117
CI: true
118118

119-
- name: Install Playwright
120-
run: npx playwright install --with-deps
121-
# if: steps.playwright-cache.outputs.cache-hit != 'true'
122-
# env:
123-
# PLAYWRIGHT_BROWSERS_PATH: 0 # https://github.com/microsoft/playwright/blob/main/docs/src/ci.md#caching-browsers
124-
125119
- name: Start HocusPocus server
126120
run: RUNNER_TRACKING_ID="" && npm run start:server &
127121
env:
@@ -132,7 +126,13 @@ jobs:
132126
env:
133127
CI: true
134128

135-
# Actually build and run react code and run tests against that
129+
- name: Install Playwright
130+
run: npx playwright install --with-deps
131+
# if: steps.playwright-cache.outputs.cache-hit != 'true'
132+
# env:
133+
# PLAYWRIGHT_BROWSERS_PATH: 0 # https://github.com/microsoft/playwright/blob/main/docs/src/ci.md#caching-browsers
134+
135+
# Actually build and run react code and run playwright tests against that
136136
- name: Build and run preview
137137
# Wait on config file needed for vite dev server: https://github.com/jeffbski/wait-on/issues/78
138138
run: npm run start:preview & npx wait-on http://localhost:4173 -c ./packages/editor/wait-on.conf.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ We've written about the main functionality of TypeCell in the [manual](https://w
5353

5454
Another good way to learn is to check out some notebooks from our community:
5555

56-
» [View demo notebooks](/docs/demos.md)
56+
» [View demo notebooks](/docs/Demos.md)
5757

5858
# Feedback 🙋‍♂️🙋‍♀️
5959

packages/editor/public/_docs/interactive-introduction.md renamed to packages/editor/public/_docs/Live coding tutorial.md

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
# Introduction to TypeCell
1+
# TypeCell Live Coding tutorial
22

3-
Welcome to TypeCell. A TypeCell document is a live, interactive programming environment for Javascript / Typescript
3+
TypeCell documents contain a live, interactive programming environment for Javascript / Typescript
44
running in your browser.
55

6-
In this introduction, we will go through the basics of using TypeCell.
6+
In this introduction, we will go through the basics of coding in TypeCell.
7+
8+
__This document is completely editable. Follow the steps below!__
79

810
## Cats
911

@@ -56,10 +58,12 @@ export default (
5658
);
5759
```
5860

59-
Uh oh, what's this? I forgot to add a cell defining our friend. Can you do it for me?
61+
Uh oh, what's this? I forgot to add a code block defining a friend for our cat. Can you do it for me?
62+
63+
Add a code block by clicking on the + next to a block when hovering it (or type "/"), and select "code block".
6064

61-
A cell is a container for code & output. To add one, click on the + above or below another cell.
62-
You can do it wherever you like.
65+
_**Hint:** Our friend only needs a name for now. Use the same structure as you already
66+
used for your cat (first code block), but only include the "name" field and export it as the variable named "friend"._
6367

6468
```typescript
6569
// @default-collapsed
@@ -74,17 +78,16 @@ export default (
7478
);
7579
```
7680

77-
<small><strong>Hint:</strong> Our friend only needs a name for now. Use the same structure as you already
78-
used for your cat, but only include the `name` field.</small>
7981

80-
Notice how we use `$.friend.name` in the cell above. Whenever you `export` a variable, you can access it across
81-
the document by using the `$` symbol. In other words, `$` is a store for all variables that you want
82+
83+
Notice how we use _$.friend.name_ in the cell above. Whenever you _export_ a variable, you can access it across
84+
the document by using the _$_ symbol. In other words, _$_ is a store for all variables that you want
8285
to access across cells! Exported variables are also displayed below the cell.
8386

8487
Code cells automatically run when:
8588

8689
- You change the code of a cell
87-
- Any of the reactive variables the cell references (from `$`) are changed
90+
- Any of the reactive variables the cell references (from _$_) are changed
8891

8992
## Feeding neighbors
9093

@@ -172,16 +175,17 @@ export default (
172175
);
173176
```
174177

175-
We have now stored the number of dry & wet food required (we exported variables `dryFoodToPrepare` and `wetFoodToPrepare`).
178+
We have now stored the number of dry & wet food required (we exported variables "dryFoodToPrepare" and "wetFoodToPrepare").
176179
We also visualize them nicely with a friendly message and emojis using React & JSX.
177-
See the default `export` at the end of the cell above.
180+
See the default "export" at the end of the cell above.
178181

179-
<small>React? JSX? What's this now? React is a Javascript framework that's used
182+
_React? JSX? What's this now? React is a Javascript framework that's used
180183
to create user interfaces. We won't go too in depth on it here, but you can
181-
check out the documentation at https://reactjs.org/docs/getting-started.html.
184+
check out the documentation at https://reactjs.org/docs/getting-started.html._
182185

183-
JSX is part of React, and makes it easy to create type-safe HTML elements. In TypeCell, just `export` JSX elements to create user interfaces or visualize data in your notebook.</small>
186+
_JSX is part of React, and makes it easy to create type-safe HTML elements. In TypeCell, just "export" JSX elements to create user interfaces or visualize data in your notebook._
184187

188+
### Input fields
185189
Next, we'll create some user input fields to indicate how much food we have prepared.
186190
The built-in TypeCell Input library makes this easy:
187191

@@ -293,22 +297,25 @@ export default (
293297
);
294298
```
295299

296-
<strong>Go ahead, play with the inputs above to adjust how much food to prepare!</strong>
300+
**Go ahead, play with the inputs above to adjust how much food to prepare!**
297301

298302
These are just 2 of the many input types that TypeCell supports. To see the
299303
other choices, make sure to try the TypeCell inputs tutorial.
300304

301-
_<strong>Tip:</strong> expand the 3 cells above to see how they work._
305+
_**Tip:** expand the 3 cells above to see how they work._
302306

303307
## Final notes
304308

305-
We hope this introduction has given you a sense of how TypeCell and reactive notebooks work.
309+
We hope this introduction has given you a sense of how TypeCell interactive documents work.
306310

307311
The live feedback and Reactive programming model should be pretty powerful.
308-
There are a lot more features to discover, for example,
309-
did you know you can import any NPM package you like, or even compose different notebooks?
310-
Try creating your own notebook to give it a try, or have a look at the other examples.
312+
313+
There are a lot more features to discover. For example,
314+
did you know you can import any NPM package you like, or even compose different documents?
315+
316+
Try signup up and create your own documents to give it a try, or have a look at the other examples.
311317

312318
**Have fun using TypeCell!**
313319

314-
<small>This tutorial is inspired by [pluto.jl](https://github.com/fonsp/Pluto.jl), thanks Fons & Nicholas!</small>
320+
321+
_This tutorial is inspired by [pluto.jl](https://github.com/fonsp/Pluto.jl), thanks Fons & Nicholas!_

packages/editor/public/_docs/README.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
# Welcome to TypeCell
22

3-
Hi there 👋 ! Welcome to the community preview of TypeCell, an experimental _live notebook programming_ environment for the web.
3+
Hi there 👋 ! Welcome to the community preview of TypeCell, an open source platform for _live_, _interactive_ documents.
4+
5+
A TypeCell document (like the one you're looking at!) is similar to a document in _Notion_ or _Google Docs_. Go ahead and try editing this page.
6+
7+
However, TypeCell comes with a _Live Programming Environment_, that makes it possible to create your own blocks and build rich, interactive documents:
8+
9+
```typescript
10+
export default (
11+
<div>
12+
<em>Hello from React!</em>
13+
</div>
14+
);
15+
```
416

517
This guide should help you to get started, and learn more about the ins & outs.
618

719
## Tutorial
820

9-
Complete the tutorial to get familiar with TypeCell:
21+
Complete the tutorial to get familiar with programming in TypeCell:
1022

11-
» [Interactive introduction](/docs/interactive-introduction.md)
23+
- [TypeCell live coding tutorial](/docs/Live%20coding%20tutorial.md)
1224

1325
## Reference manual
1426

@@ -25,7 +37,7 @@ We've written about the main functionality of TypeCell in the [manual](/docs/man
2537

2638
Another good way to learn is to check out some notebooks from our community:
2739

28-
» [View demo notebooks](/docs/demos.md)
40+
- [View demo notebooks](/docs/Demos.md)
2941

3042
# Feedback ❤️
3143

packages/editor/public/_docs/demos.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ To showcase some of TypeCell's features, explore these demos from our community:
1111

1212
## Built something exciting?
1313

14-
Let us know [on discord](https://discord.gg/TcJ9TRC3SV) or [Matrix](https://matrix.to/#/#typecell-space:matrix.org) if you'd like to feature your own demo on this page!
14+
Let us know [on discord](https://discord.gg/TcJ9TRC3SV) if you'd like to feature your own demo on this page!
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
{
22
"title": "Docs",
33
"items": [
4-
"demos.md",
5-
"interactive-introduction.md",
4+
"Demos.md",
5+
"Live coding tutorial.md",
66
"manual/1. Notebooks and cells.md",
77
"manual/2. TypeScript and exports.md",
88
"manual/3. Reactive variables.md",
99
"manual/4. Inputs.md",
1010
"manual/5. Imports and NPM.md",
11-
"manual/6. Collaboration.md",
1211
"README.md"
1312
]
1413
}
Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1-
# Notebooks and Cells
1+
# Blocks and code blocks
22

3-
The page you're looking at is called a _notebook_.
4-
It's basically an interactive document that mixes _code_ and _text_ (documentation).
3+
The page you're looking at is an interactive document that mixes _code_ and _text_. A document consists of different blocks, highlighted when you hover over them. TypeCell supports all kind of blocks, like _headings_, _paragraphs_, _lists_, or more advanced _code blocks_.
54

6-
## Creating and reordering cells
5+
## Creating and reordering Blocks
76

8-
When you hover over a cell, click the `+` sign to insert a new cell above or below.
7+
When you hover over a block, click the `+` sign to insert a new block. You can also type "/" anywhere to open the slash-menu that allows you to add a new block.
98

10-
To reorder a cell, hover next to it (try it out on the left of this text), and simply drag and drop the cell.
9+
To reorder a block, hover next to it (try it out on the left of this text), and simply drag and drop the block via the drag handle (⋮⋮).
1110

12-
To view the source code of a cell, hover over the cell and click the caret <svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 16 16" class="notebookCell-sideIcon" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Show / hide code</title><path fill-rule="evenodd" clip-rule="evenodd" d="M10.072 8.024L5.715 3.667l.618-.62L11 7.716v.618L6.333 13l-.618-.619 4.357-4.357z"></path></svg> on the top left.
13-
You'll notice the text you're reading now is written in Markdown.
11+
## Code blocks
1412

15-
## Cell types
16-
17-
TypeCell currently supports a number of languages. You can view / change the language of a cell in the bottom-right of the cell's editor.
18-
19-
### Markdown
20-
21-
Useful for writing text / documentation. Markdown cells are collapsed by default (code cells are expanded by default).
13+
TypeCell Code Blocks currently supports Typescript and CSS. You can view / change the language of a code block in the bottom-right of the code block editor.
2214

2315
### CSS
2416

25-
Use CSS to easily style the output of other cells (those written in Markdown or TypeScript).
17+
Use CSS to easily style the output of other code blocks (those written in Markdown or TypeScript).
2618

2719
```css
2820
.redText {
@@ -32,16 +24,18 @@ Use CSS to easily style the output of other cells (those written in Markdown or
3224

3325
```typescript
3426
export default (
35-
<div className="redText">This text is red, styled by the CSS cell above.</div>
27+
<div className="redText">
28+
This text is red, styled by the CSS code block above.
29+
</div>
3630
);
37-
````
31+
```
3832

3933
### TypeScript / JavaScript
4034

4135
```typescript
42-
export let message = "This is a TypeScript cell";
36+
export let message = "This is a TypeScript code block";
4337
```
4438

45-
TypeScript cells execute automatically as you type. Try editing the `message` above.
39+
TypeScript code blocks execute automatically as you type. Try editing the `message` above.
4640

47-
You've learned the basics! Continue to learn more about writing code using TypeScript cells.
41+
You've learned the basics! Continue to learn more about writing code using TypeScript code blocks.

packages/editor/public/_docs/manual/2. TypeScript and exports.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
# TypeScript and exports
22

3-
TypeScript cells are the main way to write code in TypeCell.
3+
TypeScript code blocks are the main way to write code in TypeCell.
44

55
You'll get all the benefits of the [Monaco Editor](https://microsoft.github.io/monaco-editor/) while writing code, the same editor that powers VS Code!
66

7-
Note that TypeScript code still executes, even if there are type errors.
7+
## Plain JavaScript
8+
9+
Note that TypeScript code always executes, even if there are type errors.
810
This allows you to quickly write and test code, but still get hints about possible bugs.
911

10-
<small>Note that this means that any <strong>JavaScript</strong> code works in TypeCell as well (i.e.: you don't <em>need</em> to type everything if you don't want to).</small>
12+
_This means that any **plain JavaScript** code works in TypeCell as well (you're not forced add types for everything)._
1113

12-
In the example below, you'll notice that we get an error because we assign a `number` to a `string` variable, but the code still executes regardless.
14+
In the example below, you'll notice that we get an error because we assign a "number" to a "string" variable, but the code still executes regardless.
1315

1416
```typescript
1517
export let message = "hello";
@@ -18,7 +20,7 @@ message = 4;
1820

1921
## Exports
2022

21-
You can export variables from your code, and they'll show up as _output_ of the cell. Above, we've exported a single `message` variable.
23+
You can export variables from your code, and they'll show up as _output_ of the cell. Above, we've exported a single "message" variable.
2224

2325
You can also export multiple variables from a cell, and the _inspector_ will help you to view the output:
2426

@@ -54,7 +56,7 @@ export let reactElement = (
5456
5557
## The `default` export
5658
57-
You use a `default` export to indicate which variable should be displayed in the output.
59+
You use a "default" export to indicate which variable should be displayed in the output.
5860
5961
The following cell exports 2 variables, but only one is displayed in the output:
6062
@@ -64,8 +66,8 @@ export let myNum = 42;
6466
export default <div>The number is: {myNum}</div>;
6567
```
6668
67-
Now you might ask; what's the use of exporting `myNum` if you don't see it in the output?
69+
Now you might ask; what's the use of exporting "myNum" if you don't see it in the output?
6870
69-
This is because exported variables can be reused across cells and notebooks; one of most powerful features of TypeCell!
71+
This is because exported variables can be reused across blocks and documents; one of most powerful features of TypeCell!
7072
7173
Continue to learn more about exported variables and Reactivity.
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
# Reactive variables
22

3-
This is where things get interesting! Your code can reference variables exported by other cells.
3+
This is where things get interesting! Your code can reference variables exported by other blocks.
44

5-
Code cells in TypeCell (re)evaluate when:
5+
Code blocks in TypeCell (re)evaluate when:
66

77
- The code of the cell changes (i.e.: you're editing the code)
8-
- A variable the cell depends upon updates
8+
- A variable the block depends upon updates
99

1010
## The `$` variable
1111

12-
Exports of cells are available under the `$` variable. Have a look at the example below, and change the `name` variable to your own name. Notice how the greeting in the cell below updates automatically.
12+
Exports of cells are available under the "$" variable. Have a look at the example below, and change the "name" variable to your own name. Notice how the greeting in the cell below updates automatically.
1313

1414
```typescript
1515
export let name = "Anonymous coder";
@@ -23,8 +23,8 @@ export let greeting = (
2323
);
2424
```
2525

26-
<small>Tip: type `$.` in a TypeScript cell, and the editor (Intellisense) will display a list of all exported variables you can reference.</small>
26+
_Tip: type "$." in a TypeScript cell, and the editor (Intellisense) will display a list of all exported variables you can reference._
2727

2828
## Interactive Tutorial
2929

30-
The Reactive model of TypeCell is quite powerful. If you haven't already, follow the [interactive introduction](/docs/interactive-introduction.md) or have a look at the [demos](/docs/demos.md) to get some hands-on experience.
30+
The Reactive model of TypeCell is quite powerful. If you haven't already, follow the [live coding tutorial](/docs/Live%20coding%20tutorial.md) or have a look at the [demos](/docs/Demos.md) to get some hands-on experience.

packages/editor/public/_docs/manual/4. Inputs.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Working with user inputs
22

3-
In your notebook, you'll often want the viewer to be able to control input variables, without changing code.
3+
In your interactive document, you'll often want the viewer to be able to control input variables, without changing code.
44

55
Of course, you can create input elements using HTML / React. For example, like this:
66

@@ -130,7 +130,7 @@ export default $.select;
130130

131131
### Numbers & Ranges
132132

133-
You can user *number* and *range* input types to allow the user to enter numbers. Make sure to explicitly pass `<number>` to guide the type system that the edited variable is a number.
133+
You can user *number* and *range* input types to allow the user to enter numbers. Make sure to explicitly pass "<number>" to guide the type system that the edited variable is a number.
134134

135135

136136
```typescript

0 commit comments

Comments
 (0)