Wykres commitów

2653 Commity (76949b62bd9ccf70d85add2e0e1e3e6971bbc711)

Autor SHA1 Wiadomość Data
Mime Čuvalo 51f9e630ac
docs: disable ai search for now (#2740)
### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

### Release Notes

- Docs: disable AI search for now.
2024-02-06 11:50:11 +00:00
Mime Čuvalo d47152d864
seo: attempt at avoiding a "soft 404" with there being thin content on dotcom (#2737)
### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Add a "Loading..." text to help SEO.
2024-02-06 11:38:59 +00:00
Mime Čuvalo b50cda0a6e
docs: add full-text search (#2735)
### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Make sure search (AI and regular) still works as expected.

### Release Notes

- Docs: Add full-text search.
2024-02-06 09:49:31 +00:00
Steve Ruiz 538734782c
[docs] Autocomplete styling tweaks (#2732)
This PR tweaks the styling in the autocomplete. It removes icons and
matches styles to the sidebar. It improves the mobile design to hide the
search bar on mobile.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know
2024-02-05 20:46:07 +00:00
Dan Groshev e6e4e7f6cb
[dx] use Biome instead of Prettier, part 2 (#2731)
Biome seems to be MUCH faster than Prettier. Unfortunately, it
introduces some formatting changes around the ternary operator, so we
have to update files in the repo. To make revert easier if we need it,
the change is split into two PRs. This PR introduces a Biome CI check
and reformats all files accordingly.

## Change Type
- [x] `minor` — New feature
2024-02-05 17:54:02 +00:00
Dan Groshev 826433751c
[dx] use Biome instead of Prettier, part 1 (#2729)
Biome seems to be MUCH faster than Prettier. Unfortunately, it
introduces some formatting changes around the ternary operator, so we
have to update files in the repo. To make revert easier if we need it,
the change is split into two PRs. This PR has only config/package
changes and is expected to fail the CI.

## Change Type
- [x] `minor` — New feature
2024-02-05 17:41:42 +00:00
Steve Ruiz b379a7a47c
[dotcom] `TLSyncRoom` tidy (#2712)
I went through the sync room code today while thinking about syncing. As
I worked through it, I added some comments etc for my own readability.
There is no change in how the code works.

There are a few functions declared in the body of `handlePushRequest`.
We might want to re-arrange things so that we're not re-declaring those
on each push (there are a LOT of pushes, basically every mouse move from
every client). I did try that but reverted that change; it feels like a
proper solution would be bigger than what I wanted to do here.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-02-05 17:25:07 +00:00
Mime Čuvalo 47f428eb6f
docs: fix CORS issue and broken example link (#2727)
### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

### Release Notes

- Fixes docs CORS issue.
2024-02-05 14:52:05 +00:00
Steve Ruiz dc92e2c61f
[docs] Fix links, little style tweaks (#2724)
This PR is a small but mighty improvement to our docs.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

---------

Co-authored-by: Mime Čuvalo <mimecuvalo@gmail.com>
2024-02-05 14:42:55 +00:00
Mime Čuvalo 157d24db73
docs: rework search UI (#2723)
Reworks search to not be a page and instead to be inline dropdown.

<img width="763" alt="Screenshot 2024-02-05 at 13 22 58"
src="https://github.com/tldraw/tldraw/assets/469604/4e5a8076-62cd-44bb-b8e7-7f5ecdc4af24">


- rework search completely
- rm Search Results css
- uses Ariakit and add appropriate hooks / styling
- I couldn't use Radix unfortunately since they're still working on
adding a Combox: https://github.com/radix-ui/primitives/issues/1342
- I'm open to other suggestions but Ariakit plays nicely with Radix and
keeps things open to migrate to Radix in the future
- fixes bug with not scrolling to right place when having a direct link
- adds categories in the search results - examples / reference / learn
- and adds category icons. Let me know if there's a better policy for
adding new SVG icons cc @steveruizok

### Change Type

- [x] `minor` — New feature

### Test Plan

1. Test searches using normal method for each type (examples, docs,
refs)
2. Test searches using AI for each type (ditto)

### Release Notes

- Docs: rework the search to be an inline dropdown.
2024-02-05 14:32:50 +00:00
Steve Ruiz 591d3129c7
[fix] VSCode keyboard shortcuts while editing text (#2721)
This PR fixes a bug where keyboard shortcuts weren't working in the vs
code extension. We had taken some extra steps early on to prevent kbds
from running while an input was focused, but we've since solved this bug
in the kbd logic itself.

Closes #2717 

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Using the vs code extension, edit text and then use keyboard
shortcuts, e.g. for select all or copy / paste
2. Confirm that regular tldraw shortcuts don't fire when editing text

### Release Notes

- Fixed a bug in the VS Code that prevented keyboard shortcuts from
working in text labels.
2024-02-04 12:55:15 +00:00
Steve Ruiz 647d03a173
[Fix] Camera coordinate issues (#2719)
This PR fixes some bugs related to our coordinate systems. These bugs
would appear when the editor was not full screen.

![Kapture 2024-02-04 at 11 53
37](https://github.com/tldraw/tldraw/assets/23072548/9c2199f3-b34d-4fe1-a3e5-d0c65fe5a11e)

In short, we were being inconsistent with whether the
`currentScreenPoint` was relative to the top left corner of the
component or the top left corner of the page that contained the
component.

Here's the actual system:

<img width="898" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/c49b3686-aeb6-4164-a55d-8639d40290a1">

The `viewportPageBounds` describes the bounds of the component within
the browser's space. Its `x` and `y` describe the delta in browser space
between the top left corner of the **page** and the component. This is
not effected by scrolling.

The use's `screenPoint` describes the user's cursor's location relative
to the `viewportPageBounds`. Its `x` and `y` describe the delta in
browser space between the top left corner of the **component** and the
cursor.

While this is a bug fix, I'm marking it as major as apps may be
depending on the previous (broken) behavior.

### Change Type

- [x] `major` — Breaking change

### Test Plan

1. Zoom in, out, and pinch on an editor that isn't full screen.
2. Zoom in, out, and pinch on an editor that is full screen.
3. Drag and scroll on an editor that isn't full screen.
4. Drag and scroll on an editor that is full screen.

- [x] Unit Tests

### Release Notes

- Fixed bugs with `getViewportScreenCenter` that could effect zooming
and pinching on editors that aren't full screen
2024-02-04 12:03:49 +00:00
Steve Ruiz dee5d2928c
Bump jest to fix weird prettier bug (#2716)
Our snapshot tests have been acting strange. It turned out that there's
a change in prettier that is incompatible with prettier's inline
snapshots.

This PR:
- updates jest to a compatible alpha
- updates dependencies

### Change Type

- [x] `tests` — Changes to any test code only[^2]

### Test Plan

- [x] Unit Tests
2024-02-04 11:19:47 +00:00
Steve Ruiz d3a6d91217
[fix] Debug panel text overflow (#2715)
This PR prevents text overflow on the debug panel.

### Change Type

- [x] `patch` — Bug fix
2024-02-04 09:46:16 +00:00
Steve Ruiz 2fd6f254c8
Examples tweaks (#2681)
### Change Type

- [x] `documentation` — Changes to the documentation only[^2]
2024-02-02 17:36:30 +00:00
Steve Ruiz 53698bed70
[Docs] Tweak sidebar titles (#2706)
This PR adjusts the way that sidebar titles look.

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]
2024-02-01 18:16:30 +00:00
Rokixy b76d7b3db1
fix(docs): fix user-interface.mdx (#2700)
### Change Type

- [x] `documentation` — Changes to the documentation only

### Release Notes

Add `newMenuItem` creation in "Toolbar and Menus" example

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-02-01 15:08:39 +00:00
Steve Ruiz 3b286e10c4
[dx] add gen docs to gitignore (#2704)
This PR ignores generated markdown files.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-02-01 15:06:37 +00:00
Mime Čuvalo 63e3d6dfc9
docs: more cleanup following restructure (#2702)
- add TOC for Reference section
- make external links use _blank to open a new tab
- fix some more /gen links spots I missed, oops
- add a general redirect from old /gen links → /reference
- some more stylistic touchups

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

### Release Notes

- Docs: further cleanup following restructure.
2024-02-01 14:16:17 +00:00
Dan Groshev 279abff228
return 404 on missing docs content instead of 500 (#2699)
### Change Type
- [x] `internal` — Any other changes that don't affect the published
package
2024-02-01 11:48:07 +00:00
Dan Groshev d0f6ef80fc
Update the project to Node 20 (#2691)
### Change Type
- [x] `internal` — Any other changes that don't affect the published
package
2024-01-31 16:53:40 +00:00
alex 9ca5d5f22d
fix prune preview deployment script (#2698)
The script that prunes old preview deployments in cloudlfare was broken
when we moved dotcom into the public repo. This fixes it.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-01-31 16:37:51 +00:00
alex 45c8777ea0
reactive context menu overrides (#2697)
Previously, we were calling context menu `overrides` in a `useMemo`, so
they weren't updating reactively in the way that most of our other
schema overrides do. This diff calls `override` in a `useValue` instead
so it updates reactively.

It also fixes some issues with testing the `<Tldraw />` component:
currently we get a lot of errors in the console about updates not being
wrapped in `act`. These are caused by the fill patterns at different
zoom levels popping in without us waiting for them. Now, we have a
helper for rendering the tldraw component that waits for this correctly
and stops the error.

### Change Type

- [x] `patch` — Bug fix

### Test Plan


- [x] Unit Tests


### Release Notes

- Context Menu overrides will now update reactively
2024-01-31 16:35:49 +00:00
Steve Ruiz d31fecd3d5
[Fix] Note shape border radius (#2696)
This PR fixes a border radius on the note shape.

Before
<img width="382" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/5cb95dbd-c935-4f1f-901c-eca294836c96">

After
<img width="436" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/0cce7ccf-2f7b-40dd-a27c-08c251cb4715">


### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Fixes a bad border radius
2024-01-31 14:04:24 +00:00
Steve Ruiz cbc0649047
[Examples] Add a stupid 404 page (#2694)
Use a 404 Page.

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]
2024-01-31 13:30:38 +00:00
Mime Čuvalo 34a95b2ec8
arrows: separate out handle behavior from labels (#2621)
This is a followup on the arrows work.
- allow labels to go to the ends if no arrowhead is present
- avoid using / overloading TLHandle and use a new PointingLabel state
to specifically address label movement
- removes the feature flag to launch this feature!

### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Arrow labels: provide more polish on label placement

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-31 11:17:03 +00:00
Dan Groshev f87702bda4
fix sub-project vercel configs (#2687)
We need vercel rewrites to work so that examples can be directly linked
to (because right now they are using client-side routing).

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
2024-01-31 10:11:56 +00:00
Mime Čuvalo 92b16f6310
docs: fix up gen links to point to the new /reference section (#2690)
### Change Type

- [x] `patch` — Bug fix

### Release Notes

- Fix up doc links with /gen links
2024-01-30 15:16:32 +00:00
Dan Groshev b4c7a3e54b
remove dotcom's vercel.json (#2689)
It is not used anymore

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
2024-01-30 14:55:49 +00:00
Mime Čuvalo 3ae48af67c
docs: rework docs site to have different sections (#2686)
This PR starts putting in place the high-level changes we want to make
to the docs site.
- It makes separate sections for Reference and Examples and Community.
- Gets rid of the secondary sidebar and integrates it into the main
sidebar.
- Groups the reference articles by type.
- Pulls in the examples alongside code and a live playground so people
don't have to visit examples.tldraw.com separately.

<img width="1458" alt="Screenshot 2024-01-30 at 09 43 46"
src="https://github.com/tldraw/tldraw/assets/469604/4f5aa339-3a69-4d9b-9b9f-dfdddea623e8">

Again, this is the top-level changes and there's more to be done for the
next PR(s):
  - create quick start page
  - clean up installation page
  - add accordion to Examples page prbly
  - put fun stuff in header (from footer)
  - landing page
  - something for landing page of API
  - search cmd-k and border
  - cleanup _sidebarReferenceContentLinks
  - external links _blank
  - address potential skew issue with code examples
  - have a link to other examples (next.js, etc.)

### Change Type

- [x] `documentation` — Changes to the documentation only[^2]

### Test Plan

1. Make sure examples work!

### Release Notes

- Rework our docs site to pull together the examples app and reference
section more cohesively.

---------

Co-authored-by: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
Co-authored-by: Mitja Bezenšek <mitja.bezensek@gmail.com>
Co-authored-by: alex <alex@dytry.ch>
Co-authored-by: Lu Wilson <l2wilson94@gmail.com>
Co-authored-by: Dan Groshev <git@dgroshev.com>
2024-01-30 14:19:25 +00:00
Dan Groshev a43b172b64
make CI check for yarn install warnings and fix the peer deps ones we have (#2683)
- [x] `internal` — Any other changes that don't affect the published
package
2024-01-30 11:41:46 +00:00
Mitja Bezenšek 7ac003cc05
Fix svg exporting for images with not fully qualified url (`/tldraw.png` or `./tldraw.png`) (#2676)
Local images (like in our Local images example) could not be exported as
svg. We need to base64 encode them, but our check only matched images
with a `http` prefix, which local images like `/tldraw.png` don't have.

Fixes an issue reported here

https://discord.com/channels/859816885297741824/1198343938155745280/1198343938155745280

### Change Type

- [x] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Use our Local images example.
2. Export as svg.
3. The export should correctly show the image.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Fix the svg export for images that have a local url.

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-30 10:11:10 +00:00
Dan Groshev 6fe829f990
check for duplicate dependencies in CI (#2682)
Run `yarn dedup` check on CI to catch unnecessary deps

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package
2024-01-29 20:42:06 +00:00
Taha a51ffb9544
Remove examples app landing page (#2678)
This PR removes the examples app landing page, the home route now shows
the basic example.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version


### Release Notes

- Remove examples app landing page
2024-01-29 15:27:15 +00:00
Mime Čuvalo 23f60ee98e
dev: add test-dev command for easier testing of packages (#2627)
@si14 you might know a better way to wire this up! lemme know if there's
something more clever here.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]

### Release Notes

- Adds easier testing command for individual packages.
2024-01-29 10:29:38 +00:00
Mime Čuvalo d82344bf15
debug: start adding more tooling for debugging when interacting with shapes (#2560)
I borrowed `useTick` from `GeometryDebuggingView.tsx` — didn't see a
good place to have that in a shared file somewhere but lemme know if
there is ¯\_(ツ)_/¯


https://github.com/tldraw/tldraw/assets/469604/89ae4bb1-0680-4275-8e34-ead7c0cd091e


### Change Type

- [ ] `patch` — Bug fix
- [x] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan


- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Adds more information in the debug view about what shape is selected
and coordinates.
2024-01-29 10:29:28 +00:00
Taha f25f92a46d
Grouping examples into categories (#2585)
This PR adds collapsible groups to the examples app.

it's not finished, but I'd like a review before continuing as I've made
a few decisions I'd like feedback on. I'd like to make a separate issue
for abstracting the accordion component, as I wasn't sure how I would do
it and I thought it would be best to prioritise the functionality first.
Especially considering there are more pressing issues to be getting on
with.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Add collapsible categories to the examples app

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-29 10:04:41 +00:00
Dan Groshev 3a3248a636
Introduce a Cloudflare health worker (#2499)
This PR introduces a new Cloudflare worker for health checks.

At the moment the worker only translates Updown webhooks into Discord
webhooks. In the future we can teach this worker to check more things.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-29 09:47:50 +00:00
Steve Ruiz a1e242ae3a
[DX] Use tabs in JSON.stringify (#2674)
Occasionally the auto-built items, such as Sections.json, will be
flagged as having changes in a commit. This is because we generate that
file using spaces but our formatting uses tabs.

This PR changes all JSON.stringify({}, null, 2) to JSON.stringify({},
null, '\t'). Problem solved!

### Change Type

- [x] `patch` — Bug fix
2024-01-28 21:13:47 +00:00
Steve Ruiz a716ac36f6
[dx] Add docs to lazy caching. (#2672)
Previously, our docs site would always get rebuilt. Now it'll be
slightly smarter with lazy.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-01-28 14:19:19 +00:00
Steve Ruiz 8b73e77ec2
[Improvement] Text measurement tweaks (#2670)
This PR duplicates a template node rather than creating a new node each
time or querying for a selector. Functions clean up the node that is
created.

### Change Type

- [x] `patch`
2024-01-28 11:39:11 +00:00
Steve Ruiz 2610790873
[Fix] Overlapping non-adjacent handles (#2663)
In a previous PR, we improved logic for skipping virtual handles if a
handle's neighbor is too close to it. This PR improves this logic
further by testing against all other vertex handles, not just the
neighbors; and skipping tests against handles that are not vertices
(such as arrow text labels).

This PR also:
- removes some static cursors from `useCursors`
- adds a tiny bit of hover to text labels to differentiate them when
hovered

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Create an arrow with a text label
2. Select the arrow
3. The arrow's middle handle should be selectable and in front of the
text label

### Release Notes

- Fixed a bug with virtual / create handle visibility.
2024-01-27 15:01:18 +00:00
Steve Ruiz ef1f331e1f
[Fix] Missing bend handles on curved arrows (#2661)
Fixes #2660.

<img width="629" alt="image"
src="https://github.com/tldraw/tldraw/assets/23072548/a661b76c-4877-42b1-aca7-5e5fcc5bc44b">

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. Create a handle with a lot of bend but with a start and end handle
that are close together. The bend handle should still be visible.

### Release Notes

- Fixed a bug where the bend handle on arrows with a large curve could
sometimes be hidden.
2024-01-27 12:33:27 +00:00
Mitja Bezenšek 3f453569f6
Improved duplication (#2480)
Improves duplication. It will now remember the offset and shapes of your
`alt + drag` duplication and use that if you use the duplicate action
immediately after this.


![duplicate](https://github.com/tldraw/tldraw/assets/2523721/6fbfd455-d179-4eae-8aba-399b0781f633)

Fixes https://github.com/tldraw/tldraw/issues/2264

### Change Type

- [ ] `patch` — Bug fix
- [x] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [ ] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Test Plan

1. Add a step-by-step description of how to test your PR here.
2.

- [ ] Unit Tests
- [ ] End to end tests

### Release Notes

- Add a brief release note for your PR here.

---------

Co-authored-by: Taha <98838967+Taha-Hassan-Git@users.noreply.github.com>
Co-authored-by: David Sheldrick <d.j.sheldrick@gmail.com>
Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-26 14:54:52 +00:00
alex c3ae981c2d
Positional keyboard shortcuts for toolbar (#2409)
Adds positional keyboard shortcuts to the toolbar. Use the 1, 2, 3, 4
etc keys to activate the corresponding tool on the toolbar.

![Kapture 2024-01-05 at 11 52
30](https://github.com/tldraw/tldraw/assets/1489520/82a21436-0f04-465d-9351-3f2768f61f55)


### Change Type
- [x] `minor` — New feature

### Test Plan

1. Use the number keys to activate toolbar items.
- [x] End to end tests

### Release Notes

- You can now use the number keys to select the corresponding tool from
the toolbar

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-26 14:49:21 +00:00
Taha 234ac05d10
Add button to Examples to request an example (#2597)
This PR adds an issue template to request an example on the repo. And
adds a button to the examples app to request an example.

I've added a blue background to the view code button to distinguish it
from the request example. I think it makes the most sense as our primary
button for the page.

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Add a button to request an example to the examples app

---------

Co-authored-by: Steve Ruiz <steveruizok@gmail.com>
2024-01-26 14:44:19 +00:00
Taha 9a986ff05e
Update README and examples copy in the docs (#2594)
This PR should make the examples page copy clearer:

1. Moved the examples app copy above the framework specific and yjs
copy, as it's more likely to be what the user is looking for.
2. Moved the codesandbox below the copy, user no longer needs to scroll
to see most of the text.
3. Gives more hints about what can be found in the examples app and also
highlights that running it locally is the better experience.
4. Added some clarification on the relationship between the
framework-specific examples/yjs example and the examples app
5. Updates the tldraw repo README accordingly.
6. Removes (development) from the Basic example.

Next steps:
- The codesandbox
   - quite noisy, would be good to hide the navigation
   - doesn't reliably show the code and implementation at the same time
   - Should stack vertically on small screens

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Update examples copy and tldraw README
2024-01-26 14:00:51 +00:00
a22albjo 611592a191
Remove repeated word in CONTRIBUTING.md (#2651)
Remove duplicate usage of the word "create" in CONTRIBUTING.md. from:
"to create create an issue" 
to:
"to create an issue"

### Change Type

- [ ] `patch` — Bug fix
- [ ] `minor` — New feature
- [ ] `major` — Breaking change
- [ ] `dependencies` — Changes to package dependencies[^1]
- [x] `documentation` — Changes to the documentation only[^2]
- [ ] `tests` — Changes to any test code only[^2]
- [ ] `internal` — Any other changes that don't affect the published
package[^2]
- [ ] I don't know

[^1]: publishes a `patch` release, for devDependencies use `internal`
[^2]: will not publish a new version

### Release Notes

- Remove repeated word in CONTRIBUTING.md.
2024-01-26 14:00:23 +00:00
Steve Ruiz 6960acc559
[Fix] Wheel bug (#2657)
This PR fixes a bug in the wheel event that added the container offset
to the pointer location.

![Kapture 2024-01-26 at 13 54
20](https://github.com/tldraw/tldraw/assets/23072548/20cdc0ed-4a43-4b11-9261-9e6aecfd3292)

### Change Type

- [x] `patch` — Bug fix

### Test Plan

1. start dragging
2. use the mousewheel / trackpad to move the camera

### Release Notes

- Fixed a bug with the mouse wheel effecting the pointer location when
the editor was not full screen
2024-01-26 14:00:10 +00:00
Steve Ruiz 0d2fa6ae24
Restore vercel.jsons (#2650)
This PR restores the vercel.json files in the examples/dotcom
directories.

### Change Type

- [x] `internal` — Any other changes that don't affect the published
package[^2]
2024-01-25 23:24:22 +00:00