695 Commits

Author SHA1 Message Date
Christopher Chedeau
5b19aeafe9
Make color selection accessible (#556)
By changing from a `<div>` to a `<button>`, it's now possible to use the space key in order to select it
2020-01-25 10:11:57 -08:00
Guillermo Peralta Scura
69061e20ac Some a11y fixes (#534)
* Rename ToolIcon to ToolButton

It makes more semantic sense

* Label and keyboard shortcuts announcement

* Refactor common props for ToolButton

* Better doc outline and form controls

* Adjust color picker

* Styling fixes

Co-authored-by: Christopher Chedeau <vjeuxx@gmail.com>
2020-01-25 09:52:03 -08:00
Bakhtiiar Muzakparov
689c94151d fix: typos (#540) 2020-01-24 21:02:55 +01:00
Faustino Kialungila
54f9c296b5
Enhance language selection (#538)
* Enhance language selection

* remove top/left margin to limit unusable canvas area

Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-01-24 19:10:44 +01:00
Lipis
ee68af0fd3
Set Trailing Cmma to (#525) 2020-01-24 12:04:54 +02:00
Lipis
48024c9116
Remove selected object when storing to backend (#506) 2020-01-22 18:27:44 +02:00
Fernando Alava Zambrano
a436e70764 Internationalization followup (#500)
* add translations in data.ts

* add language list
add spanish version

* fixes pr review

* add more translations

* remove unused label

Co-authored-by: David Luzar <luzar.david@gmail.com>
2020-01-22 16:25:04 +02:00
Lipis
d30498a289 Pointer for Tool icons (#501) 2020-01-21 22:07:09 +01:00
Jilles Soeters
a72a143c84 Introduce Shapelock (#480)
* Introduce shape lock

* Format code with prettier

* Do not reset elementLocked on selection change

* Don't set isSelected to true if element is locked

* Don't reset the cursor

* Move reset cursor call to better spot

* Run prettier + lint
2020-01-20 15:52:19 -08:00
David Luzar
2340dddaad Sync panel props to editing element (#470)
* ensure panel props are sync to editing elem

* ensure we don't create empty-text elements (fixes #468)

* remove dead code

Co-authored-by: Christopher Chedeau <vjeuxx@gmail.com>
2020-01-20 15:16:22 -08:00
Fernando Alava Zambrano
ff7a340d2f Internationalization support (#477)
* add i18next lib
add some translations

* add translations

* fix font-family

* fix pin versions
2020-01-20 15:14:10 -08:00
Guillermo Peralta Scura
1a03a29025 Use relative CSS units (#484) 2020-01-20 14:59:00 -08:00
Lipis
4487e9af8a
Switch hashes to smaller IDs for the backend (#474)
* Update backend

* log
2020-01-20 20:11:03 +02:00
Brady Madden
6ad596e9f1 Share excalidrawings as links! (#356)
* shareable links

* fix

* review comments

* json-excaliber (#464)

* draw

* Boom

* backend

* Remove local

Co-authored-by: Lipis <lipiridis@gmail.com>
2020-01-19 21:56:19 -08:00
Guillermo Peralta Scura
7ae52f1164
Add ColorInput component (#455)
* Add ColorInput component

* Use valid color on input blur

* Darken input text and add labels
2020-01-19 18:27:36 -03:00
Christopher Chedeau
7f6e1f420e
Pure node rendering (#443) 2020-01-19 13:21:33 -08:00
Lipis
67aed07b72 Subtle border around the color picker (#442)
* Subtle border around the color picker

* Rename
2020-01-18 11:56:47 +01:00
Lipis
70b88a6a53
Force lowercase for the color inputs (#423) 2020-01-17 21:01:36 +02:00
Abhishek Kulshrestha
31403ab373 Bug 389 (#428)
* paste inside the viewport

* Buttons in top left panel aren't horizontally centered
2020-01-17 20:23:41 +02:00
David Luzar
6892348c3d Revert 400 and 420 (#422)
* revert #400 font file

* Revert "Revert "Set scale for export images (#416)" (#420)"

This reverts commit d603921234b9ae1483f9f0e0f79fb1c3d0878370.
2020-01-17 16:43:24 +02:00
Timur Khazamov
d603921234
Revert "Set scale for export images (#416)" (#420)
This reverts commit 82f559f826f4ab0504981a281335e0a25d332a6a.
2020-01-17 15:55:17 +03:00
Timur Khazamov
82f559f826
Set scale for export images (#416) 2020-01-17 15:19:56 +03:00
Lipis
f4d4b323e1 Update colors from open colors (#406)
* Update to open colors

* Update more

* More colors

* Dahh

* More

* Border none

* More

* Update
2020-01-16 16:54:21 -08:00
Lipis
8154ccd907 No named colors and lowercase hex (#395)
* No named colors and lowercase hex

* consistent
2020-01-16 10:16:08 -08:00
Lipis
cb8d866c33 Open colors (#378)
* Add open colors

* More colors

* Update colors

* Shade 0
2020-01-16 18:14:00 +01:00
Shane O'Sullivan
80cee4d3c0 Add a title for the Export button as it was missing one (#376) 2020-01-15 15:16:43 -08:00
Bakhtiiar Muzakparov
8db8827c6f feat: add line shape (#371)
* feat: add line shape

* fix: align line tool

* fix: hitbox bug sw to ne

* fix: add stroke width n sloppiness  for line

* fix: center line inside a panel box

* fix: use color as a unique key
2020-01-16 00:07:19 +05:00
Timur Khazamov
79aee53ff6 Redesign idea (#343)
* Redisign idea

* Code cleanup

* Fixed to right container

* Reoredered layout

* Reordering panels

* Export dialog

* Removed redunant code

* Fixed not removing temp canvas

* Fixed preview not using only selected elements

* Returned file name on export

* Toggle export selected/all elements

* Hide copy to clipboard button if no support of clipboard

* Added border to swatches

* Fixed modal flickering
2020-01-15 07:42:02 -08:00
David Luzar
8104c8525d ensure contextMenu doesn't overflow viewport (#364) 2020-01-14 09:44:18 +01:00
Christopher Chedeau
8785bef523
Support transparent background + inline picker (#325)
Unfortunately, react-color has a bug where transparent color doesn't trigger onChange. I've been annoyed by the huge dependency anyway so decided to take the generated html (which is awesome) and reimplement a specific component for it.

I also made sure that we don't actually render anything when the background is transparent on rough (I looked at the generated path and made sure it didn't have the commands for the background)
2020-01-11 19:10:41 -08:00
Christopher Chedeau
157f0eae0c
Export to canvas only selected elements (#323)
Fixes #308
2020-01-11 16:15:26 -08:00
Christopher Chedeau
1bf18fe4ed
Tweak context menu style (#320)
- Move the context menu right next to the mouse so it's not so far away. But 1px out so that nothing is selected until you move your mouse
- Change the colors to be closer to the macos one. Unfortunately, macos has a 0.5px border that I'm not able to reproduce without some annoying hacks, 1px it'll be.
2020-01-11 15:59:42 -08:00
Enzo Ferey
c6accd9fc7 Improve color suggestions (#304)
* Add palettes for each type of color picker.

* Add white canvas background and black element stroke.

* Add white for element background.
2020-01-11 14:58:44 -08:00
Gasim Gasimzada
f465121f9b Feature: Action System (#298)
* Add Action System

- Add keyboard test
- Add context menu label
- Add PanelComponent

* Show context menu items based on actions

* Add render action feature

- Replace bringForward etc buttons with action manager render functions

* Move all property changes and canvas into actions

* Remove unnecessary functions and add forgotten force update when elements array change

* Extract export operations into actions

* Add elements and app state as arguments to `keyTest` function

* Add key priorities

- Sort actions by key priority when handling key presses

* Extract copy/paste styles

* Add Context Menu Item order

- Sort context menu items based on menu item order parameter

* Remove unnecessary functions from App component
2020-01-11 14:22:03 -08:00
Gasim Gasimzada
f2346275ef
Extract Side Panel from App component (#295)
* Extract Side Panel from App component

* Refactor SidePanel component

- Remove unnecessary props (we are already passing appState as a prop)
- Remove unnecessary allback (we are already passing setState)
2020-01-10 18:00:19 +04:00
Gasim Gasimzada
35b5f6dd0d Fix a bug where clipboard object doesn't exist in Safari (#296) 2020-01-10 10:38:39 +01:00
David Luzar
deee57314d
support export canvas to clipboard (#232) 2020-01-09 17:37:08 +01:00
Gasim Gasimzada
36ce6a26e6 Make panels collapsible (#239)
* Make panels collapsible

- Add Panel component with collapse logic
- Use the component in all the necessary panel groups

* Remove unnecessary container from PanelCanvas

* Add "hide property" to Pane component to hide Panel contents using a prop

- Instead of doing conditional rendering, pass the condition to Panel as props

* Change collapse icon rotation for closed

- Use one icon and use CSS transforms to rotate it

* Remove unnecessary imports from PanelSelection
2020-01-08 13:06:36 -08:00
Timur Khazamov
2f9aa0e3ca Async loading of TwitterPicker (#246) 2020-01-07 10:37:22 -08:00
Gasim Gasimzada
85365e5bcb
Extract Sidebar panels into separate components (#230)
* Extract Sidebar panels into separate components

* Add Jest TS types
2020-01-07 15:06:22 +04:00
Timur Khazamov
257f697a98 Context menu with some commands (#217) 2020-01-06 18:50:59 -08:00
Faustino Kialungila
5ade8987e4
Fixes pasting colors in color picker (#215)
* improve lozenge dimensions

* fix pasting colors in color picker input
2020-01-06 20:28:14 +01:00
Gasim Gasimzada
054669cfef
Extract components and shapes into their respective modules (#212) 2020-01-06 21:29:44 +04:00
Christopher Chedeau
fd6b5024c7
Reorganize menu (#178) 2020-01-05 14:45:16 -08:00
IA
5f806474e3 Allow user to set file name (#145)
* Allow user to set file name

* Add EditableText component

Added editable text component and use component for project name edit.

* rebased branch

* Updated EditableText component

* Set default project name

* Move project name field away from the top section.
2020-01-05 14:26:00 -08:00