984 Commits

Author SHA1 Message Date
Aakansha Doshi
6d56634289
fix: do not bind text to container using text tool when it has text already (#6694)
* fix: do not bind text to container using text tool when it has text already

* Update src/element/textWysiwyg.test.tsx
2023-06-19 17:28:45 +05:30
Sudharsan Aravind
28ab6531c9
fix: updated link for documentation page under help section (#6654)
* fix: updated link for documentation page under help section

* Update docs link

---------

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-06-15 14:58:11 +05:30
Ryan Di
81ebf82979
feat: introduce frames (#6123)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-06-14 18:42:01 +02:00
Arnost Pleskot
5ca3613cc3
feat: redesigned collab cursors (#6659)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-06-12 15:43:14 +02:00
WBbug
a39640ead1
fix: delete setCursor when resize (#6660) 2023-06-08 11:41:22 +02:00
David Luzar
84bd9bd4ff
fix: creating text while color picker open (#6651)
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-06-06 22:04:06 +02:00
David Luzar
a065ec67a9
fix: eye dropper not accounting for offsets (#6640) 2023-06-02 17:35:25 +02:00
David Luzar
079aa72475
feat: eye dropper (#6615) 2023-06-02 17:06:11 +02:00
Sudharsan Aravind
644685a5a8
fix: color picker input closing problem (#6599) 2023-06-01 23:17:22 +02:00
Are
7bf4de5892
feat: redesign of Live Collaboration dialog (#6635)
* feat: redesiged Live Collaboration dialog

* fix: address lints

* fix: inactive dialog dark mode improvements

* fix: follow styleguide with event parameter, add FilledButton size prop

* fix: change timer to be imperative

* fix: add spacing after emoji

* fix: remove unused useEffect

* fix: change margin into whitespace

* fix: add share button check back
2023-05-31 18:27:29 +02:00
Arnost Pleskot
253c5c7866
perf: memoize rendering of library (#6622)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-31 15:37:13 +02:00
Arnost Pleskot
1e3c94a37a
feat: recover scrolled position after Library re-opening (#6624)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-31 10:22:02 +02:00
Arnost Pleskot
a91e401554
feat: clearing library cache (#6621)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-29 16:01:44 +02:00
Are
08563e7d7b
feat: update design of ImageExportDialog (#6614)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-26 16:16:55 +02:00
David Luzar
75bea48b54
fix: export dialog shortcut toggles console on firefox (#6620) 2023-05-24 22:52:21 +02:00
David Luzar
13780f390a
fix: add react v17 useTransition polyfill (#6618) 2023-05-24 15:24:54 +00:00
Arnost Pleskot
7340c70a06
perf: improve rendering performance for Library (#6587)
* perf: improve rendering performance for Library

* fix: return onDrag and onToggle functionality to Library Items

* perf: cache exportToSvg output

* fix: lint warning

* fix: add onClick handler into LibraryUnit

* feat: better spinner

* fix: useCallback for getInsertedElements to fix linter error

* feat: different batch size when svgs are cached

* fix: library items alignment in row

* feat: skeleton instead of spinner

* fix: remove unused variables

* feat: use css vars instead of hadcoded colors

* feat: reverting skeleton, removing spinner

* cleanup and unrelated refactor

* change ROWS_RENDERED_PER_BATCH to 6

---------

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-24 14:40:20 +00:00
Rounik Prashar
a4f05339aa
fix: Library dropdown visibility issue for mobile (#6613)
Fix: Library dropdown visibility issue for mobile

Co-authored-by: Rounik Prashar <rounik.prashar@increff.com>
2023-05-23 22:37:19 +02:00
David Luzar
a8f0a14610
fix: withInternalFallback leaking state in multi-instance scenarios (#6602) 2023-05-19 15:47:01 +02:00
Barnabás Molnár
5b7596582f
feat: color picker redesign (#6216)
Co-authored-by: Maielo <maielo.mv@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-05-18 16:06:27 +02:00
Mohammad Amin
6977c32631
style: Removes extra spaces (#6558)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-13 21:09:16 +00:00
David Luzar
f6f9ed0396
refactor: simplify ImageExportDialog (#6578) 2023-05-13 22:58:35 +02:00
David Luzar
b1b325b9a7
feat: add "unlock all elements" to canvas contextMenu (#5894) 2023-05-13 22:52:03 +02:00
maruric
306e133651
fix: garbled text displayed on avatars (#6575)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-13 19:49:09 +02:00
David Luzar
fff9d1522a
feat: library sidebar design tweaks (#6582) 2023-05-13 13:18:14 +02:00
Contextualist
e619e06055
fix: i18n: Apply Trans component to publish library dialogue (#6564) 2023-05-10 10:39:21 +02:00
David Luzar
560231d365
perf: use UIAppState where possible to reduce UI rerenders (#6560) 2023-05-08 10:14:02 +02:00
David Luzar
026949204d
fix: fix brave error i18n string and remove unused (#6561) 2023-05-06 10:36:42 +02:00
Luka Zakrajšek
1184a8c0e9
feat: Add Trans component for interpolating JSX in translations (#6534)
* feat: add Trans component

* Add comments

* tweak

* Move brave to trans component

* fix test and tweaks

* remove any

* fix

* fix

* comment

* replace render function type

* Use tags for Trans

* Fix a typo

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>

* Cleanup, add comments, add support for kebab case

* tweaks

---------

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-05-05 21:35:18 +05:30
David Luzar
e9cae918a7
feat: sidebar tabs support (#6213)
* feat: Sidebar tabs support [wip]

* tab trigger styling tweaks

* add `:hover` & `:active` states

* replace `@dwelle/tunnel-rat` with `tunnel-rat`

* make stuff more explicit

- remove `Sidebar.Header` fallback (host apps need to render manually), and stop tunneling it (render in place)
- make `docked` state explicit
- stop tunneling `Sidebar.TabTriggers` (render in place)

* redesign sidebar / library as per latest spec

* support no label on `Sidebar.Trigger`

* add Sidebar `props.onStateChange`

* style fixes

* make `appState.isSidebarDocked` into a soft user preference

* px -> rem & refactor

* remove `props.renderSidebar`

* update tests

* remove

* refactor

* rename constants

* tab triggers styling fixes

* factor out library-related logic from generic sidebar trigger

* change `props.onClose` to `onToggle`

* rename `props.value` -> `props.tab`

* add displayNames

* allow HTMLAttributes on applicable compos

* fix example App

* more styling tweaks and fixes

* fix not setting `dockable`

* more style fixes

* fix and align sidebar header button styling

* make DefaultSidebar dockable on if host apps supplies `onDock`

* stop `Sidebar.Trigger` hiding label on mobile

this should be only the default sidebar trigger behavior, and for that we don't need to use `device` hook as we handle in CSS

* fix `dockable` prop of defaultSidebar

* remove extra `typescript` dep

* remove `defaultTab` prop

in favor of explicit `tab` value in `<Sidebar.Trigger/>` and `toggleSidebar()`, to reduce API surface area and solve inconsistency of `appState.openSidebar.tab` not reflecting actual UI value if `defaultTab` was supported (without additional syncing logic which feels like the wrong solution).

* remove `onToggle` in favor of `onStateChange`

reducing API surface area

* fix restore

* comment no longer applies

* reuse `Button` component in sidebar buttons

* fix tests

* split Sidebar sub-components into files

* remove `props.dockable` in favor of `props.onDock` only

* split tests

* fix sidebar showing dock button if no `props.docked` supplied & add more tests

* reorder and group sidebar tests

* clarify

* rename classes & dedupe css

* refactor tests

* update changelog

* update changelog

---------

Co-authored-by: barnabasmolnar <barnabas@excalidraw.com>
2023-05-04 17:33:31 +00:00
suwalkanishka
1e9943323a
style: fix font family inconsistencies (#6501)
style: font fix for four components

The browser default font was showing up in various locations. Fixed them to show the desired ui font.
2023-04-25 17:20:19 +05:30
David Luzar
d35386755f
feat: retain seed on shift-paste (#6509)
thanks for the review 👍
2023-04-24 10:26:21 +02:00
zsviczian
9d5cfbbfb7
fix: text jumps when editing on Android Chrome (#6503)
* debug logging

* debug

* debugging

* Update textWysiwyg.tsx

* Update textWysiwyg.tsx

* extended debug information

* debug

* debug

* trace

* further debug

* don't drag while editing

* removing all console.logs

* revert all changes to textWysiwyt.tsx

* updated comment
2023-04-22 14:17:13 +02:00
David Luzar
fee760d38c
feat: allow avif, jfif, webp, bmp, ico image types (#6500
* feat: allow `avif`, `jfif`, `webp`, `bmp`, `ico` image types

* dedupe for SSOT

* more SSOT
2023-04-21 22:53:49 +02:00
siddhant
851b9b7aec
fix: rotate the text element when binding to a rotated container (#6477)
* Updated logic to update the bound child angle from the parent

* update angle when generating text element

* add test

* remove

* fix

---------

Co-authored-by: Aakansha Doshi <aakansha1216@gmail.com>
2023-04-20 16:34:39 +05:30
Aakansha Doshi
979312f779
fix: center align text when wrapped in container via context menu (#6480)
* rename action to wrapTextInContainer

* fix: center align text when wrapped in container via context menu

* revert translation key

* fix tests
2023-04-18 19:44:14 +05:30
David Luzar
4d0d844e39
feat: constrain export dialog preview size (#6475) 2023-04-18 15:27:51 +02:00
Aakansha Doshi
21726e22cc
fix: mark more props as optional for element (#6448)
* fix: mark more props as optional for element

* fix
2023-04-18 18:42:48 +05:30
David Luzar
f640ddc2aa
fix: incorrectly duplicating items on paste/library insert (#6467
* fix: incorrectly duplicating items on paste/library insert

* fix: deduplicate element ids on restore

* tests
2023-04-16 17:22:16 +02:00
David Luzar
e9064a4a87
fix: library ids cross-contamination on multiple insert (#6466) 2023-04-16 17:09:51 +02:00
David Luzar
034113772d
fix: color picker keyboard handling not working (#6464) 2023-04-16 15:33:30 +02:00
zsviczian
d34cd3072f
fix: abort freedraw line if second touch is detected (#6440) 2023-04-16 15:33:16 +02:00
David Luzar
e31230f78c
refactor: inline SingleLibraryItem into PublishLibrary (#6462
refactor: inline `SingleLibraryItem` into `PublishLibrary` to reduce api surface area
2023-04-16 11:57:13 +02:00
Aurélie
b0b23353cf
fix: split "Edit selected shape" shortcut (#6457)
Co-authored-by: David Luzar <luzar.david@gmail.com>
2023-04-14 21:34:26 +00:00
Aakansha Doshi
ca3be2c678
fix: exporting labelled arrows via export utils (#6443)
* fix: exporting labelled arrows via export utils

* add comments

* lint

* update changelog

* fix lint

* initialize scene in the utils so it can be availabe in the helper functions

* fix library rendering

* add comments
2023-04-13 17:19:46 +05:30
Nishant
fc601347cf
fix: fixing popover overflow on small screen (#6433)
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-04-11 23:23:36 +02:00
David Luzar
e4d8ba226f
feat: zigzag fill easter egg (#6439) 2023-04-10 15:38:50 +02:00
Type Horror
25bb6738ea
feat: Add fitToContent and animate to scrollToContent (#6319)
Co-authored-by: Brice Leroy <brice@brigalabs.com>
Co-authored-by: dwelle <luzar.david@gmail.com>
2023-03-25 23:26:58 +01:00
Aakansha Doshi
83383977f5
feat: add line height attribute to text element (#6360)
* feat: add line height attribute to text element

* lint

* update line height when redrawing text bounding box

* fix tests

* retain line height when pasting styles

* fix test

* create a util for calculating ling height using old algo

* update line height when resizing multiple text elements

* make line height backward compatible

* udpate line height for older element when font size updated

* remove logs

* Add specs

* lint

* review fixes

* simplify by changing `lineHeight` from px to unitless

* make param non-optional

* update comment

* fix: jumping text due to font size being calculated incorrectly

* update line height when font family is updated

* lint

* Add spec

* more specs

* rename to getDefaultLineHeight

* fix getting lineHeight for potentially undefined fontFamily

* reduce duplication

* fix fallback

* refactor and comment tweaks

* fix

---------

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-03-22 11:32:38 +05:30
David Luzar
20edddcd4e
fix: ensure export preview is centered (#6337) 2023-03-14 13:03:55 +01:00