Github action CI workflows added for webdriver tests.
I've also refactored the `./scripts/e2e-*` scripts. These scripts were
somewhat unique compared to the other scripts. They are now more inline
with the other scripts in that directory and run via
```
% yarn e2e --help
Usage: yarn e2e <command> [options]
Commands:
yarn e2e serve start test server
yarn e2e test:ci [env] runner for CI (github-actions)
yarn e2e test:local run webdriver tests locally
yarn e2e test:browserstack run webdriver tests on browserstack
yarn e2e selenium:grid start selenium grid (test linux)
Options:
--help Show help [boolean]
--version Show version number [boolean]
```
I've also added an experimental linux runner see
2cca4ddb77/e2e/README.md (L320-L333)
### Change Type
- [x] `tests` — Changes to any testing-related code only (will not
publish a new version)
### Release Notes
- Github action CI workflows added for webdriver tests
- Refactored e2e test runner
Adds webdriver tests for testing from a users perspective via browser
actions. We currently support local test runners for a bunch of actions
on desktop `chrome`/`firefox`/`edge`/`safari` on macos.
We also have a browserstack runner which we'll enable in another PR.
### Release Note
- Adds initial webdriver tests
This PR adds
- A new `TLInstancePresence` record type, to collect info about the
presence state in a particular instance of the editor. This will
eventually be used to sync presence data instead of sending
instance-only state across the wire.
- **Record Scopes**
`RecordType` now has a `scope` property which can be one of three
things:
- `document`: the record belongs to the document and should be synced
and persisted freely. Currently: `TLDocument`, `TLPage`, `TLShape`, and
`TLAsset`
- `instance`: the record belongs to a single instance of the store and
should not be synced at all. It should not be persisted directly in most
cases, but rather compiled into a kind of 'instance configuration' to
store alongside the local document data so that when reopening the
associated document it can remember some of the previous instance state.
Currently: `TLInstance`, `TLInstancePageState`, `TLCamera`, `TLUser`,
`TLUserDocument`, `TLUserPresence`
- `presence`: the record belongs to a single instance of the store and
should not be persisted, but may be synced using the special presence
sync protocol. Currently just `TLInstancePresence`
This sets us up for the following changes, which are gonna be pretty
high-impact in terms of integrating tldraw into existing systems:
- Removing `instanceId` as a config option. Each instance gets a
randomly generated ID.
- We'd replace it with an `instanceConfig` option that has stuff like
selectedIds, camera positions, and so on. Then it's up to library users
to get and reinstate the instance config at persistence boundaries.
- Removing `userId` as config option, and removing the `TLUser` type
altogether.
- We might need to revisit when doing auth-enabled features like locking
shapes, but I suspect that will be separate.
* Add custom package without @babel dependencies
The @ggallon/prettier-plugin-sort-imports@^3.4.2-canary.0" have only peer dependencies
* Update .prettierignore
* Update prettier to latest
* Add format command
* Create .prettierignore
* Add prettier plugin sort imports
* Update prettier config
* Update prettier config
* Update .prettierignore
* Fix @babel/parser conflict
https://github.com/trivago/prettier-plugin-sort-imports/issues/156
* Revert "Update .prettierignore"
This reverts commit 282e5b838376f16b3df7f4c1f99f1106baaffea4.
* Revert change for apps/www/pages/v/[id].tsx
* Sort imports
Moves the third party imports to the top, "~" imports in middle, and "./" at last
* Sorting of the specifiers
in an import declarations
* [www] use path vs "../"
* [core] use path "~" vs "../"
* [tldraw] use path "~" vs "../.../"
* [tldraw] use path "~" vs "../"
* [tldraw] Cleanup
* Update prettier config
* Last use path "~" vs "../.../"
* [www] Fix order of the third party imports
* Clean prettier config
* Edit Farsi translations (#788)
* Add a Ukrainian translation (#786)
* Add a Ukrainian translation
* Clarify some strings in the Ukrainian translation
* feat: change dock position (#774)
* feat: change dock position
* fix grid row and column
* add top position
* fix responsive for the top position
* change content side
* fix overflowing menu
* [improvement] theme on body (#790)
* Update Tldraw.tsx
* Add theme on body, adjust dark page options dialog
* fix test
* Preparing for global integration (#775)
* Update translations.ts
* Create en.json
* Make main translation default
* Remove unused locale property of translation
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Fix language menu
* Update ar.json (#793)
* feature/add Hebrew translations (#792)
* hebrew translations
* pr fixes
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* fix toolspanel item position (#791)
* fix toolspanel item position
* add translation
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Add remote caching
* Adds link to translation guide (#794)
Co-authored-by: Baahar Ebrahimi <108254874+Baahaarmast@users.noreply.github.com>
Co-authored-by: walking-octopus <46994949+walking-octopus@users.noreply.github.com>
Co-authored-by: Judicael <46365844+judicaelandria@users.noreply.github.com>
Co-authored-by: Ali Alhaidary <75235623+ali-alhaidary@users.noreply.github.com>
Co-authored-by: gadi246 <gadi246@gmail.com>
* feat: add translation
* modal, left menu translation
* primary tools translation
* render with intl provider for testing
restore file
* french translation done
* context menu translation and test
* added italian
* Add menu to select language
* translation for the word language
* bump dev deps
Bump react on www
* Fix types
* update dependencies
* pre-release
* Delete lask.config.json
Co-authored-by: Enrico <franciscono.enry@gmail.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* local images
use assets for local copy
add menu options
* clean up packages
* cleanup unused content, move file handling into app.paste
* Add tldraw-assets.json to other files.
* add path to editor
* Update build.mjs
* add export to server example with link to gist
* Fix onAssetCreate and onAssetDelete APIs
* Update yarn.lock
* fix bugs on paste, adjust api for getting images, fix readonly on cut, copy, paste
* re-enable swc
* paste svg strings as svg images
* cleanup
* fix string case for tldraw json
* fix for undo button on menu open
* Change toggle to set, add option for keyboard events
* Update .gitignore
* Update .gitignore
* Remove isStyleOpen
* Remove isStyleOpen
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Initial commit with mobx
* Convert more to mobx
* Make useCameraCss reactive (autorun)
* Move more items to mobx
* Fix more invalid components and layout hooks that needed to be reactive
* Add autorun to css layout effect
* Remove centric specific yarn.lock changes
* mild cleanup
* update from main
* add tests, example
* cleanup
* minor tweak to advanced example
* Update app.tsx
* Optimizations around events not being memoized
* Support className property on SVGContainer
* Add data-type to shape container to aid with external styling
* Fix classnames
* Fixes bug on text shapes / shapes with refs
* v1.1.9-beta.1
* v1.1.9-beta.2
* Drop mobx as a dependency for core
* v1.1.9-beta.3
* rename
* Revert "Drop mobx as a dependency for core"
This reverts commit 2d93f84a87f0c709e55fb2766519bfde03f8e854.
* remove unused code from utils, move curve to separate package
* v1.1.9-beta.4
* Add pretty-quick
* Update package.json
* Renamings
Co-authored-by: Noah Shipley <nshipley@centricsoftware.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Changed Wardlt use back to Tldraw. Added some VS Code marketplace categories
* Missed removing one Wardlt mention
* Initial support for esbuild based vscode extension workflow.
* Hacky start of vs code extension build script
* Fixed categories of extension
* Added script for generating VS Code extension installer
* Temp fix for file format change affecting VS Code extension
* Temp fix for file format change issue
* Cleanup, prevent changes from saving pagestates
* Remove logic around saving pageState
* standardize capitalization
* v0.1.8
* Edit readme, scripts
* Update .eslintignore
* v0.1.9
* v0.1.10
* cleans up build scripts, adds publishing notes
* Added VS Code extension implementation references links. start:vscode now auto opens the extension folder in VS Code
* Removed step from VS Code README to manually open the extensions folder
* Removed file
* v0.1.11
* v0.1.12
* Fix empty file
* v0.1.13
* README cleanup
* v0.1.14
* Update TLDrawEditorProvider.ts
* v0.1.15
* Fix types for file extension (sort of) build script for extension
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Start of vscode extension. Current code is copy/paste from custom editor samples from Microsoft. We need to evaluate if using their text based customer editor or full on new custom editor is the way to go
* Not sure how I missed these files. Adding them
* Have a custom editor triggering off of .tldr files. Added gitignores for generated folder. Have iframed tldraw loading and security policies set to do so
* Can now load a .tldr file. No saving support yet. Load times are slow, mostly from editor loading up I think
* Have temporary solution for saving working now too.
* Missed af ile
* Backing up progress in syncing tldraw editor history changes
* Removed console
* ...
* ...
* Cleanup
* Have save working well now.
* Moved extension into 'integrations' folder
* Trying out WebviewPanelOptions.retainContextWhenHidden=true and it's looking promising
* Some cleanup
* Trying out new @tldraw/editor module
* Have prototype loading using new embedded editor
* ...
* Shaved off 1 second from editor loadtime
* Got save working again. Had to manually fixuppreviously created .tldr files as the format changed a bit
* More tuning
* Starting work to get new tldraw/tldraw working.
* Added example tldr files to vscode package
* Removed old editor package
* Have onChange working with latest fix. Back to iframed for a few mom
* Fixed up .tldr files
* Have iframe free extension working, but requiring hand crafted building
* ...
* Better handling of empty .tldr files. Still an issue with freshly created files trying to save as .js or .json
* Thoroughly added comments for the extension code. Need to add diagrams though and now will document/comment/diagram the editor src code
* Added comments to all of the editor side of the VS Code Extension. Also cleaned up the code
* More cleanup of VS Code Extension code and have script automating generating the initial webview's html content from the cra editor static build
* Tweaks to watch logic
* Improved scripts for publishing to VS Code Marketplace
* Improved name
* Made the smiley angry
* Reverted
* Turned smiley mad
* Turned smiley mad
* Made smiley sad
* Have a lot of plumbing working for Github codespaces and github.dev support
* Imported new tldraw vs code extension code. Added instructions for workflows
* Quick fix
* Fix for corrupted arrows files
* Updated editor build step to new location
* Merge branch 'main' into vscode-extension-v1, add local file updating
* Update App.tsx
* Cleanup, bumped to 0.0.124 @tldraw/tdlraw and published a 0.10.0 version of hte extension
* Added Trello/Kanban style file
* Finished video
* brings up to date
* Fix scripts
* Update README.md
* Update .babelrc
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
* Refactor www/styles to Stitches Core
* Update package.json
* Begin refactor of `tldraw`
* More refactoring
* A bit more
* little bit more
* Update yarn.lock
* Drops React dependencies to 16.8
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
This reverts commit da0f8df4d7.
Revert "Update package.json"
This reverts commit 522f87c833.
Revert "removes custom document"
This reverts commit 00d9146895.
Revert "Remove a dep that may have been causing issues"
This reverts commit 69462632a5.
Revert "Update index.tsx"
This reverts commit d05807bbfb.
Revert "Adds manifest"
This reverts commit 1c30552643.