-
Notifications
You must be signed in to change notification settings - Fork 535
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
Stubbed out branching example #23595
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 15 out of 30 changed files in this pull request and generated no comments.
Files not reviewed (15)
- examples/apps/branching/.gitignore: Language not supported
- examples/apps/branching/.npmignore: Language not supported
- examples/apps/branching/LICENSE: Language not supported
- examples/apps/branching/biome.jsonc: Language not supported
- examples/apps/branching/package.json: Language not supported
- examples/apps/branching/src/index.html: Language not supported
- examples/apps/branching/src/start.ts: Evaluated as low risk
- examples/apps/branching/src/model/index.ts: Evaluated as low risk
- examples/apps/branching/src/model/groceryList.ts: Evaluated as low risk
- examples/apps/branching/src/view/debugView.tsx: Evaluated as low risk
- examples/apps/branching/prettier.config.cjs: Evaluated as low risk
- examples/apps/branching/src/view/groceryListView.tsx: Evaluated as low risk
- examples/apps/branching/src/modelInterfaces.ts: Evaluated as low risk
- examples/apps/branching/src/healthBot.ts: Evaluated as low risk
- examples/apps/branching/jest-puppeteer.config.cjs: Evaluated as low risk
Comments suppressed due to low confidence (2)
examples/apps/branching/src/model/containerCode.ts:18
- [nitpick] The variable name 'groceryListId' is too similar to 'groceryListRegistryKey'. Consider renaming it to 'groceryListDataStoreId' for clarity.
const groceryListId = "grocery-list";
examples/apps/branching/src/model/containerCode.ts:19
- [nitpick] The variable name 'groceryListRegistryKey' is too similar to 'groceryListId'. Consider renaming it to 'groceryListRegistryEntryKey' for clarity.
const groceryListRegistryKey = "grocery-list";
return branchedMap; | ||
}; | ||
|
||
const branch = async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fake branching here. I think it should be fairly straightforward to integrate @anthony-murphy 's prototype here AFAICT, but I haven't actually tried.
const branchedMap = branchMap(map); | ||
// TODO: Should there be a working handle here? What would that mean? | ||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions | ||
return new GroceryList(runtime, {} as IFluidHandle<FluidObject>, branchedMap, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that I'm creating a whole second data store class instance (GroceryList) rather than just a second map. This seems easier to integrate into the view layer since I can just reuse the existing GroceryListView and don't have to make that view branch-aware. And also the data store itself doesn't have to be particularly knowledgeable about its branched state.
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
Adds a new example package for the branching feature. For now, just "fakes" branching, to be filled in as the feature develops. But in the meantime it's useful for thinking through what the customer interaction and app integration pieces could possibly look like.