excalidraw/src
Aakansha Doshi 8420aecb34
feat: new Menu Component API (#6034)
* feat: new Menu Component API

* allow valid children types

* introduce menu group to group items

* Add lang footer

* use display name

* displayName

* define types inside

* fix default menu

* add json export to menu

* fix

* simplify expression

* put open menu into own compo to optimize perf

So that we don't rerun `useOutsideClickHook` (and rebind event listeners
all the time)

* naming tweaks

* rename MenuComponents->MenuDefaultItems and export default items from Menu.Items

* import Menu.scss in Menu.tsx

* move menu scss to excal app

* Don't filter children inside menu group

* move E+ out of socials

* support style prop for MenuItem and MenuGroup

* Support header in menu group and add Excalidraw links header for default items in social section

* rename header to title

* fix padding for lang

* render menu in mobile

* review fixes

* tweaks

* Export collaborators and show in mobile menu

* revert .env

* lint :p

* again lint

* show correct actions in view mode for mobile

* Whitelist Collaborators Comp

* mobile styling

* padding

* don't show nerds when menu open in mobile

* lint :(

* hide shortcuts

* refactor userlist to support mobile and keep a wrapper comp for excal app

* use only UserList

* render only on mobile for default items

* remove unused hooks

* Show collab button in menu when onCollabButtonClick present and hide export when UIOptions.canvasActions.export is false

* fix tests

* lint

* inject userlist inside menu on mobile

* revert userlist

* move menu socials to default menu

* fix collab

* use meny in library

* Make Menu generic and create hamburgemenu for public excal menu and use menu in library as well

* use appState.openMenu for mobile

* fix tests

* styling fixes and support style and class name in menu content

* fix test

* rename MenuDefaultItems->DefaultItems

* move footer css to its own comp

* rename HamburgerMenu -> MainMenu

* rename menu -> dropdownMenu and update classes, onClick->onToggle

* close main menu when dialog closes

* by bye filtering

* update docs

* fix lint

* update example, docs for useDevice and footer in mobile, rename menu ->DropDownMenu everywhere

* spec

* remove isMenuOpenAtom and set openMenu as canvas for main menu, render decreases in specs :)

* [temp] remove cyclic depenedency to fix build

* hack- update appstate to sync lang change

* Add more specs

* wip: rewrite MainMenu footer

* fix margin

* fix snaps

* not needed as lang list no more imported

* simplify custom footer rendering

* Add DropdownMenuItemLink and DropdownMenuItemCustom and update API, docs

* fix `MainMenu.ItemCustom`

* naming

* use onSelect and base class for custom items

* fix lint

* fix snap

* use custom item for lang

* update docs

* fix

* properly use `MainMenu.ItemCustom` for `LanguageList`

* add margin top to custom items

* flex

