Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Collapse duplicate moveShape mutations server-side. #3

Merged
merged 1 commit into from
Feb 25, 2021
Merged

Conversation

aboodman
Copy link
Contributor

This is suprisingly more sublte than it at first seems like it would be.

@aboodman aboodman requested review from arv and phritz February 25, 2021 08:24
@vercel
Copy link

vercel bot commented Feb 25, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/rocicorp/replidraw/3CTfsUqzsniVyp4mpWSz764gBjqH
✅ Preview: https://replidraw-git-collapse-rocicorp.vercel.app

This is suprisingly more subtle than it at first seems like it would be.
@@ -1,5 +0,0 @@
export class UserError extends Error {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the concept of UserError.

Working with these backends is already subtle and having this extra error mode makes it more so.

This means that the system is going to bias toward failing in the stuck direction, which also isn't good.

I'm not sure what the solution is, but opting for simplicity for now.

@aboodman aboodman merged commit 1b67666 into master Feb 25, 2021
Copy link
Contributor

@arv arv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

return;
}
// Scan forward from here collapsing any collapsable mutations.
for (let mutation: Mutation; mutation = push.mutations[i]; i++) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading out of bounds deopts. Please check the length

@@ -78,6 +89,16 @@ export default async (req: NextApiRequest, res: NextApiResponse) => {
res.status(200).json({});
};

