collaboration Drawing app
 
 
 
Go to file
Steve Ruiz e3cf05f408
Add playwright tests (#1484)
This PR replaces our webdriver end to end tests with playwright tests.

It:
- replaces our webdriver workflow with a new e2e workflow based on
playwright
- removes the webdriver project
- adds e2e tests to our examples app
- replaces all `data-wd` attributes with `data-testid`

### Coverage

Most of the tests from our previous e2e tests are reproduced here,
though there are some related to our gestures that will need to be done
in a different way—or not at all. I've also added a handful of new
tests, too.

### Where are they

The tests are now part of our examples app rather than being in its own
different app. This should help us test our different examples too. As
far as I can tell there are no downsides here in terms of the regular
developer experience, though they might complicate any CodeSandbox
projects that are hooked into the examples app.

### Change Type

- [x] `tests` — Changes to any testing-related code only (will not
publish a new version)
2023-05-30 15:28:56 +01:00
.github
.husky
.yarn
apps
assets
config
packages
scripts
.eslintignore
.eslintplugin.js
.eslintrc.js
.gitignore
.ignore
.prettierignore
.prettierrc
.yarnrc.yml
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
lazy.config.ts
lerna.json
package.json
public-yarn.lock

README.md

tldraw

tldraw

Welcome to the public monorepo for tldraw.

What is tldraw?

tldraw is a collaborative digital whiteboard available at tldraw.com. Its editor, user interface, and other underlying libraries are open source and available in this repository. They are also distributed on npm. You can use tldraw to create a drop-in whiteboard for your product or as the foundation on which to build your own inifinite canvas applications.

Learn more at tldraw.dev.

Note This repo contains source code for the current version of tldraw. You can find the source for the original version here.

Installation & Usage

To learn more about using tldraw in your React application, follow our guide here or see this StackBlitz.

import { Tldraw } from '@tldraw/tldraw'
import '@tldraw/tldraw/editor.css'
import '@tldraw/tldraw/ui.css'

function TldrawExample() {
	return <Tldraw />
}

Local development

To run the local development server, first clone this repo.

Install dependencies:

yarn

Start the local development server:

yarn dev

Open the example project at localhost:5420.

Examples

Our development server contains several examples that demonstrates different ways that you can customize tldraw or use its APIs. Each example is found in the apps/examples/src folder.

  • eg: localhost:5420 for the basic example.
  • eg: localhost:5420/api for the API example.

To learn more about using tldraw, visit our docs.

About this repository

Top-level layout

This repository's contents is divided across four primary sections:

  • /apps contains the source for our applications
  • /packages contains the source for our public packages
  • /scripts contains scripts used for building and publishing
  • /assets contains icons and translations relied on by the app

Applications

Packages

  • editor: the tldraw editor
  • ui: the editor's user interface
  • tldraw: the main tldraw package containing both the editor and the UI
  • primitives: low-level primitives for working with vectors and geometry
  • tlschema: shape definitions and migrations
  • tlsync-client: a library for (locally) syncronizing editor instances
  • tlstore: an in-memory reactive database
  • tlvalidate: a validation library used for run-time validation
  • tlassets: a library for working with tldraw's fonts and translations
  • file-format: a library for working with tldraw's .tldr file format
  • utils: low-level data utilities shared by other libraries

Community

Have questions, comments or feedback? Join our discord or start a discussion.

Distributions

You can find tldraw on npm here.

License

The source code for various apps and packages in this repository (as well as our 2.0+ distributions and releases) are currently licensed under Apache-2.0. These licenses are subject to change in our upcoming 2.0 release. If you are planning to use tldraw in a commercial product, please reach out at hello@tldraw.com.

Contribution

Please see our contributing guide. Found a bug? Please submit an issue.

Note: we are currently unable to accept contributions on the @tldraw/tldraw or @tldraw/editor packages while we work out our final licensing.

Contact

Find us on Twitter at @tldraw or email hello@tldraw.com. You can also join our discord for quick help and support.