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: Make NodeFromSchema work in more cases #23089

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

CraigMacomber
Copy link
Contributor

Description

NodeFromSchema now prefers the class based form if given a schema which implements a class based and non class based API.

This shouldn't impact our public APIs (unless someone adds a static create function to their class based schema, in which case this is a fix), but internally we use TreeNodeSchemaBoth in some places, and if you subclass a type implementing TreeNodeSchemaBoth, before this change NodeFromSchema would give the less specialized type from the create function, ignoring the subclassing. This was confusing and has been fixed.

Reviewer Guidance

The review process is outlined on this wiki page.

@CraigMacomber CraigMacomber requested review from a team as code owners November 14, 2024 17:52
@github-actions github-actions bot added area: dds Issues related to distributed data structures area: dds: tree area: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct public api change Changes to a public API base: main PRs targeted against main branch labels Nov 14, 2024
Copy link
Collaborator

@msfluid-bot msfluid-bot left a comment

Choose a reason for hiding this comment

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

Code Coverage Summary

No packages impacted by the change.


Baseline commit: 3fe3fa5
Baseline build: 306842
Happy Coding!!

Code coverage comparison check passed!!

@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +245 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 465.72 KB 465.75 KB +35 Bytes
azureClient.js 563.04 KB 563.09 KB +49 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 262.34 KB 262.35 KB +14 Bytes
fluidFramework.js 426.99 KB 427.01 KB +14 Bytes
loader.js 134.18 KB 134.19 KB +14 Bytes
map.js 42.71 KB 42.71 KB +7 Bytes
matrix.js 149.84 KB 149.85 KB +7 Bytes
odspClient.js 528.83 KB 528.88 KB +49 Bytes
odspDriver.js 97.88 KB 97.9 KB +21 Bytes
odspPrefetchSnapshot.js 42.81 KB 42.83 KB +14 Bytes
sharedString.js 165.77 KB 165.78 KB +7 Bytes
sharedTree.js 417.45 KB 417.46 KB +7 Bytes
Total Size 3.37 MB 3.37 MB +245 Bytes

Baseline commit: 3fe3fa5

Generated by 🚫 dangerJS against 9e3f59c

Choose a reason for hiding this comment

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

Copilot reviewed 5 out of 12 changed files in this pull request and generated no suggestions.

Files not reviewed (7)
  • packages/dds/tree/api-report/tree.legacy.public.api.md: Evaluated as low risk
  • packages/framework/fluid-framework/api-report/fluid-framework.public.api.md: Evaluated as low risk
  • packages/dds/tree/api-report/tree.legacy.alpha.api.md: Evaluated as low risk
  • packages/framework/fluid-framework/api-report/fluid-framework.legacy.alpha.api.md: Evaluated as low risk
  • packages/framework/fluid-framework/api-report/fluid-framework.legacy.public.api.md: Evaluated as low risk
  • packages/dds/tree/api-report/tree.public.api.md: Evaluated as low risk
  • packages/dds/tree/api-report/tree.beta.api.md: Evaluated as low risk

Tip: Copilot only keeps its highest confidence comments to reduce noise and keep you focused. Learn more

Copy link
Contributor

@Josmithr Josmithr left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks for the comment block describing the ordering choice for the updated template type!

@CraigMacomber CraigMacomber enabled auto-merge (squash) December 3, 2024 00:21
Copy link
Contributor

github-actions bot commented Dec 3, 2024

🔗 No broken links found! ✅

Your attention to detail is admirable.

linkcheck output


> [email protected] ci:check-links /home/runner/work/FluidFramework/FluidFramework/docs
> start-server-and-test "npm run serve -- --no-open" 3000 check-links

1: starting server using command "npm run serve -- --no-open"
and when url "[ 'http://127.0.0.1:3000' ]" is responding with HTTP status code 200
running tests using command "npm run check-links"


> [email protected] serve
> docusaurus serve --no-open

[SUCCESS] Serving "build" directory at: http://localhost:3000/

> [email protected] check-links
> linkcheck http://localhost:3000 --skip-file skipped-urls.txt

Crawling...

Stats:
  170006 links
    1595 destination URLs
    1825 URLs ignored
       0 warnings
       0 errors


@CraigMacomber CraigMacomber merged commit 2febdf8 into microsoft:main Dec 3, 2024
30 checks passed
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: framework Framework is a tag for issues involving the developer framework. Eg Aqueduct base: main PRs targeted against main branch public api change Changes to a public API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants