Commit Graph

727 Commits (8dccc793eebd13eb080fd42d80631ef8a8422d4e)
 

Author SHA1 Message Date
David Luzar 8dccc793ee
add editorconfig ()
* add editorconfig

* Update .editorconfig

Co-Authored-By: Lipis <lipiridis@gmail.com>

* remove duplicate section

Co-authored-by: Lipis <lipiridis@gmail.com>
Lipis 5f447cfe6a
Create now.json for redirects ()
Adil HADDAOUI ae655cd7d3
Align ToolButton Label in RTL mode ()
David Luzar 8030a167c6
make text committing cross-platform ()
Lipis cd3083e8e6
New translations en.json (French) ()
Lipis c1b067a8b9
New Crowdin translations (Dutch) ()
* New translations en.json (Dutch)

* Update i18n.ts
alaoui abdellah 980d08ce56
Add support for committing a text entry on cmd/shift click ()
Adil HADDAOUI b9b58d4464
Change arabic language name ()
Lipis c240fff0c5
New Crowdin translations (mostly Arabic updates) ()
David Luzar 4912a29e75
sync intermediate text updates ()
* sync intermediate text updates

* fix initial render text position

* batch updates

* tweak onChange subscription
Kostas Bariotis 0c9459e9e5
Warn on invalid JSON file ()
* add error dialog

* show error modal on file dnd

* add locales

* Update src/locales/en.json

Co-Authored-By: Lipis <lipiridis@gmail.com>

* Update src/data/blob.ts

* Update src/data/blob.ts

* fix titles, update snapshots

* make modal smaller

* fix dnd wrong file type

* reset errorMessage

Co-authored-by: Faustino Kialungila <faustino.kialungila@gmail.com>
Co-authored-by: Lipis <lipiridis@gmail.com>
Lipis 2be34effd4
New Crowdin translations ()
* New translations en.json (Norwegian)

* New translations en.json (Norwegian)
Christopher Chedeau 27075b028c
Update zoom refresh ()
One second feels way too long. Let's try 300ms
Christopher Chedeau 79557676c2
Revert "simulate a db tap on mobile to insert text ()" ()
This reverts commit 56034eacb0.
wei c67b0c59c2
Adding preconnect for the socket ()
* Update index.html

* fix formatting
José Quinto efa8b95c52
fix scrollbar and toolbar grid-gap ()
Lipis a488555f30
New Crowdin translations ()
* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Indonesian)

* New translations en.json (German)

* New translations en.json (Arabic)

* New translations en.json (Greek)

* New translations en.json (Hungarian)

* New translations en.json (French)

* New translations en.json (Hungarian)

* New translations en.json (German)

* New translations en.json (Korean)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)

* New translations en.json (Polish)
Jed Fox 663526129a
Proper RTL support ()
* Add RTL styles. Most of the work is done by the browser 💖

* Refactor getLanguage

* Additional fixes

* Mirror the mouse pointer icon

* Move the vertical scrollbar to the left on RTL

* Revert "Mirror the mouse pointer icon"

This reverts commit f69b132538.
Kostas Bariotis 45e4949da0
Add .nvmrc file ()
José Quinto 8fea75b84f
fix for - Weird behavior when resize + shift a 2-point li… ()
Co-authored-by: dwelle <luzar.david@gmail.com>
Daishi Kato 65be7973be
Rotation support ()
* rotate rectanble with fixed angle

* rotate dashed rectangle with fixed angle

* fix rotate handler rect

* fix canvas size with rotation

* angle in element base

* fix bug in calculating canvas size

* trial only for rectangle

* hitTest for rectangle rotation

* properly resize rotated rectangle

* fix canvas size calculation

* giving up... workaround for now

* **experimental** handler to rotate rectangle

* remove rotation on copy for debugging

* update snapshots

* better rotation handler with atan2

* rotate when drawImage

* add rotation handler

* hitTest for any shapes

* fix hitTest for curved lines

* rotate text element

* rotation locking

* hint messaage for rotating

* show proper handlers on mobile (a workaround, there should be a better way)

* refactor hitTest

* support exporting png

* support exporting svg

* fix rotating curved line

* refactor drawElementFromCanvas with getElementAbsoluteCoords

* fix export png and svg

* adjust resize positions for lines (N, E, S, W)

* do not make handlers big on mobile

* Update src/locales/en.json

Alright!

Co-Authored-By: Lipis <lipiridis@gmail.com>

* do not show rotation/resizing hints on mobile

* proper calculation for N and W positions

* simplify calculation

* use "rotation" as property name for clarification (may increase bundle size)

* update snapshots excluding rotation handle

* refactor with adjustPositionWithRotation

* refactor with adjustXYWithRotation

* forgot to rename rotation

* rename internal function

* initialize element angle on restore

* rotate wysiwyg editor

* fix shift-rotate around 270deg

