Skip to content

Commit

Permalink
Merge pull request #17 from syncosaurus/CR-diagrams
Browse files Browse the repository at this point in the history
feat(diag): add static OT and CRDT diagrams
  • Loading branch information
sklarfox authored Apr 25, 2024
2 parents e9f1fd8 + 1de2169 commit 9d04174
Show file tree
Hide file tree
Showing 9 changed files with 440 additions and 200 deletions.
33 changes: 0 additions & 33 deletions src/components/Diagrams/allDiagrams.js

This file was deleted.

36 changes: 10 additions & 26 deletions src/components/Diagrams/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -347,42 +347,26 @@ export const DashboardArchitecture = () => {

export const CRDT = () => {
return (
<figure>
<object
type="image/svg+xml"
data="/img/diagrams/diag-CRDT.svg"
className="w-96"
></object>
className="w-8/12"
></object>
<figcaption></figcaption>
</figure>
)
}

export const OT = () => {
return (
<object
type="image/svg+xml"
data="/img/diagrams/diag-OT.svg"
className="w-96"
></object>
)
}

export const SyncingModel2 = () => {
return (
<div className="flex justify-center mt-24">
<figure>
<object
type="image/svg+xml"
data="/img/diagrams/diag-syncingModel-2.svg"
className="h-64"
data="/img/diagrams/diag-OT.svg"
className="w-8/12"
></object>
</div>
)
}

export const Template = () => {
return (
<object
type="image/svg+xml"
data="/img/diagrams/diag-Template.svg"
className="w-96"
></object>
<figcaption></figcaption>
</figure>
)
}
4 changes: 2 additions & 2 deletions src/components/LatencySlider/LatencySlider.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default function LatencySlider() {
}

return (
<>
<div className="flex justify-start w-auto">
<FormControl sx={{ display: 'inline-block' }}>
<FormHelperText sx={{ fontSize: '17px' }}>Latency</FormHelperText>
<Select
Expand Down Expand Up @@ -51,6 +51,6 @@ export default function LatencySlider() {
handleMainSliderChange={handleMainSliderChange}
/>
</VerticalSliderContainer>
</>
</div>
)
}
5 changes: 3 additions & 2 deletions src/components/LatencySlider/VerticalSliderContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ const VerticalSliderContainer = styled(Box)(({ theme }) => ({
display: 'inline-block',
justifyContent: 'center',
alignItems: 'center',
padding: '3rem',
padding: '2rem',
marginBottom: '0.25rem',
marginRight: '1rem',
marginTop: '0.75rem',
gap: theme.spacing(50, 'auto'), // Adjust the gap between sliders
gap: theme.spacing(20, 'auto'), // Adjust the gap between sliders
}))

export default VerticalSliderContainer
2 changes: 0 additions & 2 deletions src/pages/case-study.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import LatencySlider from '@site/src/components/LatencySlider/LatencySlider'
import TodoList from '@site/src/components/TodoList/TodoList'
import Tabs from '@theme/Tabs'
import TabItem from '@theme/TabItem'
import AllDiagrams from '@site/src/components/Diagrams/allDiagrams.js'
import {
Websockets,
AbsoluteUpdates,
Expand All @@ -26,7 +25,6 @@ import {
RelativeUpdate,
StateUpdates,
SyncingModel1,
SyncingModel2,
SyncingModel3,
SyncingModel4,
TimeDrivenMessages,
Expand Down
2 changes: 1 addition & 1 deletion src/theme/MDXPage/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function MDXPage(props) {
/>
</div>
)}
<div className={clsx('col', !hideTableOfContents && 'col')}>
<div className={clsx('col', !hideTableOfContents && 'col--9')}>
{unlisted && <Unlisted />}
<article>
<MDXContent>
Expand Down
291 changes: 224 additions & 67 deletions static/img/diagrams/diag-CRDT.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
237 changes: 184 additions & 53 deletions static/img/diagrams/diag-OT.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 16 additions & 14 deletions static/img/diagrams/diag-cloudflare-architecture.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9d04174

Please sign in to comment.