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

Feat/guide/working with data #449

Merged
merged 63 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
c2eb0e4
WIP
pdaoust Apr 8, 2024
3f6955c
Merge branch 'main' into feat/guide/working-with-data
pdaoust Apr 17, 2024
32e22c0
update link to working with data in main nav
pdaoust Apr 17, 2024
34c25b1
completed draft of working with data page
pdaoust Apr 17, 2024
4a8e9e3
site-wide CSS for mermaid
pdaoust Apr 18, 2024
71e38c0
remove bespoke styling from diagrams on entries page
pdaoust Apr 18, 2024
bd5f342
add/update diagrams on working with data page
pdaoust Apr 18, 2024
ca06101
small text edits
pdaoust Apr 18, 2024
c031650
elide so-called spelling errors
pdaoust Apr 18, 2024
4f941ac
fix broken SVG
pdaoust Apr 18, 2024
829bacc
temp: disable myfonts counter
pdaoust Apr 18, 2024
fe8ab47
fix broken SVG for real
pdaoust Apr 18, 2024
aee3ab2
bisect: disable CRUD SVGs
pdaoust Apr 19, 2024
79cbbf6
bisect: reenable CRUD SVGs, disable first four
pdaoust Apr 19, 2024
f88e251
bisect: reenable middle two
pdaoust Apr 19, 2024
bee73a8
bisect: disable third one
pdaoust Apr 19, 2024
19aec25
bisect: reenable third one, disable fourth one
pdaoust Apr 19, 2024
3b0df5a
reenable first and second
pdaoust Apr 19, 2024
27989d0
bisect: disable third one only
pdaoust Apr 19, 2024
f842076
expand problematic SVG, remove style element
pdaoust Apr 19, 2024
f916095
hotfix: suppress checklinks plugin's error about myfonts counter
pdaoust Apr 19, 2024
f01a707
collapse whitespace in good SVG
pdaoust Apr 19, 2024
f706faa
bisect 2: disable markers
pdaoust Apr 19, 2024
33967e7
bisect 2: enable markers, disable rest of it
pdaoust Apr 19, 2024
c0a7d54
oops, actually do the thing the last commit said
pdaoust Apr 19, 2024
1adcd93
bisect 2: okay, it's all invalid?!
pdaoust Apr 19, 2024
a428860
bisect 2: what the heck Edward
pdaoust Apr 19, 2024
1d93ec8
bisect 2: okay this is getting ridiculous; there's no SVG left almost
pdaoust Apr 19, 2024
7403540
bisect 2: this is preposterous
pdaoust Apr 19, 2024
37594d2
bisect 2: have I just been bisecting the wrong bloody SVG?
pdaoust Apr 19, 2024
424a1d7
bisect 3: remove markers
pdaoust Apr 19, 2024
a5cbe2f
bisect 3: aaand the other half
pdaoust Apr 19, 2024
33212ac
bisect 3: disable edgePaths
pdaoust Apr 19, 2024
9f22fc5
bisect 3: is it inside edgePaths?
pdaoust Apr 19, 2024
8bb37e2
bisect 3: re-enable half of edgePaths
pdaoust Apr 19, 2024
8ff0c96
bisect 3: enable the final 3
pdaoust Apr 19, 2024
9008bb1
bisect 3: there is nothing wrong with this SVG?????git acp bisect
pdaoust Apr 19, 2024
8c24233
the SVG really was never at fault?git acp bisect
pdaoust Apr 19, 2024
4c06e60
are you kidding me??? it only fails when it's been minified?
pdaoust Apr 19, 2024
fc5ff20
note about minifying the problematic SVG
pdaoust Apr 19, 2024
c386493
last attempt at minifying problematic SVG
pdaoust Apr 19, 2024
f9caf08
crazy day - this was the one I was supposed to minify???
pdaoust Apr 19, 2024
c282e1c
bisect 4: this problem really isn't going away yet
pdaoust Apr 19, 2024
5c93dad
bisect 4: do the actual right one
pdaoust Apr 19, 2024
7eef861
bisect 4: disable markers
pdaoust Apr 19, 2024
efd49dd
bisect 4: disable other half
pdaoust Apr 19, 2024
7da917c
bisect 4: disable edgePaths
pdaoust Apr 19, 2024
36424a5
bisect 4: disable edgeLabels
pdaoust Apr 19, 2024
2fcb982
bisect 4: bisect edgeLabels
pdaoust Apr 19, 2024
2b80322
bisect 4: bisect other half of 'em
pdaoust Apr 19, 2024
d6af37f
bisect 4: remove breaks?
pdaoust Apr 19, 2024
e603290
bisect 4: do <br></br> tag pairs trigger the problem?
pdaoust Apr 19, 2024
de0a58b
minimal repro?
pdaoust Apr 19, 2024
74a8558
Revert "minimal repro?"
pdaoust Apr 19, 2024
16a7ffd
Revert "bisect 4: do <br></br> tag pairs trigger the problem?"
pdaoust Apr 19, 2024
6b522ca
replace x markers with arrow markers on DeleteLink
pdaoust Apr 19, 2024
8f86dd6
some text rearranging and editing
pdaoust Apr 19, 2024
fe83297
edits to 'working with data' based on feedback
pdaoust Apr 23, 2024
0302a30
fix broken slug
pdaoust Apr 23, 2024
3e243dc
edits to Working with Data based on Damien's feedback
pdaoust May 3, 2024
74efa34
tiny edits to CRUD text
pdaoust May 13, 2024
70836db
prune/edit content for Working with Data
pdaoust May 24, 2024
6eba232
fix broken link
pdaoust May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .cspell/template-words.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Words found in our template code
brower
# Silly thing that pops up in Mermaid diagrams
CAID
coreconcepts
elif
endfor
Expand All @@ -8,6 +10,8 @@ endlink
endmacro
endrenderlayoutblock
gtag
# Silly thing that pops up in Mermaid diagrams
kafe
katex
layoutblock
MSIE
Expand Down
3 changes: 3 additions & 0 deletions src/client-side/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,6 @@ const openDetailsOnFragmentIdNavigation = () => {
openDetailsOnFragmentIdNavigation();
window.addEventListener("hashchange", openDetailsOnFragmentIdNavigation);

// Load MyFonts counter for URW Form fonts asynchronously, not in JS.
// This is a workaround for a weird error thrown by netlify-plugin-checklinks.
fetch("//hello.myfonts.net/count/3e423c");
2 changes: 1 addition & 1 deletion src/pages/_data/navigation/mainNav.json5
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
]
},
{ title: "Build", url: "/build/", children: [
{ title: "Working with Data", url: "/build/#working-with-data", children: [
{ title: "Working with Data", url: "/build/working-with-data/", children: [
{ title: "Entries", url: "/build/entries/" },
]},
]
Expand Down
Empty file.
16 changes: 11 additions & 5 deletions src/pages/build/entries.md

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions src/pages/build/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,9 @@ This Build Guide organizes everything you need to know about developing Holochai

## Working with data

Shared data in a Holochain application is stored as a graph database of **bases** connected by **links**. A base is identified by a 32-byte identifier such as a hash or public key, and may have data and metadata associated with it. There are four types of bases:

* An **entry** is an arbitrary blob of bytes that your application code gives meaning to.
* An **agent ID** is a special type of entry that contains the public key of a participant in an application.
* An **action** records the act of manipulating the graph and contains metadata about the act, such as authorship and timestamp.
* An **external reference** is the ID of a resource that exists outside the database, such as the hash of an IPFS resource or the public key of an Ethereum address.

::: topic-list
### Topics {data-no-toc}

* [Overview](/build/working-with-data/) --- general concepts related to working with data in Holochain
* [Entries](/build/entries/) --- creating, reading, updating, and deleting
:::
163 changes: 163 additions & 0 deletions src/pages/build/working-with-data.md

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions src/scss/_fonts.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/* Imports */

@import url("//hello.myfonts.net/count/3e423c");
@font-face {
font-family: "URW Form";
font-weight: 700;
Expand Down
181 changes: 181 additions & 0 deletions src/scss/_mermaid-diagrams.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
.mermaid-flowchart {
font-size: 14px;
fill: #333;
margin-left: auto;
margin-right: auto;

.error-icon {
fill: #552222;
}

.error-text {
fill: #552222;
stroke: #552222;
}

.edge-thickness-normal {
stroke-width: 2px;
}

.edge-thickness-thick {
stroke-width: 3.5px;
}

.edge-pattern-solid {
stroke-dasharray: 0;
}

.edge-pattern-dashed {
stroke-dasharray: 3;
}

.edge-pattern-dotted {
stroke-dasharray: 2;
}

.marker {
fill: #333333;
stroke: #333333;
}

.marker.cross {
stroke: #333333;
}

svg {
font-size: 16px;
}

.label {
color: #333;
}

.cluster-label text {
fill: #333;
}

.cluster-label span, p {
color: #333;
}

.label text, span, p {
fill: #333;
color: #333;
}

.node {
rect, circle, ellipse, polygon, path {
fill: #ececff;
stroke: #9370db;
stroke-width: 1px;
}

.katex path {
fill: #000;
stroke: #000;
stroke-width: 1px;
}

.label {
text-align: center;
}

&.clickable {
cursor: pointer;
}
}

.flowchart-label text {
text-anchor: middle;
}

.arrowheadPath {
fill: #333333;
}

.edgePath .path {
stroke: #333333;
stroke-width: 2px;
}

.flowchart-link {
stroke: #333333;
fill: none;
}

.edgeLabel {
background-color: #e8e8e8;
text-align: center;

rect {
opacity: 0.5;
background-color: #e8e8e8;
fill: #e8e8e8;
}
}

.labelBkg {
background-color: rgba(232, 232, 232, 0.85);
}

.cluster {
rect {
fill: #ffffde;
stroke: #aaaa33;
stroke-width: 1px;
}

text {
fill: #333;
}
}

.cluster span, p {
color: #333;
}

div.mermaidTooltip {
position: absolute;
text-align: center;
max-width: 200px;
padding: 2px;
font-size: 12px;
background: hsl(80, 100%, 96.2745098039%);
border: 1px solid #aaaa33;
border-radius: 2px;
pointer-events: none;
z-index: 100;
}

.flowchartTitleText {
text-anchor: middle;
font-size: 18px;
fill: #333;
}

.nodeLabel * {
margin: 0;
}

/* External references, used on the working with data page and others */
.external > * {
stroke-dasharray: 3 3 !important;
fill: transparent !important;

span {
stroke-dasharray: 3 3 !important;
fill: transparent !important;
}
}

/* Original actions, for diagrams showing the relationships of CRUD actions */
.original > * {
fill: #F2F2F2 !important;
stroke: #AAA !important;

span {
fill: #F2F2F2 !important;
stroke: #AAA !important;
}
}
}
1 change: 1 addition & 0 deletions src/scss/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import 'fonts';
@import 'svg-icons';
@import 'base-element-styles';
@import 'mermaid-diagrams';

// @import 'debug';

Expand Down