Commit Graph

1785 Commits

Author SHA1 Message Date
Christopher Chedeau
a7bd21ccf2 Avoid broadcasting what was just received (#1116)
Fixes #1115

The issue is that replaceAllElements calls a render synchronously, preventing lastBroadcastedOrReceivedSceneVersion from being set correctly.

I tried using batchUpdate but it only takes a single argument ( c5d2fc7127/packages/react-reconciler/src/ReactFiberWorkLoop.js (L1088) ) whereas the callback takes two.

Test Plan:
- Add a console.log before `this.broadcastScene("SCENE_UPDATE");` in App.tsx
- Connect a bunch of clients
- Have one move a shape
- Make sure that this client has the console logged
- Make sure the other clients don't have it
2020-03-28 21:25:40 -07:00
Sanghyeon Lee
763735ac84 Add SCENE_INIT broadcast type for new user (#1095) 2020-03-28 19:35:56 -07:00
Christopher Chedeau
8e6d55cf75 Fix corner resize for multi-point arrows (#1105)
The logic to support it was not implemented. This is not the prettiest way to solve it in the world but it does work. Some more refactoring here is probably warranted.

Fixes #1039
2020-03-28 18:08:21 -07:00
Christopher Chedeau
24fa657093 Don't reset cache while zooming using a gesture (#1103)
* Don't reset cache while zooming using a gesture

This reuses the cached canvas while the gesture is happening. Once it has stop updating, then recompute the cache with the proper zoom.

This should massively improve performance when panning on big scenes on mobile

Fixes #1056

* update snapshot tests
2020-03-28 16:59:36 -07:00
Kent Beck
95eaadeb85 Refactor paste code (#1102) 2020-03-28 15:43:09 -07:00
Christopher Chedeau
6056170d4b Fix wysiwyg center (#1101)
This wasn't taking into account zoom properly.

The logic should probably get refactored a bit, it's not ideal that we're passing canvas, state and scale as different arguments. Also it's weird that the function that returns the center is computing the viewport translation. But I'm not motivated enough to fix it right now...

Fixes #1100
2020-03-28 14:30:41 -07:00
Kent Beck
aa54364bd6 Use existing helper to copy all state (#1098) 2020-03-27 15:18:14 -07:00
Lipis
2a373571f8 Change order of the fill options (#1097) 2020-03-27 19:38:03 +02:00
Lipis
90c83927ad New Crowdin translations (#1089) 2020-03-27 14:12:27 +02:00
David Luzar
cac2dda5ac Add loading state (#1027)
* add loading state

* update snapshots

* add border radius

* fix comment breaking build jsx
2020-03-26 18:28:26 +01:00
Sanghyeon Lee
d8708cb14f Apply scroll-back-to-content's z-index only for mobile (#1086)
ref: https://github.com/excalidraw/excalidraw/pull/1002/files#diff-6a2256f44598ec970b4bd034962e011eR376
2020-03-26 13:22:15 +02:00
David Luzar
6fd2a3b2e5 fix z-index action to account for deleted elems and add tests (#1077) 2020-03-26 00:28:50 -07:00
Lipis
fb82715ef7 New Crowdin translations (#1085)
* New translations en.json (Chinese Traditional)

* New translations en.json (Chinese Traditional)
2020-03-25 22:50:53 +01:00
Jed Fox
2f1b706318 Clean up package.json (#1083)
* Remove unnecessary metadata from package.json

* Remove homepage field, sort keys
2020-03-25 19:10:05 +02:00
Sanghyeon Lee
051a946438 Add Enter key handler that can start text editing (#1084)
* Add handler that can start text editing with Enter key

* Refine `startTextEditing` parameters

* Apply prettier fixes
2020-03-25 17:12:51 +01:00
Jed Fox
5b9c18a8b7 Remove support for some older browsers that probably didn’t wor… (#1080) 2020-03-25 17:42:16 +02:00
Marcel Kloubert
12d7550958 fixed generateCollaborationLink() (#1081) 2020-03-25 17:18:22 +02:00
Faustino Kialungila
4442addc02 Type action names (#1079)
* Type action names

* improve typing

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-25 14:13:59 +01:00
Lipis
9cc1037e7b New Crowdin translations (#1076) 2020-03-25 12:35:29 +02:00
David Luzar
42df058223 load from localStorage only if not in multiplayer (#1074) 2020-03-24 09:57:59 -07:00
Sanghyeon Lee
104e48b6cb Add the shape lock button for mobile (#1054) 2020-03-24 12:51:49 +02:00
Lipis
e38045ccad New Crowdin translations (#1055)
* New translations en.json (Norwegian)

* New translations en.json (Norwegian)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (Chinese Simplified)

* New translations en.json (French)

* New translations en.json (German)

* New translations en.json (Indonesian)

* New translations en.json (Norwegian)

* New translations en.json (Polish)

* New translations en.json (Portuguese)

* New translations en.json (Russian)

* New translations en.json (Spanish)

* New translations en.json (Turkish)

* New translations en.json (Korean)

* New translations en.json (Chinese Traditional)

* New translations en.json (Hungarian)

* New translations en.json (Norwegian)

* New translations en.json (French)
2020-03-24 09:55:29 +01:00
Pete Hunt
bd7856adf3 Much more thorough tests! (#1053) 2020-03-23 16:38:41 -07:00
Lipis
d4ff5cb926 npm-audit-fix (#1067) 2020-03-23 15:57:28 -07:00
David Luzar
c416de3499 fix lint not failing on warnings on CI (#1063) 2020-03-23 17:20:42 +02:00
David Luzar
cf4fa30a57 tweak png copy button label (#1062)
* tweak png copy button label

* fix lint
2020-03-23 16:15:22 +01:00
dependabot-preview[bot]
722c498abe Bump prettier from 1.19.1 to 2.0.1 (#1060)
* Bump prettier from 1.19.1 to 2.0.1

Bumps [prettier](https://github.com/prettier/prettier) from 1.19.1 to 2.0.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/1.19.1...2.0.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Update formatting

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Panayiotis Lipiridis <lipiridis@gmail.com>
2020-03-23 13:05:07 +02:00
dependabot-preview[bot]
251fa27c65 Bump @types/react from 16.9.23 to 16.9.25 (#1059)
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.23 to 16.9.25.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 10:29:51 +01:00
dependabot-preview[bot]
4fede2387d Bump eslint-config-prettier from 6.10.0 to 6.10.1 (#1058)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 6.10.0 to 6.10.1.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v6.10.0...v6.10.1)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 10:28:34 +01:00
dependabot-preview[bot]
876eb5a76e Bump react from 16.13.0 to 16.13.1 (#1057)
Bumps [react](https://github.com/facebook/react/tree/HEAD/packages/react) from 16.13.0 to 16.13.1.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/master/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v16.13.1/packages/react)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-03-23 10:27:39 +01:00
Lipis
c7f10c5de2 New Crowdin translations (#1049)
* New translations en.json (German)

* New translations en.json (German)

* New translations en.json (German)
2020-03-22 23:01:38 +02:00
Jed Fox
8a6e2bf9cf Use system fonts where possible. (#1050)
Also put Arial after Helvetica. I hate Arial.
2020-03-22 16:11:21 -04:00
Lipis
e9058dc5a7 Checks on push and fix formatting (#1048) 2020-03-22 19:56:55 +02:00
Edwin Lin
f1160a1534 load scene from localStorage in collaboration if user is first… (#1036)
* load scene from localStorage in collaboration if user is first in room

* load scene from localStorage in collaboration prior to syncing with server

* fix merge

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-22 18:41:05 +01:00
Kent Beck
ba3cec8d0d App mitosis begins (#1047) 2020-03-22 18:24:50 +01:00
Lipis
cdf11809dc Refactor README (#1046) 2020-03-22 17:22:13 +02:00
Lipis
125d1294a0 New Crowdin translations (#1043) 2020-03-22 16:14:45 +02:00
Jed Fox
daa121e909 Add a warning to encourage people to update translations direct… (#1045) 2020-03-22 14:43:06 +01:00
Lipis
5b6723b514 New Crowdin translations (#1037) 2020-03-22 06:24:38 +02:00
Kent Beck
d3d25a128c Extract helper for App context menu handling (#1033)
* Encapsulate SceneHistory. A little.

* Clean up TopErrorBoundary

* Extract helper for App context menu handling
2020-03-21 17:03:17 +01:00
Saugat Acharya
5413d59925 Bump react-scripts to version 3.4.1 (#1032)
* Bump react-scripts to version 3.4.1

* rebuild package-lock

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-21 10:55:32 +01:00
Kent Beck
1e8cd2bd1c Separated specification and implementation in TopErrorBoundary (#1031)
* Encapsulate SceneHistory. A little.

* Clean up TopErrorBoundary
2020-03-21 10:26:01 +01:00
David Luzar
f6b36519f1 don't pass deleted elements to UI (#1029) 2020-03-20 21:46:09 +01:00
Lipis
71c31d9b8d Remove Gitter from Readme (#1028) 2020-03-20 18:47:40 +01:00
Kent Beck
dc618ab122 Encapsulate SceneHistory. A little. (#1016) 2020-03-20 18:45:30 +01:00
Lipis
46e619d800 New Crowdin translations (#1020) 2020-03-20 18:32:46 +02:00
David Luzar
edd54d93b3 revert #1017 (#1025)
This reverts commit 1546c00c0c.
2020-03-20 16:46:06 +01:00
Faustino Kialungila
0ad6f4ec6b Remove deleted elements from svg export (#1021)
* Remove deleted elements from svg export

* skip deleted elements

* remove old comment

Co-authored-by: dwelle <luzar.david@gmail.com>
2020-03-20 15:19:20 +01:00
Chang Yan
1546c00c0c Fix adding incorrect dragging element when handleCanvasPointerD… (#1017) 2020-03-20 11:00:50 +01:00
Lipis
6b3dee6777 New Crowdin translations (#1011) 2020-03-19 22:12:47 +02:00