* improve rotation locking

* refactor adjustXYWithRotation

* avoid rotation degree becomes >=360

* refactor with generateHandler

Co-authored-by: Lipis <lipiridis@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
Lipis 3e3ce18755
New translations en.json (Greek) ()
Sanghyeon Lee 634410ad48
Modify action buttons visibility for desktop ()
Lipis ffec3af635
New Crowdin translations ()
* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (French)
Mohit kumar Bajoria 9b6700755a
Add new line on Enter ()
* Add new line on Enter

Fixes 

* Fix lint
Faustino Kialungila 56034eacb0
simulate a db tap on mobile to insert text ()
Lipis 0e90996715
New Crowdin translations ()
* New translations en.json (Arabic)

* New translations en.json (Chinese Simplified)

* New translations en.json (Turkish)

* New translations en.json (Hindi)

* New translations en.json (Greek)

* New translations en.json (Italian)

* New translations en.json (Hungarian)

* New translations en.json (Chinese Traditional)

* New translations en.json (Korean)

* New translations en.json (Spanish)

* New translations en.json (French)

* New translations en.json (Russian)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Norwegian)

* New translations en.json (Indonesian)

* New translations en.json (German)

* New translations en.json (Arabic)

* New translations en.json (Portuguese)

* New translations en.json (Polish)

* New translations en.json (Arabic)

* New translations en.json (Polish)

* New translations en.json (Arabic)

* New translations en.json (French)

* New translations en.json (German)

* Update i18n.ts

* New translations en.json (German)
Sanghyeon Lee 86d0da5204
Add duplicate button for mobile view ()
* Add a icon for dulplication

* Add PanelComponent for duplication

* Add duplicate button for mobile

* Add styles for layout action buttons

* Add a translation for 'Actions'

* Show left action buttons only for desktop

* Add duplicate button at the bottom of mobile

It is provided depending on whether or not it is `multiElement` to maintain space between buttons.
Lipis e9f80d7c31
Remove Sentry for staging workflow ()
Lipis 1a47ff5c52
New Crowdin translations ()
Lipis e2e4f3c805
New Crowdin translations (Greek) ()
Brock Balducci 81d4f611a3
add action ui for deleting an element - ()
Kostas Bariotis 4ecbbab7da
Add sentry integration ()
Lipis b7f681a068
Add homepage to package.json ()
dependabot-preview[bot] a75491661a
Bump @testing-library/jest-dom from 5.1.1 to 5.3.0 ()
Bumps [@testing-library/jest-dom](https://github.com/testing-library/jest-dom) from 5.1.1 to 5.3.0.
- [Release notes](https://github.com/testing-library/jest-dom/releases)
- [Changelog](https://github.com/testing-library/jest-dom/blob/master/CHANGELOG.md)
- [Commits](https://github.com/testing-library/jest-dom/compare/v5.1.1...v5.3.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
dependabot-preview[bot] cb2b5d154d
Bump react-dom from 16.13.0 to 16.13.1 ()
Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) 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-dom)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
dependabot-preview[bot] 3633b16316
Bump @types/react from 16.9.25 to 16.9.27 ()
Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 16.9.25 to 16.9.27.
- [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>
dependabot-preview[bot] b3fcf44202
Bump lint-staged from 10.0.8 to 10.0.10 ()
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.0.8 to 10.0.10.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.0.8...v10.0.10)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
dependabot-preview[bot] 14b1fbc855
Bump asar from 3.0.1 to 3.0.2 ()
Bumps [asar](https://github.com/electron/asar) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/electron/asar/releases)
- [Changelog](https://github.com/electron/asar/blob/master/CHANGELOG.md)
- [Commits](https://github.com/electron/asar/compare/v3.0.1...v3.0.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
dependabot-preview[bot] 595d3c8baf
Bump prettier from 2.0.1 to 2.0.2 ()
Bumps [prettier](https://github.com/prettier/prettier) from 2.0.1 to 2.0.2.
- [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/2.0.1...2.0.2)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Thomas Steiner 54355f1391
Renew origin trial token ()
Michal Srb d07e6ff7e8
Note that codesandbox requires sign-in ()
Christopher Chedeau a7bd21ccf2
Avoid broadcasting what was just received ()
Fixes 

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
Sanghyeon Lee 763735ac84
Add `SCENE_INIT` broadcast type for new user ()
Christopher Chedeau 8e6d55cf75
Fix corner resize for multi-point arrows ()
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 
Christopher Chedeau 24fa657093
Don't reset cache while zooming using a gesture ()
* 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 

* update snapshot tests
Kent Beck 95eaadeb85
Refactor paste code ()
Christopher Chedeau 6056170d4b
Fix wysiwyg center ()
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 
Kent Beck aa54364bd6
Use existing helper to copy all state ()
Lipis 2a373571f8
Change order of the fill options ()