// If prev and next are collapsible, collapse them by mutating next.
function collapse(prev: Mutation, next: Mutation): boolean {
if (prev.name == 'moveShape' && next.name == 'moveShape') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

=== -- get into the habit

aboodman added a commit that referenced this pull request Mar 2, 2021
aboodman added a commit to rocicorp/reflect-draw that referenced this pull request Jan 29, 2022
b91492f Cannot expose LogContext to caller of createDatabase
967cd93 More extensive logging
26d121f Add requirement on node 16+ - we need it for perf hooks
961c80c Make log level configurable
5a7e9a3 Add some log lines for timing
f66a3a1 Make Replicachea a dev dependency
22c070a Update replicache to b328e1b9dc1dd5c9a9772a1c54be386f43facde6
b03d14b Remove unnecessary import
779b927 argh
fd49270 no test script 😬
503a429 Re-export Replicache
f24cff2 Finish including client
dedd922 format
440a452 recombine client and server into one npm package
e751de2 build appears to succeed
b73b64d Get build-dts working
0827ebb lint
f1b263c format
4ea8ba5 wip - creating a server package.
ce47443 Rename rs->server move client out to root
55185d9 Remove nodemon
fdf79c0 Remove tsconfig.server.json
c9d7854 Remove app util dir
714ad5d Remove the app
9c94319 Move Connection class into rs dir for now
6b002b4 Update replicache
74c17cc Move main to top level
345e2ea Pass mutators into server
b3bcce9 There will be two util directories, because eventually rs will be its own projects.
033f2ee Pull the datamodel types into their own directory separate from frontend since they are used by backend too!
fbaa261 Remove app-specific types from protocol directory
ce36546 Move protocol into rs dir
d9967d3 Create a new `rs` directory and put most of the server in there.
8e81e96 Merge pull request #23 from rocicorp/ping
03bd9a7 Add a periodic ping to test connection health.
6b32f15 Disconnect on out of order poke.
14bb588 Whoops, misunderstood the signature to TDigest.
f038fca Reconnect on push.
d707fbe Abstract all the connection goop into a new Connection class.
62e502e Update STATUS
1b37f4e Update STATUS
b854299 Update STATUS
ed83544 Add an explicit connected message to delay first push until everything is setup.
1b417ef Move offset calc to first push to avoid including connection setup overhead in it.
4b87f00 Remove sleep
54b0d75 Make the tests compile again (not sure how well they run)
aa22fb5 Fix bug in delete implementation
cd982ad update status
02c42ee Implement precise playback
9371090 Update replicache to version that sends timestamps
720b56b Only send new messages over socket
16222ab Also track push gap
c0b30b0 Abstract GapTracker utility. Move util directory since used by fe and be.
e20b80c Add a histogram of frame times to server
6ff4d64 Switch to proper histogram
96c4422 Add STATUS
4273b84 Add 200ms simulated delay to pushes
16751b2 Fix tiny bug in frame bound calculation
2a917e6 Initial client integration!
d10eae5 Little improvement to sandbox
4a41a4c Integration
141049f Implement processPending
9c7048c Forgot to test one case
e4895dd Merge pull request #15 from aboodman/process-room
2d4fc0c Implement processRoom()
1c9e2d0 Merge pull request #14 from aboodman/fast-forward
638f3cc Implement fast-forward.
ee60ce0 Merge pull request #13 from aboodman/refactor
876a68d Refactor: move server.ts into subdir and break into pieces.
3e37b87 Merge pull request #12 from aboodman/process-frame
9ada9df Implement processFrame.
f401013 Merge pull request #11 from aboodman/generate-merged-mutations
e59cec0 Implement generateMergedMutations
6a366bf Refactor - just moving files into directories.
444fca6 Merge pull request #10 from aboodman/process-mutation
245e90c Implement processMutation.
3575a9c Merge pull request #9 from aboodman/integration
6fde3a2 Integration testing always reveals some minor problem :-).
e913d77 Merge pull request #8 from aboodman/push
62cb238 Implement push
0b2f985 Merge pull request #7 from rocicorp/connect
06c5226 Implement connect().
4f7b7c3 Remove server.ts, it's getting rewritten
3e67e1c Merge pull request #6 from aboodman/async-loop
4393519 Implement AsyncLoop.
dc16b38 Merge pull request #5 from aboodman/get-patch
2a51a5d Implement getPatch().
42dd9e9 Merge pull request #4 from aboodman/replicache-transaction
6a46a6e Implement ReplicacheTransaction.
80ed167 Merge pull request #3 from aboodman/entry-cache
e8f015f Define Storage interface and add DBStorage and EntryCache impls.
9e61b7f Merge pull request #2 from rocicorp/storage-schema
51266f9 Add {get,put,del}Entry
01da365 Remove most of old contents of data[.test].ts.
0b3f0c9 Add storage types
655cf78 Merge pull request #1 from aboodman/cleanups
9e50e59 Update the protocol datatypes to match the design doc.
714a6ce Move schemas->protocol because there will be backend-specific schemas.
5e57e37 Move createDatabase to data.ts since it's not pg-generic.
a8adc39 Rename: db->pg to be more specific. These are postgres utils.
379f3a6 Remove a bunch of old stuff we won't be needing
c482208 Upgrade to Next 12.0.4 to fix vercel/next.js#30078
4db567e Specify latest engine
4ea1843 Attempt to make Heroku review apps work
e4623b0 Fix: Wait for "open" event on socket before using.
dd6c382 Remove hmr support, we're not using the built-in next dev support.
bf5c2cf Bug: shape ids containing dashes not displayed
7758f1c Update README.md
e84910b Update README.md
2e64f54 Update README.md
bf1b77f Upgrade to Replicache 8.0.
51763d0 Implement push, pull, poke over websocket.
25d50d7 Upgrade typescript
498f99f Remove unused pages
8478f58 Fix crossorigin warning
ee73552 Add a custom server
440a64d Initial commit from Create Next App
2d0bfff Move to postgres, also replace io-ts with zod.
3ee9779 Merge pull request #61 from rocicorp/review
ce192f5 Respond to review: rocicorp/replidraw#56
3f6626f Merge pull request #56 from rocicorp/cleanup
db67831 Skip eslint on Next build
30d1d44 Add comment
70e9d27 Move initShapes to frontend
add66bc Use a smaller docid
d27f89f Get rid of Data helper class
7f327d9 Factor out subscriptons.ts for symetry with mutations.js.
a20b924 Move contents of "shared" directory into "frontend".
385b5d3 Get rid of "Storage" abstraction and instead implement Replicache's WriteTransaction directly. This allows Replicache mutator definitions to be directly used in replicache-push.ts.
497151c Add tabwidth and spaces to prettier
a866955 Add comment explaining why we need to wait for trigger().
593b4c2 Update to use Replicache 7.0.0.
cec5cf4 Replicache 6.4
d29f4a0 Use next 11
74032c2 Update README
44e8303 Use replicache-react instead
8014291 Use nanoid
c7d17b5 Switch Replidraw from per-document version number to LastUpdated.
cb4a65a Further futz with smoothing
7981436 Cycle colors rather than randomly select them
d42b7a2 Smooth out the animations a bit more.
0383f80 format
d6f4868 more words
94e0721 Wordsmithing about dialog
78d3e6c Merge pull request #46 from aboodman/default-server
fedf9be Default shapes on server side rather than client.
700e35f Merge pull request #45 from aboodman/about
1268bcb Add "Share" and "Learn More" toolbar items.
53f2902 Merge pull request #44 from aboodman/shallow-equal
8a0234b Remove heavy deep-equal dependency.
35294e9 Merge pull request #43 from aboodman/default-data
b1ffda7 Default some shapes when a new document starts.
2af89a0 Update to Replicache 6.2.0
2593b5e Merge pull request #41 from rocicorp/rotate-better
52972f0 Fix the display of the clear button.
4b299bf Merge pull request #40 from rocicorp/docs
94ae63f Introduce a very simple concept of separate "documents" to Replidraw.
583f289 Merge pull request #39 from rocicorp/delete-all
0e20333 Add a "delete all" function.
3c12dc1 Massive improvement to local drag/drop performance of Replidraw.
f2aa0a0 Make /api/init drop any existing database if it exists.
9db0f49 Upgrade Replicache to 6.1.3.
2053cff Fix up setup instructions
2b95094 Add HACKING.md
5ae88d0 Only target modern browsers
35fb9d3 Put a TODO in the not-yet-working nav items
2ed6ac0 Merge pull request #37 from rocicorp/smooth
8d8ec80 Introduce some animation to smooth out the synced motion.
e184cdf Merge pull request #36 from rocicorp/rotate2
bd5cb44 Add rotate!
5219fac Fix display of cursor pointer.
a138dd5 Merge pull request #34 from rocicorp/resize2
91dea68 Add resize.
7f5675d Merge pull request #33 from rocicorp/refactor3
343b15c Refactor: give up on svg layout.
5670f1c Merge pull request #32 from rocicorp/initial-pull
b516620 Do one initial pull on construction.
24ec086 Merge pull request #31 from rocicorp/mobile-safari-gar
6e79eb5 Fix layout bug on mobile safari when cursors are off screen.
c54ffab Merge pull request #13 from rocicorp/bump
7462f7b Upgrade to Replicache 6.0.0-beta.3
4021673 Merge pull request #29 from rocicorp/mobile-safari
cfac798 Make work on better tablet Safari. Still kinda shit on iPhone :(.
4902f91 Merge pull request #28 from rocicorp/safari
b7fe2b8 Fix Safari
77a9db1 Merge pull request #27 from rocicorp/timeout-fix
f45766a Fix cursor timeout
20f0d30 Merge pull request #26 from rocicorp/selections-followup
8d66701 I realized there was a simpler way to phrase the move detection logic for collaborator cursors.
641e8d5 Merge pull request #25 from rocicorp/selections
2d32a54 Render selections - both self and collaborators.
988dbec Don't highlight on mouseover during drag.
aa2c5c2 I didn't know about movementX/Y. That simplifies the drag code.
475b3b3 Merge pull request #24 from rocicorp/hide-stale-cursors2
a91dc7c Hide cursors that haven't moved in 5s.
274a271 Merge pull request #21 from rocicorp/cr
903907f Minor cleanup to import.
18e27e4 Add an overview comment for push.
c6a659b Use shorthand margin syntax.
84b4fc1 Pull out ReadStorage and WriteStorage to avoid need for runtime exceptions.
3c43ff8 Add a comment explaining backend schema.
5a12754 Fix randInt function to have uniform distribution.
5399818 Merge pull request #20 from rocicorp/error
5e727e4 Fix error where `fill` would ocassionally be `undefined` due to OOB access of array because bad rand math.
4ed34f8 Merge pull request #19 from rocicorp/delete
b7c3f0b Implement deletion (via backspace/delete key).
addcf3a Merge pull request #18 from rocicorp/selection
191deb0 Track selected shape
bef5199 Merge pull request #17 from rocicorp/safari
c58da22 Fix nav rendering on Safari.
4a14f24 Merge pull request #16 from rocicorp/visual
01f8598 Three minor visual fixes:
928b058 Merge pull request #15 from rocicorp/dragging-kills-server
f6e194f Collapse mutations a different way.
364727b Merge pull request #14 from rocicorp/cleanup
0d5009c Remove duplicate extraneous push at startup.
10be37c Little logging cleanup
35ecbb3 Merge pull request #12 from rocicorp/cursors
adb5d36 Show collaborator cursors.
27c2413 Merge pull request #11 from rocicorp/user-chip
0c69432 Add a user chip with a randomly chosen username and avatar.
b86df1c Merge pull request #10 from rocicorp/refactor2
2379f77 Change the way registration of mutators is done with Replicache.
b1a595e Merge pull request #9 from rocicorp/cr
162630d Response to code review: rocicorp/replidraw#5
dc8a01c Response to code review: rocicorp/replidraw#3
1b38c44 Merge pull request #8 from rocicorp/refactor
bae8537 Refactor separate ClientState and Shape tables in MySQL down to single Object table.
5e9b28d Merge pull request #7 from rocicorp/selection
7a7866d Only pull() in response to poke, not push.
b9db7c5 Implement ClientState entity for highlight. This is how all the per-client state is going to work, like selected item, cursor position, etc.
83a1634 Merge pull request #5 from rocicorp/diff-cookie-based
fc60ff1 wip
12db5c7 Use the figma selection color
2ae671c Remove no-longer used deps
af8244d Link Replicache wasm differently to avoid vercel error
17718ea Fix naming of Rect
2997017 Remove unused attributes from Rect
c1c8899 Start to make look more like Figma
d1afbf5 prettier
1b67666 Merge pull request #3 from rocicorp/collapse
6544e56 Collapse neighboring moveShape mutations server-side.
a4c6c2f Merge pull request #2 from rocicorp/rds-backend
bf42a74 Rename src->frontend
e220983 Finish wiring up push and pull for RDS. Remove all the old backends.
d064963 Add logging
ced16b5 Add first little bit of rds backend
311a753 add param to control consistency level
e359217 Add pull
3d90acd Add cosmosdb push test
48f9454 Add replicache-pull-supabase.ts test
fe2a7b6 parallel
4a2ad2f parallel requests suprisingly slow
14c3e60 Add a little test for supabase.
c26faed regen yarn.lock
de29304 Remove a bunch of now-unneeded deps
c77322f Put up an echo endpoint just to get a minimum bound on latency.
16d8cbd Add some more logging
2043e25 Use Replicache 5.2
d223410 Update README.md
059d4e3 Update README.md
b8dc701 Update README.md
99e157c Update README.md
831118d Move the blocks in 20 step increments for demo purposes until sync is faster :).
4160d71 Give it a little more breathing room
1ec2d70 Remove one more unneeded file.
c57a5a5 Remove a bunch of code from original demo
7651de4 Calling in defeat on this one for now. Will wait for real fix: rocicorp/replicache#277
32246f0 Use the smallest possible delay that is truthy
13119e1 Implment mousemove via keyboard.
3019024 Add pusher.
14af206 ... and Replicache wants json.
a5ecf31 Whoops. I always forget to send a response.
c728273 Send all transactions in a batch to fauna just to see how that goes.
321718a Add initial batch endpoint
87c9db0 Switch to in-memory fork of Replicache. Now dragdrop is fast!
a328385 Merge branch 'master' of github.com:rocicorp/replidraw
e04f2fa Add very, very slow drag+drop.
6cf46c1 Highlight hovered shape
d4610d9 yarn.lock
4172e4b Upgrade replicache-react-util.
ae28523 Update README.md
a0fa079 Size background pattern correctly
6f49b51 * Move to Typescript * Introduce a little data abstraction layer
58d5470 All the blocks are rendering now
3c85ee1 Start re-building the component hierarchy from ground up, because we're going to have each component subscribe to React separately to optimize re-renders.
7061208 Remove unneeded sample styles
d57f9c2 Merge branch 'master' of github.com:rocicorp/replidraw
3694328 Hook up to faunadb!
3f0e162 Update README.md
6bc421f Update README.md
bf08d65 hack
27d8155 env
edf96d4 README
02de58b chances seem low?
aeba6e6 Remove other old stuff
186c062 🤷‍♀️
6427866 remove other old stuff
c6adb56 hook up read-only
85b2418 Get rid of more react complaints
8c3fea5 Serve a client view
3c4112b fix next warnings
58472d2 Replicache instanciates
7d109ae Remove a bunch of unneeded deps
fe962c1 Remove some unneeded stuff
0f62419 ho shit, it renders
dd663f2 Initial commit
f19e169 Update LICENSE
79b2118 Bump to v1.1.1
521fa46 Update package.json
e67ed09 Bump version to 1.1.0
3870b99 Merge pull request #38 from othree/fix/example-link
64d808c Merge pull request #37 from othree/feature/reorg-script-deps
8ae2169 Move two package to dependencies
e23ab23 Babel related packages are only required by prepare.
9956ac3 Avoid use npm run build to build package
5ab25af Update the example link in README
cd20f04 Removed the "no longer maintained" notice
785844d Bump version to 1.0.9
62a5264 Merge pull request #34 from wassgha/responsive
ba51579 Added github to contributors
83fb357 Merge pull request #31 from wassgha/ui-fixes
24d8176 Minor styling change
f47e165 Implemented responsive previews
88d8b10 Fixed color picker, switched to relative positioning of elements and better styling
0b3f835 Fixed issue while publishing on npm
a350b37 Merge pull request #29 from wassgha/upgrades
ef6c130 Fixed text rotation issue, cleaned up text component code and added font list sortiing
afaffec Reverted font input to select from autocomplete (styling issues)
93285af Removed the Panel component in favor of React.Component
1eaf341 Upgraded all dependencies to their latest version
4e7455c Update README.md
cab6e6d Update README.md
817ac0d Update README.md
830d55e Merge pull request #21 from thatneat/iamraffe-repair
f4409e2 Merge pull request #20 from thatneat/patch-1
65c9ecb Update LICENSE
697530a Update LICENSE
209c56c Update package.json
af643e4 Update README.md
07d6246 Update README.md
8bc3bea Update README.md
9e26559 Update README.md
ae84af9 Update README.md
468e9b7 Update LICENSE
fa3178a use a better default image
8ead4f9 fix font issues from switch to webfontloader
a2bed8c add contributors
3c917b2 reasonable style for the image drop
ea4324d clean up console logs
ecc5694 serverless image "upload"
7d276c6 typo
99b8276 Adds code refactoring (comments removed)
07e3731 Adds fix on text anchor for text object
e3c92f4 Adds loader upon image upload
4f03c89 Adds a fix on libre bakersville font typo & ref on preview
d07a98a Fixes dum getStyle reference
cbbde09 Fix on font families
1158783 Removes annoying console.log
21a5cd0 Adds image upload
cb47af8 Added react-dropzone
f91b7c6 Adds unsafe-perm on npmrc file & style fiex on handler
b14f248 Adds a class to panel parent
42a7e50 Adds Image object, style fixes on textpanel
34f0d9f Adds webfontloader & 30 google fonts
e2485f3 Adds Title & changes upon upadte
75d2298 Adds fix on Times New Roman font family
749efdf Adds fix for Title
9dfc82a Adds Icon import on Title
1be412e Adds correct export of Title object
1184c22 Adds fix for Title directory import
b95d0ef Adds Times New Roman && Title component
0d2cff8 Adds babel-cli to dependencies
bf14d2e Updates to peerDependencies
9c3c80a Remove build directory
6fd2dad Merge pull request #9 from gitter-badger/gitter-badge
2a256ba Add Gitter badge
46fda2b Merge branch 'master' of https://github.com/fatiherikli/react-designer
5b29607 Release 1.0.8
4686ebe Release 1.0.7 Release 1.0.8
6ed108e Merge branch 'master' of https://github.com/fatiherikli/react-designer
4bf0e31 Merge pull request #6 from slightlytyler/master
e6e14c2 Merge pull request #8 from voronianski/patch-1
00a3e5a remove react && react-dom from dependencies
be5ec3a Add babel-cli to dev dependencies
539fd3b Merge upstream
491ec81 Add npm clean script
fa1bbdf Fix `Attempted to redefine property` error on Safari
387d112 Update release notes
8a416ff Update release notes
1881fe9 Release 1.0.6
ff166e2 Add the library directory
b262ac2 Bump version
2ee81c3 Fix the entry point
af0c10f Add prepublish to package.json and correct entry point
3d048e2 Fix the link of `Malevich` example
8064f81 Update demo page
49fa7bf Fix the static path
e2d1142 Update the formatting of code blocks
cc64637 Typo
dbcf012 Update README
0ccc3ca Update README, and format the fixture data of examples
c1c8bf2 Initial commit
REVERT: 4e4f5c2 OK it connects with miniflare, wrangler dev, and on prod!
REVERT: 0ec4bc6 rename
REVERT: bb015d8 nwip: attempt to wire up the durable object
REVERT: 56b043b add server/server -> no test though :(
REVERT: ad2763c Add server/message
REVERT: f940901 add server/push
REVERT: f5b4983 Add server/ping
REVERT: b3ed182 Add server/connect
REVERT: b59512f Add processPending
REVERT: 13f2a1f Add processRoom
REVERT: db61182 Add generateMergedMutations
REVERT: 5a9f021 Maybe fix eslint error?
REVERT: 732245a Add processFrame
REVERT: b5f0741 Add processMutation
REVERT: 7b26978 Remove room state, we wont have in this version
REVERT: 3131b53 Add ff.
REVERT: bfac12f storage abstraction and util
REVERT: b55daaa Add src/db directory and tests
REVERT: a96e03e Upgrade to `miniflare@2.0.0`
REVERT: fbf3fcb Add Durable Object migration to allow deployment
REVERT: bc2391a Use `ts-jest`, closes #1, and fixes debugging
REVERT: 0060c0b Fix `module` path in `package.json`
REVERT: b4c9b96 Add `@jest` to build `external`s, closes #2
REVERT: 6bf5e1a Update README.md
REVERT: 1469c51 Add some comments to `counter.spec.ts`
REVERT: fcd5f82 Initial commit

git-subtree-dir: reps
git-subtree-split: b91492f055f8907cbe27ed7c031a115451db6062
aboodman added a commit to rocicorp/reflect-draw that referenced this pull request Jan 29, 2022
ea03af8 add client.ts root file
5c99952 Add client directory
f936abe Fix compile error
4e4f5c2 OK it connects with miniflare, wrangler dev, and on prod!
0ec4bc6 rename
bb015d8 nwip: attempt to wire up the durable object
56b043b add server/server -> no test though :(
ad2763c Add server/message
f940901 add server/push
f5b4983 Add server/ping
b3ed182 Add server/connect
b59512f Add processPending
13f2a1f Add processRoom
db61182 Add generateMergedMutations
5a9f021 Maybe fix eslint error?
732245a Add processFrame
b5f0741 Add processMutation
7b26978 Remove room state, we wont have in this version
3131b53 Add ff.
bfac12f storage abstraction and util
b55daaa Add src/db directory and tests
a96e03e Upgrade to `miniflare@2.0.0`
fbf3fcb Add Durable Object migration to allow deployment
bc2391a Use `ts-jest`, closes #1, and fixes debugging
0060c0b Fix `module` path in `package.json`
b4c9b96 Add `@jest` to build `external`s, closes #2
6bf5e1a Update README.md
1469c51 Add some comments to `counter.spec.ts`
fcd5f82 Initial commit
REVERT: b91492f Cannot expose LogContext to caller of createDatabase
REVERT: 967cd93 More extensive logging
REVERT: 26d121f Add requirement on node 16+ - we need it for perf hooks
REVERT: 961c80c Make log level configurable
REVERT: 5a7e9a3 Add some log lines for timing
REVERT: f66a3a1 Make Replicachea a dev dependency
REVERT: 22c070a Update replicache to b328e1b9dc1dd5c9a9772a1c54be386f43facde6
REVERT: b03d14b Remove unnecessary import
REVERT: 779b927 argh
REVERT: fd49270 no test script 😬
REVERT: 503a429 Re-export Replicache
REVERT: f24cff2 Finish including client
REVERT: dedd922 format
REVERT: 440a452 recombine client and server into one npm package
REVERT: e751de2 build appears to succeed
REVERT: b73b64d Get build-dts working
REVERT: 0827ebb lint
REVERT: f1b263c format
REVERT: 4ea8ba5 wip - creating a server package.
REVERT: ce47443 Rename rs->server move client out to root
REVERT: 55185d9 Remove nodemon
REVERT: fdf79c0 Remove tsconfig.server.json
REVERT: c9d7854 Remove app util dir
REVERT: 714ad5d Remove the app
REVERT: 9c94319 Move Connection class into rs dir for now
REVERT: 6b002b4 Update replicache
REVERT: 74c17cc Move main to top level
REVERT: 345e2ea Pass mutators into server
REVERT: b3bcce9 There will be two util directories, because eventually rs will be its own projects.
REVERT: 033f2ee Pull the datamodel types into their own directory separate from frontend since they are used by backend too!
REVERT: fbaa261 Remove app-specific types from protocol directory
REVERT: ce36546 Move protocol into rs dir
REVERT: d9967d3 Create a new `rs` directory and put most of the server in there.
REVERT: 8e81e96 Merge pull request #23 from rocicorp/ping
REVERT: 03bd9a7 Add a periodic ping to test connection health.
REVERT: 6b32f15 Disconnect on out of order poke.
REVERT: 14bb588 Whoops, misunderstood the signature to TDigest.
REVERT: f038fca Reconnect on push.
REVERT: d707fbe Abstract all the connection goop into a new Connection class.
REVERT: 62e502e Update STATUS
REVERT: 1b37f4e Update STATUS
REVERT: b854299 Update STATUS
REVERT: ed83544 Add an explicit connected message to delay first push until everything is setup.
REVERT: 1b417ef Move offset calc to first push to avoid including connection setup overhead in it.
REVERT: 4b87f00 Remove sleep
REVERT: 54b0d75 Make the tests compile again (not sure how well they run)
REVERT: aa22fb5 Fix bug in delete implementation
REVERT: cd982ad update status
REVERT: 02c42ee Implement precise playback
REVERT: 9371090 Update replicache to version that sends timestamps
REVERT: 720b56b Only send new messages over socket
REVERT: 16222ab Also track push gap
REVERT: c0b30b0 Abstract GapTracker utility. Move util directory since used by fe and be.
REVERT: e20b80c Add a histogram of frame times to server
REVERT: 6ff4d64 Switch to proper histogram
REVERT: 96c4422 Add STATUS
REVERT: 4273b84 Add 200ms simulated delay to pushes
REVERT: 16751b2 Fix tiny bug in frame bound calculation
REVERT: 2a917e6 Initial client integration!
REVERT: d10eae5 Little improvement to sandbox
REVERT: 4a41a4c Integration
REVERT: 141049f Implement processPending
REVERT: 9c7048c Forgot to test one case
REVERT: e4895dd Merge pull request #15 from aboodman/process-room
REVERT: 2d4fc0c Implement processRoom()
REVERT: 1c9e2d0 Merge pull request #14 from aboodman/fast-forward
REVERT: 638f3cc Implement fast-forward.
REVERT: ee60ce0 Merge pull request #13 from aboodman/refactor
REVERT: 876a68d Refactor: move server.ts into subdir and break into pieces.
REVERT: 3e37b87 Merge pull request #12 from aboodman/process-frame
REVERT: 9ada9df Implement processFrame.
REVERT: f401013 Merge pull request #11 from aboodman/generate-merged-mutations
REVERT: e59cec0 Implement generateMergedMutations
REVERT: 6a366bf Refactor - just moving files into directories.
REVERT: 444fca6 Merge pull request #10 from aboodman/process-mutation
REVERT: 245e90c Implement processMutation.
REVERT: 3575a9c Merge pull request #9 from aboodman/integration
REVERT: 6fde3a2 Integration testing always reveals some minor problem :-).
REVERT: e913d77 Merge pull request #8 from aboodman/push
REVERT: 62cb238 Implement push
REVERT: 0b2f985 Merge pull request #7 from rocicorp/connect
REVERT: 06c5226 Implement connect().
REVERT: 4f7b7c3 Remove server.ts, it's getting rewritten
REVERT: 3e67e1c Merge pull request #6 from aboodman/async-loop
REVERT: 4393519 Implement AsyncLoop.
REVERT: dc16b38 Merge pull request #5 from aboodman/get-patch
REVERT: 2a51a5d Implement getPatch().
REVERT: 42dd9e9 Merge pull request #4 from aboodman/replicache-transaction
REVERT: 6a46a6e Implement ReplicacheTransaction.
REVERT: 80ed167 Merge pull request #3 from aboodman/entry-cache
REVERT: e8f015f Define Storage interface and add DBStorage and EntryCache impls.
REVERT: 9e61b7f Merge pull request #2 from rocicorp/storage-schema
REVERT: 51266f9 Add {get,put,del}Entry
REVERT: 01da365 Remove most of old contents of data[.test].ts.
REVERT: 0b3f0c9 Add storage types
REVERT: 655cf78 Merge pull request #1 from aboodman/cleanups
REVERT: 9e50e59 Update the protocol datatypes to match the design doc.
REVERT: 714a6ce Move schemas->protocol because there will be backend-specific schemas.
REVERT: 5e57e37 Move createDatabase to data.ts since it's not pg-generic.
REVERT: a8adc39 Rename: db->pg to be more specific. These are postgres utils.
REVERT: 379f3a6 Remove a bunch of old stuff we won't be needing
REVERT: c482208 Upgrade to Next 12.0.4 to fix vercel/next.js#30078
REVERT: 4db567e Specify latest engine
REVERT: 4ea1843 Attempt to make Heroku review apps work
REVERT: e4623b0 Fix: Wait for "open" event on socket before using.
REVERT: dd6c382 Remove hmr support, we're not using the built-in next dev support.
REVERT: bf5c2cf Bug: shape ids containing dashes not displayed
REVERT: 7758f1c Update README.md
REVERT: e84910b Update README.md
REVERT: 2e64f54 Update README.md
REVERT: bf1b77f Upgrade to Replicache 8.0.
REVERT: 51763d0 Implement push, pull, poke over websocket.
REVERT: 25d50d7 Upgrade typescript
REVERT: 498f99f Remove unused pages
REVERT: 8478f58 Fix crossorigin warning
REVERT: ee73552 Add a custom server
REVERT: 440a64d Initial commit from Create Next App
REVERT: 2d0bfff Move to postgres, also replace io-ts with zod.
REVERT: 3ee9779 Merge pull request #61 from rocicorp/review
REVERT: ce192f5 Respond to review: rocicorp/replidraw#56
REVERT: 3f6626f Merge pull request #56 from rocicorp/cleanup
REVERT: db67831 Skip eslint on Next build
REVERT: 30d1d44 Add comment
REVERT: 70e9d27 Move initShapes to frontend
REVERT: add66bc Use a smaller docid
REVERT: d27f89f Get rid of Data helper class
REVERT: 7f327d9 Factor out subscriptons.ts for symetry with mutations.js.
REVERT: a20b924 Move contents of "shared" directory into "frontend".
REVERT: 385b5d3 Get rid of "Storage" abstraction and instead implement Replicache's WriteTransaction directly. This allows Replicache mutator definitions to be directly used in replicache-push.ts.
REVERT: 497151c Add tabwidth and spaces to prettier
REVERT: a866955 Add comment explaining why we need to wait for trigger().
REVERT: 593b4c2 Update to use Replicache 7.0.0.
REVERT: cec5cf4 Replicache 6.4
REVERT: d29f4a0 Use next 11
REVERT: 74032c2 Update README
REVERT: 44e8303 Use replicache-react instead
REVERT: 8014291 Use nanoid
REVERT: c7d17b5 Switch Replidraw from per-document version number to LastUpdated.
REVERT: cb4a65a Further futz with smoothing
REVERT: 7981436 Cycle colors rather than randomly select them
REVERT: d42b7a2 Smooth out the animations a bit more.
REVERT: 0383f80 format
REVERT: d6f4868 more words
REVERT: 94e0721 Wordsmithing about dialog
REVERT: 78d3e6c Merge pull request #46 from aboodman/default-server
REVERT: fedf9be Default shapes on server side rather than client.
REVERT: 700e35f Merge pull request #45 from aboodman/about
REVERT: 1268bcb Add "Share" and "Learn More" toolbar items.
REVERT: 53f2902 Merge pull request #44 from aboodman/shallow-equal
REVERT: 8a0234b Remove heavy deep-equal dependency.
REVERT: 35294e9 Merge pull request #43 from aboodman/default-data
REVERT: b1ffda7 Default some shapes when a new document starts.
REVERT: 2af89a0 Update to Replicache 6.2.0
REVERT: 2593b5e Merge pull request #41 from rocicorp/rotate-better
REVERT: 52972f0 Fix the display of the clear button.
REVERT: 4b299bf Merge pull request #40 from rocicorp/docs
REVERT: 94ae63f Introduce a very simple concept of separate "documents" to Replidraw.
REVERT: 583f289 Merge pull request #39 from rocicorp/delete-all
REVERT: 0e20333 Add a "delete all" function.
REVERT: 3c12dc1 Massive improvement to local drag/drop performance of Replidraw.
REVERT: f2aa0a0 Make /api/init drop any existing database if it exists.
REVERT: 9db0f49 Upgrade Replicache to 6.1.3.
REVERT: 2053cff Fix up setup instructions
REVERT: 2b95094 Add HACKING.md
REVERT: 5ae88d0 Only target modern browsers
REVERT: 35fb9d3 Put a TODO in the not-yet-working nav items
REVERT: 2ed6ac0 Merge pull request #37 from rocicorp/smooth
REVERT: 8d8ec80 Introduce some animation to smooth out the synced motion.
REVERT: e184cdf Merge pull request #36 from rocicorp/rotate2
REVERT: bd5cb44 Add rotate!
REVERT: 5219fac Fix display of cursor pointer.
REVERT: a138dd5 Merge pull request #34 from rocicorp/resize2
REVERT: 91dea68 Add resize.
REVERT: 7f5675d Merge pull request #33 from rocicorp/refactor3
REVERT: 343b15c Refactor: give up on svg layout.
REVERT: 5670f1c Merge pull request #32 from rocicorp/initial-pull
REVERT: b516620 Do one initial pull on construction.
REVERT: 24ec086 Merge pull request #31 from rocicorp/mobile-safari-gar
REVERT: 6e79eb5 Fix layout bug on mobile safari when cursors are off screen.
REVERT: c54ffab Merge pull request #13 from rocicorp/bump
REVERT: 7462f7b Upgrade to Replicache 6.0.0-beta.3
REVERT: 4021673 Merge pull request #29 from rocicorp/mobile-safari
REVERT: cfac798 Make work on better tablet Safari. Still kinda shit on iPhone :(.
REVERT: 4902f91 Merge pull request #28 from rocicorp/safari
REVERT: b7fe2b8 Fix Safari
REVERT: 77a9db1 Merge pull request #27 from rocicorp/timeout-fix
REVERT: f45766a Fix cursor timeout
REVERT: 20f0d30 Merge pull request #26 from rocicorp/selections-followup
REVERT: 8d66701 I realized there was a simpler way to phrase the move detection logic for collaborator cursors.
REVERT: 641e8d5 Merge pull request #25 from rocicorp/selections
REVERT: 2d32a54 Render selections - both self and collaborators.
REVERT: 988dbec Don't highlight on mouseover during drag.
REVERT: aa2c5c2 I didn't know about movementX/Y. That simplifies the drag code.
REVERT: 475b3b3 Merge pull request #24 from rocicorp/hide-stale-cursors2
REVERT: a91dc7c Hide cursors that haven't moved in 5s.
REVERT: 274a271 Merge pull request #21 from rocicorp/cr
REVERT: 903907f Minor cleanup to import.
REVERT: 18e27e4 Add an overview comment for push.
REVERT: c6a659b Use shorthand margin syntax.
REVERT: 84b4fc1 Pull out ReadStorage and WriteStorage to avoid need for runtime exceptions.
REVERT: 3c43ff8 Add a comment explaining backend schema.
REVERT: 5a12754 Fix randInt function to have uniform distribution.
REVERT: 5399818 Merge pull request #20 from rocicorp/error
REVERT: 5e727e4 Fix error where `fill` would ocassionally be `undefined` due to OOB access of array because bad rand math.
REVERT: 4ed34f8 Merge pull request #19 from rocicorp/delete
REVERT: b7c3f0b Implement deletion (via backspace/delete key).
REVERT: addcf3a Merge pull request #18 from rocicorp/selection
REVERT: 191deb0 Track selected shape
REVERT: bef5199 Merge pull request #17 from rocicorp/safari
REVERT: c58da22 Fix nav rendering on Safari.
REVERT: 4a14f24 Merge pull request #16 from rocicorp/visual
REVERT: 01f8598 Three minor visual fixes:
REVERT: 928b058 Merge pull request #15 from rocicorp/dragging-kills-server
REVERT: f6e194f Collapse mutations a different way.
REVERT: 364727b Merge pull request #14 from rocicorp/cleanup
REVERT: 0d5009c Remove duplicate extraneous push at startup.
REVERT: 10be37c Little logging cleanup
REVERT: 35ecbb3 Merge pull request #12 from rocicorp/cursors
REVERT: adb5d36 Show collaborator cursors.
REVERT: 27c2413 Merge pull request #11 from rocicorp/user-chip
REVERT: 0c69432 Add a user chip with a randomly chosen username and avatar.
REVERT: b86df1c Merge pull request #10 from rocicorp/refactor2
REVERT: 2379f77 Change the way registration of mutators is done with Replicache.
REVERT: b1a595e Merge pull request #9 from rocicorp/cr
REVERT: 162630d Response to code review: rocicorp/replidraw#5
REVERT: dc8a01c Response to code review: rocicorp/replidraw#3
REVERT: 1b38c44 Merge pull request #8 from rocicorp/refactor
REVERT: bae8537 Refactor separate ClientState and Shape tables in MySQL down to single Object table.
REVERT: 5e9b28d Merge pull request #7 from rocicorp/selection
REVERT: 7a7866d Only pull() in response to poke, not push.
REVERT: b9db7c5 Implement ClientState entity for highlight. This is how all the per-client state is going to work, like selected item, cursor position, etc.
REVERT: 83a1634 Merge pull request #5 from rocicorp/diff-cookie-based
REVERT: fc60ff1 wip
REVERT: 12db5c7 Use the figma selection color
REVERT: 2ae671c Remove no-longer used deps
REVERT: af8244d Link Replicache wasm differently to avoid vercel error
REVERT: 17718ea Fix naming of Rect
REVERT: 2997017 Remove unused attributes from Rect
REVERT: c1c8899 Start to make look more like Figma
REVERT: d1afbf5 prettier
REVERT: 1b67666 Merge pull request #3 from rocicorp/collapse
REVERT: 6544e56 Collapse neighboring moveShape mutations server-side.
REVERT: a4c6c2f Merge pull request #2 from rocicorp/rds-backend
REVERT: bf42a74 Rename src->frontend
REVERT: e220983 Finish wiring up push and pull for RDS. Remove all the old backends.
REVERT: d064963 Add logging
REVERT: ced16b5 Add first little bit of rds backend
REVERT: 311a753 add param to control consistency level
REVERT: e359217 Add pull
REVERT: 3d90acd Add cosmosdb push test
REVERT: 48f9454 Add replicache-pull-supabase.ts test
REVERT: fe2a7b6 parallel
REVERT: 4a2ad2f parallel requests suprisingly slow
REVERT: 14c3e60 Add a little test for supabase.
REVERT: c26faed regen yarn.lock
REVERT: de29304 Remove a bunch of now-unneeded deps
REVERT: c77322f Put up an echo endpoint just to get a minimum bound on latency.
REVERT: 16d8cbd Add some more logging
REVERT: 2043e25 Use Replicache 5.2
REVERT: d223410 Update README.md
REVERT: 059d4e3 Update README.md
REVERT: b8dc701 Update README.md
REVERT: 99e157c Update README.md
REVERT: 831118d Move the blocks in 20 step increments for demo purposes until sync is faster :).
REVERT: 4160d71 Give it a little more breathing room
REVERT: 1ec2d70 Remove one more unneeded file.
REVERT: c57a5a5 Remove a bunch of code from original demo
REVERT: 7651de4 Calling in defeat on this one for now. Will wait for real fix: rocicorp/replicache#277
REVERT: 32246f0 Use the smallest possible delay that is truthy
REVERT: 13119e1 Implment mousemove via keyboard.
REVERT: 3019024 Add pusher.
REVERT: 14af206 ... and Replicache wants json.
REVERT: a5ecf31 Whoops. I always forget to send a response.
REVERT: c728273 Send all transactions in a batch to fauna just to see how that goes.
REVERT: 321718a Add initial batch endpoint
REVERT: 87c9db0 Switch to in-memory fork of Replicache. Now dragdrop is fast!
REVERT: a328385 Merge branch 'master' of github.com:rocicorp/replidraw
REVERT: e04f2fa Add very, very slow drag+drop.
REVERT: 6cf46c1 Highlight hovered shape
REVERT: d4610d9 yarn.lock
REVERT: 4172e4b Upgrade replicache-react-util.
REVERT: ae28523 Update README.md
REVERT: a0fa079 Size background pattern correctly
REVERT: 6f49b51 * Move to Typescript * Introduce a little data abstraction layer
REVERT: 58d5470 All the blocks are rendering now
REVERT: 3c85ee1 Start re-building the component hierarchy from ground up, because we're going to have each component subscribe to React separately to optimize re-renders.
REVERT: 7061208 Remove unneeded sample styles
REVERT: d57f9c2 Merge branch 'master' of github.com:rocicorp/replidraw
REVERT: 3694328 Hook up to faunadb!
REVERT: 3f0e162 Update README.md
REVERT: 6bc421f Update README.md
REVERT: bf08d65 hack
REVERT: 27d8155 env
REVERT: edf96d4 README
REVERT: 02de58b chances seem low?
REVERT: aeba6e6 Remove other old stuff
REVERT: 186c062 🤷‍♀️
REVERT: 6427866 remove other old stuff
REVERT: c6adb56 hook up read-only
REVERT: 85b2418 Get rid of more react complaints
REVERT: 8c3fea5 Serve a client view
REVERT: 3c4112b fix next warnings
REVERT: 58472d2 Replicache instanciates
REVERT: 7d109ae Remove a bunch of unneeded deps
REVERT: fe962c1 Remove some unneeded stuff
REVERT: 0f62419 ho shit, it renders
REVERT: dd663f2 Initial commit
REVERT: f19e169 Update LICENSE
REVERT: 79b2118 Bump to v1.1.1
REVERT: 521fa46 Update package.json
REVERT: e67ed09 Bump version to 1.1.0
REVERT: 3870b99 Merge pull request #38 from othree/fix/example-link
REVERT: 64d808c Merge pull request #37 from othree/feature/reorg-script-deps
REVERT: 8ae2169 Move two package to dependencies
REVERT: e23ab23 Babel related packages are only required by prepare.
REVERT: 9956ac3 Avoid use npm run build to build package
REVERT: 5ab25af Update the example link in README
REVERT: cd20f04 Removed the "no longer maintained" notice
REVERT: 785844d Bump version to 1.0.9
REVERT: 62a5264 Merge pull request #34 from wassgha/responsive
REVERT: ba51579 Added github to contributors
REVERT: 83fb357 Merge pull request #31 from wassgha/ui-fixes
REVERT: 24d8176 Minor styling change
REVERT: f47e165 Implemented responsive previews
REVERT: 88d8b10 Fixed color picker, switched to relative positioning of elements and better styling
REVERT: 0b3f835 Fixed issue while publishing on npm
REVERT: a350b37 Merge pull request #29 from wassgha/upgrades
REVERT: ef6c130 Fixed text rotation issue, cleaned up text component code and added font list sortiing
REVERT: afaffec Reverted font input to select from autocomplete (styling issues)
REVERT: 93285af Removed the Panel component in favor of React.Component
REVERT: 1eaf341 Upgraded all dependencies to their latest version
REVERT: 4e7455c Update README.md
REVERT: cab6e6d Update README.md
REVERT: 817ac0d Update README.md
REVERT: 830d55e Merge pull request #21 from thatneat/iamraffe-repair
REVERT: f4409e2 Merge pull request #20 from thatneat/patch-1
REVERT: 65c9ecb Update LICENSE
REVERT: 697530a Update LICENSE
REVERT: 209c56c Update package.json
REVERT: af643e4 Update README.md
REVERT: 07d6246 Update README.md
REVERT: 8bc3bea Update README.md
REVERT: 9e26559 Update README.md
REVERT: ae84af9 Update README.md
REVERT: 468e9b7 Update LICENSE
REVERT: fa3178a use a better default image
REVERT: 8ead4f9 fix font issues from switch to webfontloader
REVERT: a2bed8c add contributors
REVERT: 3c917b2 reasonable style for the image drop
REVERT: ea4324d clean up console logs
REVERT: ecc5694 serverless image "upload"
REVERT: 7d276c6 typo
REVERT: 99b8276 Adds code refactoring (comments removed)
REVERT: 07e3731 Adds fix on text anchor for text object
REVERT: e3c92f4 Adds loader upon image upload
REVERT: 4f03c89 Adds a fix on libre bakersville font typo & ref on preview
REVERT: d07a98a Fixes dum getStyle reference
REVERT: cbbde09 Fix on font families
REVERT: 1158783 Removes annoying console.log
REVERT: 21a5cd0 Adds image upload
REVERT: cb47af8 Added react-dropzone
REVERT: f91b7c6 Adds unsafe-perm on npmrc file & style fiex on handler
REVERT: b14f248 Adds a class to panel parent
REVERT: 42a7e50 Adds Image object, style fixes on textpanel
REVERT: 34f0d9f Adds webfontloader & 30 google fonts
REVERT: e2485f3 Adds Title & changes upon upadte
REVERT: 75d2298 Adds fix on Times New Roman font family
REVERT: 749efdf Adds fix for Title
REVERT: 9dfc82a Adds Icon import on Title
REVERT: 1be412e Adds correct export of Title object
REVERT: 1184c22 Adds fix for Title directory import
REVERT: b95d0ef Adds Times New Roman && Title component
REVERT: 0d2cff8 Adds babel-cli to dependencies
REVERT: bf14d2e Updates to peerDependencies
REVERT: 9c3c80a Remove build directory
REVERT: 6fd2dad Merge pull request #9 from gitter-badger/gitter-badge
REVERT: 2a256ba Add Gitter badge
REVERT: 46fda2b Merge branch 'master' of https://github.com/fatiherikli/react-designer
REVERT: 5b29607 Release 1.0.8
REVERT: 4686ebe Release 1.0.7 Release 1.0.8
REVERT: 6ed108e Merge branch 'master' of https://github.com/fatiherikli/react-designer
REVERT: 4bf0e31 Merge pull request #6 from slightlytyler/master
REVERT: e6e14c2 Merge pull request #8 from voronianski/patch-1
REVERT: 00a3e5a remove react && react-dom from dependencies
REVERT: be5ec3a Add babel-cli to dev dependencies
REVERT: 539fd3b Merge upstream
REVERT: 491ec81 Add npm clean script
REVERT: fa1bbdf Fix `Attempted to redefine property` error on Safari
REVERT: 387d112 Update release notes
REVERT: 8a416ff Update release notes
REVERT: 1881fe9 Release 1.0.6
REVERT: ff166e2 Add the library directory
REVERT: b262ac2 Bump version
REVERT: 2ee81c3 Fix the entry point
REVERT: af0c10f Add prepublish to package.json and correct entry point
REVERT: 3d048e2 Fix the link of `Malevich` example
REVERT: 8064f81 Update demo page
REVERT: 49fa7bf Fix the static path
REVERT: e2d1142 Update the formatting of code blocks
REVERT: cc64637 Typo
REVERT: dbcf012 Update README
REVERT: 0ccc3ca Update README, and format the fixture data of examples
REVERT: c1c8bf2 Initial commit

git-subtree-dir: reps
git-subtree-split: ea03af8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants