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

WIP: Add data model section #93

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 19 additions & 0 deletions technical-reports/format/data-model.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Data model

There are 2 kinds of entities that this spec defines: Groups and design tokens. Together, they form a tree data structure. The root node is always a group. Group nodes can contain child nodes which are either other groups or design tokens. Design tokens nodes cannot have children and are therefore always leaf nodes.

<figure>

![Diagram depicting an example tree structure made of group and design token nodes](./data-model.svg)

<figcaption>Visual representation of an example tree structure consisting of group and design token nodes</figcaption>
</figure>

The file format defined by this specification is a serialisation of that data structure.

<figure>

![Diagram of a file on one side and a group and desing token tree on the other. An arrow pointing from the file to the data structure is labelled "parse". Another arrow pointing in the opposite direction is labelled "serialize".](./parse-serialize.svg)
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo: "desing"


<figcaption>Illustration of the relationship between a design token file and the corresponding data model</figcaption>
</figure>
3 changes: 3 additions & 0 deletions technical-reports/format/data-model.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions technical-reports/format/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,11 @@ <h1>Introduction</h1>
data-include-format="markdown"
></section>

<section
data-include="./data-model.md"
data-include-format="markdown"
></section>

<section
data-include="./design-token.md"
data-include-format="markdown"
Expand Down
3 changes: 3 additions & 0 deletions technical-reports/format/parse-serialize.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.