Co-authored-by: dwelle <luzar.david@gmail.com>
2023-01-05 22:04:23 +05:30
..
actions feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
components feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
css feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
data fix: restoring deleted bindings (#6029) 2022-12-23 11:48:14 +01:00
element fix: remove background from wysiwyg when editing arrow label (#6033) 2022-12-23 19:40:52 +01:00
excalidraw-app feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
hooks fix: hide canvas-modifying UI in view mode (#5815) 2022-11-01 22:25:12 +01:00
locales fix: show error message on collab save failure (#6063) 2023-01-02 23:53:51 +01:00
packages feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
renderer feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
scene feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
tests feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
align.ts fix: align and distribute binded text in container and cleanup (#4468) 2021-12-23 17:02:13 +05:30
analytics.ts chore: add ga for most actions (#4829) 2022-03-28 14:46:40 +02:00
appState.ts feat: move contextMenu into the component tree and control via appState (#6021) 2022-12-21 12:47:09 +01:00
bug-issue-template.js Add sentry integration (#1141) 2020-03-31 11:37:51 +03:00
charts.test.ts fix: Chart display fix (#5154) 2022-05-07 19:12:31 +02:00
charts.ts feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
clients.ts feat: editor redesign 🔥 (#5780) 2022-11-01 17:29:58 +01:00
clipboard.test.ts fix: Correctly paste contents parsed by JSON.parse() as text. (#5868) 2022-11-14 14:02:54 +05:30
clipboard.ts fix: chart pasting not working due to removing tab characters (#5987) 2022-12-16 18:18:27 +01:00
colors.ts Update ESLint rules (#2342) 2020-11-06 21:06:30 +01:00
constants.ts feat: render footer as a component instead of render prop (#5970) 2022-12-21 14:29:06 +05:30
css.d.ts Fix padding in the library loading buttons (#2331) 2020-11-04 11:05:12 +01:00
distribute.ts feat: support adding multiple library items on canvas (#5116) 2022-05-11 15:51:02 +02:00
errors.ts fix: abstract and fix legacy fs (#4032) 2021-10-07 13:19:40 +02:00
ga.ts chore: fix various typos (#4857) 2022-03-02 11:37:12 +05:30
gadirections.ts Prefer arrow functions (#2344) 2020-11-06 21:06:39 +01:00
galines.ts chore: fix various typos (#4857) 2022-03-02 11:37:12 +05:30
gapoints.ts Prefer arrow functions (#2344) 2020-11-06 21:06:39 +01:00
gatransforms.ts Prefer arrow functions (#2344) 2020-11-06 21:06:39 +01:00
gesture.ts fix: stop flooring scroll positions (#2883) 2021-01-31 10:47:43 +01:00
global.d.ts fix: fonts not rendered on init if loadingdone not fired (#5923) 2022-11-23 21:15:32 +01:00
groups.ts fix: binding text to non-bindable containers and not always preferring selection (#4655) 2022-03-02 17:04:09 +01:00
history.ts fix: selectedGroupIds not being stored in history (#3630) 2021-05-29 21:35:03 +02:00
i18n.ts fix: PWA not working after CRA@5 update (#6012) 2022-12-18 22:23:30 +01:00
index-node.ts feat: image support (#4011) 2021-10-21 22:05:48 +02:00
index.tsx chore: upgrade to React 18 (#5450) 2022-07-22 11:20:36 +05:30
jotai.ts feat: collab component state handling rewrite & fixes (#5046) 2022-07-05 16:03:40 +02:00
keys.ts feat: Scroll using PageUp and PageDown (#6038) 2022-12-31 15:54:37 -06:00
math.test.ts Shift loses pointer fixing #1296 (#1330) 2020-04-10 00:14:32 +09:00
math.ts feat: better default radius sizes for rectangles (#5553) 2022-12-08 16:48:49 +01:00
points.ts feat: Support labels for arrow 🔥 (#5723) 2022-12-05 21:03:13 +05:30
polyfill.ts feat: show a mid point for linear elements (#5534) 2022-08-11 20:16:25 +05:30
pwacompat.d.ts Add PWACompat (#1433) 2020-04-16 14:23:39 +02:00
random.ts fix: check if process is defined before using so it works in browser (#4497) 2021-12-28 17:17:41 +05:30
react-app-env.d.ts TS, Prettier, Eslint (#39) 2020-01-02 11:03:48 -08:00
service-worker.ts fix: PWA not working after CRA@5 update (#6012) 2022-12-18 22:23:30 +01:00
serviceWorkerRegistration.ts fix: PWA not working after CRA@5 update (#6012) 2022-12-18 22:23:30 +01:00
setupTests.ts test: fix failing tests and API (#5823) 2022-11-04 18:22:21 +05:30
shapes.tsx feat: reintroduce x shortcut for freedraw (#5840) 2022-11-06 23:07:15 +01:00
types.ts feat: new Menu Component API (#6034) 2023-01-05 22:04:23 +05:30
utils.ts fix: use displayName since name gets stripped off when uglifying/minifiyng in production (#6036) 2022-12-27 15:17:13 +05:30
zindex.ts fix: bound text not atomic with container when changing z-index (#4414) 2021-12-17 13:10:37 +00:00