Skip to content

tree: Import / Export APIs and demo#22566

Merged
CraigMacomber merged 90 commits into
microsoft:mainfrom
CraigMacomber:CLI
Nov 1, 2024
Merged

tree: Import / Export APIs and demo#22566
CraigMacomber merged 90 commits into
microsoft:mainfrom
CraigMacomber:CLI

Conversation

@CraigMacomber
Copy link
Copy Markdown
Contributor

Description

Added import/export options for tree content and schema, and example script using them.

Reviewer Guidance

The review process is outlined on this wiki page.

CraigMacomber and others added 30 commits July 25, 2024 12:26
Co-authored-by: Joshua Smithrud <54606601+Josmithr@users.noreply.github.com>
CraigMacomber added a commit that referenced this pull request Oct 29, 2024
…#22927)

## Description

A collection of minor improvements split out from
#22566 for simplified
and more targeted review.
Comment thread .changeset/chubby-olives-say.md Outdated
Comment thread examples/apps/tree-cli-app/src/index.ts Outdated
const args = process.argv.slice(2);

console.log(`Requires arguments: [<source>] [<destination>] [<edit>]`);
console.log(`Example arguments: default data/large.concise.json string:10,item:100`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

the example for edit is a bit confusing to me, maybe expand on its expected format or how this particular example affects the document?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should be better now.

Comment thread examples/apps/tree-cli-app/src/schema.ts Outdated
Comment thread examples/apps/tree-cli-app/src/test/schema.spec.ts Outdated
Comment thread examples/apps/tree-cli-app/src/test/schema.spec.ts Outdated
},
...options,
};
const schemalessConfig = applySchemaToParserOptions(schema, config);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why is this considered schemaless?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

comment added.

Comment thread packages/dds/tree/src/shared-tree/treeApiAlpha.ts Outdated
Comment thread packages/dds/tree/src/shared-tree/treeApiAlpha.ts Outdated
Comment thread packages/dds/tree/src/simple-tree/api/tree.ts Outdated
@@ -0,0 +1 @@
{"type":"com.fluidframework.example.cli.List","fields":[]} No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

is the verbose version supposed to not have any fields?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

the default tree does not have any children under this node, so yes. I have however changed the default tree to be a bit bigger so its a better example.

): TreeView<TRoot>;

// TODO:
// Add stored key versions of Tree.exportVerbose, Tree.exportConcise and Tree.exportCompressed here so tree content can be accessed without a view schema.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

link here for context would be good I think

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have moved these comments to the interface doc comment so they can use the link syntax. They are in privateRemarks though, so I don't think there is any way to click them, and they don't render as links in intelisense.

Comment thread packages/dds/tree/src/shared-tree/treeApiAlpha.ts Outdated
@tylerbutler tylerbutler added the release-blocking Must be addressed before we cut and publish the next release label Nov 1, 2024
Copy link
Copy Markdown
Contributor

@noencke noencke left a comment

Choose a reason for hiding this comment

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

Approved for API - alpha only

Comment thread packages/dds/tree/src/codec/codec.ts
Comment thread packages/dds/tree/src/codec/codec.ts
@CraigMacomber CraigMacomber enabled auto-merge (squash) November 1, 2024 20:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Nov 1, 2024

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> fluidframework-docs@0.25.0 ci:linkcheck /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test ci:start 1313 linkcheck:full

1: starting server using command "npm run ci:start"
and when url "[ 'http://127.0.0.1:1313' ]" is responding with HTTP status code 200
running tests using command "npm run linkcheck:full"


> fluidframework-docs@0.25.0 ci:start
> http-server ./public --port 1313 --silent


> fluidframework-docs@0.25.0 linkcheck:full
> npm run linkcheck:fast -- --external


> fluidframework-docs@0.25.0 linkcheck:fast
> linkcheck http://localhost:1313 --skip-file skipped-urls.txt --external

Crawling...

Stats:
  440610 links
    3397 destination URLs
       2 URLs ignored
       0 warnings
       0 errors


@CraigMacomber CraigMacomber merged commit 18a23e8 into microsoft:main Nov 1, 2024
@CraigMacomber CraigMacomber deleted the CLI branch November 1, 2024 21:24
tylerbutler pushed a commit to tylerbutler/FluidFramework that referenced this pull request Nov 4, 2024
## Description

Added import/export options for tree content and schema, and example
script using them.
Josmithr pushed a commit that referenced this pull request Nov 5, 2024
## Description

Added import/export options for tree content and schema, and example
script using them.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: dds: tree area: dds Issues related to distributed data structures area: examples Changes that focus on our examples area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch changeset-present dependencies Pull requests that update a dependency file public api change Changes to a public API release-blocking Must be addressed before we cut and publish the next release size regression Significant bundle size regression (>5 KB)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants