Commit Graph

37 Commits

Author SHA1 Message Date
1ilit
b9da7e618f load diagram in read only mode from previous version 2025-08-24 18:39:35 +04:00
1ilit
59dd4e0c4d update getCommits and clean up 2025-08-24 18:39:35 +04:00
1ilit
1367ef3745 clean up sharing 2025-08-24 18:39:35 +04:00
zimiovid
f1d632587b Always use gistId from URL for sharing, prevent duplicate gist creation (#511)
* fix: prevent duplicate gist creation

* feat: change from useEffect to loadFromGist

* Update Workspace.jsx
2025-06-26 13:28:09 +04:00
1ilit
94226de561 Table and field drag and drop ordering (#444)
* Add dnd for tables and fields

* Fix inputs

* Decouple ids and indecies in the editor

* Decouple ids and indecies in utils

* Fix field indexes

* Use nanoid instead of numberic ids for fields and tables

* Fix review comments
2025-05-11 21:44:04 +04:00
1ilit
f46a6b2ee9 Add mariadb specific types (#425) 2025-04-28 03:09:59 +04:00
1ilit
66f41d591a Remove octokit (#417)
* remove octokit

* clean up .env.sample and gist apis

* better error management
2025-04-21 22:42:48 +04:00
Aditya
16ea2ee23c feat:Added support for exporting SQL as OracleDB SQL (#192)
* feat:Added support for exporting SQL as OracleDB SQL

* Add parser

* Import from sql

* Add beta tag

* Export from generic

* Fix export

* Add import affinity

---------

Co-authored-by: 1ilit <1ilit@proton.me>
2025-04-02 03:11:08 +04:00
1ilit
a344e85db8 Fix loading already shared diagrams 2024-11-23 20:01:34 +04:00
1ilit
fcf2251e9b Handle incorrect links and corrupted files 2024-09-01 21:37:00 +04:00
1ilit
6eddfd983f Remove github token modal 2024-09-01 20:36:20 +04:00
1ilit
85cf795fc9 Prevent the diagram from getting overwritten when reloaded 2024-09-01 20:24:09 +04:00
1ilit
59a388f44c Fix wrong url being generated for shared diagrams 2024-09-01 19:53:03 +04:00
1ilit
9aec2f02d0 Prevent creating duplicates when loading from gist 2024-09-01 19:15:58 +04:00
1ilit
c6c24d02b9 Load diagram from gist 2024-09-01 13:22:04 +04:00
1ilit
ed7fd87f7a Fix gists being controlled on button load 2024-08-31 19:49:43 +04:00
1ilit
7dcecf3c1f Create and update gist on click 2024-08-29 17:05:47 +04:00
tasnim
94a076c9bc rtl-fix address issues 2024-08-05 11:31:11 +03:00
tasnim
5ec54e2445 Display UI in RTL languages correctly 2024-08-04 15:27:31 +03:00
Felix Zedén Yverås
5a56c3b354 refactor: export CanvasContextProvider to follow established context pattern
As noted [in the review](
https://github.com/drawdb-io/drawdb/pull/148#discussion_r1681584836
), I disagree with this pattern. However, I will follow it to get
these features added.
2024-07-17 22:22:52 +02:00
Felix Zedén Yverås
3659ba9143 fix: release pointer capture when using onPointerLeave events
Certain input sources (such as touch) are "captured" when they
press an element. This means the pointer is always considered
"inside" the element by the browser, even when they visually are
not. This caused some issues on mobile browsers where touch and
stylus events could not connect table columns with each other.

Just to be safe, I've added the required `releasePointerCapture`
call everywhere `onPointerEnter` or `onPointerLeave` is used.
2024-07-17 22:22:52 +02:00
Felix Zedén Yverås
cdecf7c633 feat: add basic touchscreen support
This is basically a migration from mouse events to
[pointer events](
  https://developer.mozilla.org/en-US/docs/Web/API/Pointer_events
).

The `PointerEvent` interface inherits all of the `MouseEvent`
properties, meaning that existing code can essentially be left
as-is. The only major change is making sure we only respond to the
"primary" pointer.

Known issues include:
* stylus hover is not detected
* touchscreens do not have a concept of hover, making it difficult
  to e.g. resize areas
* no touch gesture support, e.g. "pinch-to-zoom"
2024-07-14 15:36:54 +02:00
Felix Zedén Yverås
caae8e7385 fix: improve support for browsers with collapsing url bars
Some mobile browsers (e.g. chrome) uses collapsing url bars (the
bar collapses when you scroll). In such cases, `100vh` typically
refers to the full height of the viewport when the url bar is
collapsed (see also `svh`, `lvh` and `dvh`, e.g. at
<https://ishadeed.com/article/new-viewport-units/#the-small-large-and-dynamic-viewport-units>
). This meant that on my tablet, the editor would extend below the
visible page until I scrolled it into view.

This commit re-uses a fix from some of my other projects
(specifically
<5c7e788d40/src/styles/globals.css (L14-L28)>
) where the root element is set to fill 100% height. This avoids
dealing with viewport units altogether. On my tablet, this means
that the url bar is visible and that the editor does not extend
below the visible page.
2024-07-14 15:36:54 +02:00
1ilit
aecc5a134e Fix choose database not showing on first ever diagram 2024-07-08 01:42:48 +03:00
1ilit
9b606114df Rename TablesContext to DiagramContext 2024-07-04 23:18:20 +03:00
1ilit
a7fd4ec416 Fix select db modal opening after close 2024-07-04 20:57:06 +03:00
1ilit
810afe4bc0 Add enums tab 2024-06-30 13:19:21 +03:00
1ilit
d79b0c205d Return types after import 2024-06-27 11:12:09 +03:00
1ilit
b13d576c5e Require selecting a db on new diagrams 2024-06-09 18:10:51 +03:00
1ilit
be6ecb066c Load types for selected db 2024-06-06 20:24:05 +03:00
pvhieu
e30a84398f Fix: load name of lastest modified diagram 2024-05-19 10:17:01 +07:00
1ilit
83985ba188 Clean up workspace 2024-04-05 22:09:43 +03:00
1ilit
afa8fca00c Fix import 2024-04-05 06:32:35 +03:00
1ilit
8cf95a9a06 Fix imports for hooks 2024-04-05 05:12:50 +03:00
1ilit
9df9527950 Reorganize files 2024-04-01 19:44:50 +03:00
1ilit
3ec93f42c6 Make variable naming consistent 2024-03-15 16:37:22 +02:00
1ilit
1132edbbb3 Abstract save state from editor 2024-03-15 16:00:23 +02:00