forked from microsoft/FluidFramework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove the findTile API (microsoft#18908)
Finalize the removal of the findTile API, in favor of the new searchForMarker API. AB#6199
- Loading branch information
Showing
15 changed files
with
80 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"@fluidframework/merge-tree": minor | ||
"@fluidframework/sequence": minor | ||
--- | ||
|
||
Remove the findTile API from mergeTree, Client, and SharedString | ||
|
||
The findTile API that was previously deprecated is now being removed. The new searchForMarker function provides similar functionality, and can be called with the start position, the client ID, the desired marker label to find, and the search direction, where a value of true indicates a forward search. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -187,6 +187,10 @@ | |
} | ||
}, | ||
"typeValidation": { | ||
"broken": {} | ||
"broken": { | ||
"ClassDeclaration_Client": { | ||
"backCompat": false | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 46 additions & 0 deletions
46
packages/dds/merge-tree/src/test/client.annotateMarker.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
import { strict as assert } from "assert"; | ||
import { UniversalSequenceNumber } from "../constants"; | ||
import { Marker, reservedMarkerIdKey } from "../mergeTreeNodes"; | ||
import { ReferenceType } from "../ops"; | ||
import { TextSegment } from "../textSegment"; | ||
import { TestClient } from "./testClient"; | ||
import { insertSegments } from "./testUtils"; | ||
|
||
describe("TestClient", () => { | ||
const localUserLongId = "localUser"; | ||
let client: TestClient; | ||
|
||
beforeEach(() => { | ||
client = new TestClient(); | ||
insertSegments({ | ||
mergeTree: client.mergeTree, | ||
pos: 0, | ||
segments: [TextSegment.make("")], | ||
refSeq: UniversalSequenceNumber, | ||
clientId: client.getClientId(), | ||
seq: UniversalSequenceNumber, | ||
opArgs: undefined, | ||
}); | ||
client.startOrUpdateCollaboration(localUserLongId); | ||
}); | ||
|
||
describe(".annotateMarker", () => { | ||
it("annotate valid marker", () => { | ||
const insertOp = client.insertMarkerLocal(0, ReferenceType.Tile, { | ||
[reservedMarkerIdKey]: "123", | ||
}); | ||
assert(insertOp); | ||
const markerInfo = client.getContainingSegment(0); | ||
const marker = markerInfo.segment as Marker; | ||
const annotateOp = client.annotateMarker(marker, { foo: "bar" }); | ||
assert(annotateOp); | ||
assert(marker.properties); | ||
assert(marker.properties.foo, "bar"); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.