Comments (5)
Yea, we have a workaround we can use for now. Just not ideal :)
from fluidframework.
Updating the title. This repros when searching backward at the beginning of the string too.
it("Repro findTile() issue [backward]", async () => {
// ARRANGE
const sharedString = ...; // Get an empty SharedString somewhere
// ACT
sharedString.insertMarker(0, ReferenceType.Tile, {
markerId: "marker",
referenceTileLabels: ["Eop"],
});
// ASSERT
expect(sharedString.getLength()).toBe(1);
// There shouldn't be anything before the beginning of the string...
const foundTile = sharedString.findTile(0 /*startPos*/, "Eop" /*tileLabel*/, true /*preceding*/);
// ... but for some reason, we're getting the marker at pos 0... 🧨🧨🧨
expect(foundTile).toBeUndefined();
});
from fluidframework.
Thanks for the bug report! We already have some work internally tracking improving test coverage on findTile
and related underlying functionality--more reason to prioritize that. I've filed a bug for this as well (AB#4616 for FF team members)
Do you have any workaround in the meantime (assuming this is blocking you in some way)? Seems like the kind of thing that might have one if you understand what scenarios it repros in.
from fluidframework.
I'm working on this issue now, and in doing so we've decided to create a new function that searches by doing a depth first walk of the nodes instead of the current search block functions that we have. We're trying to decide whether the search should exclude the search position that's passed into findTile, whether it should be included in the search, or if we should allow the method to be configurable on whether or not the position is included in the search.
Currently, findTile seems to include 0 as a search position, but exclude any other position in the middle of the string. If the new method is fully exclusive, it would prevent any tile at position 0 from being found in a forward search, but it would match the behavior of the forwardExcursion and backwardExcursion functions. If it's inclusive, the problem with searching at the start of the string is fixed, but it could break some expectations from previous findTile usage.
Let me know if you have a preference as to which solution we move forward with, or if you would be ok with whatever our preference is. None of the existing usage of findTile would be broken immediately, as this solution is for a separate method, but let me know what your thoughts are.
from fluidframework.
Closing since the solution is merged (#16517). findTile itself is now deprecated in favor of searchForMarker, which is called in the same way as findTile and searches for the nearest marker in the direction indicated. searchForMarker includes the start position in the search as well.
from fluidframework.
Related Issues (20)
- Move to semver >= 7.5.2
- ActivityTimeout event handling behavior not consistent in Deli HOT 2
- Deprecate mergeTree's findTile method HOT 1
- 6.1 release blocker: Add removed telemetry items HOT 1
- Remove type parameter from IntervalCollection's add method HOT 1
- Shredded summary upload service fails on compressed binary summary blobs. HOT 3
- Copy of the container with compressed binary summaries is failing. HOT 6
- Memory leak related to unbounded creation of debug loggers HOT 1
- Stop requiring guestDisplayName as pre-condition for requestSocketToken: true as part of joinSession payload HOT 2
- Browser - Database updates on a separate thread HOT 2
- SharedMatrix undefined cell values HOT 7
- Need to bump axios to 1.6.0+ (and test) to address vulnerability HOT 7
- Misbehaving driver can cause Fluid to hang on container open HOT 7
- Allow SharedTree to be passed across iframe boundary HOT 3
- Blazor SDK HOT 1
- Use @fluidframework/azure-client can not create container and get Error: 0x883 at app.js:125 HOT 3
- Intervals not at expected location sometimes after undo-ing HOT 3
- Issue at container connection : Provided user was not an "AzureUser" HOT 1
- Container issues at connection HOT 9
- Error fetching checkpoint for any document causes rest of the batch to fail in deleteSummarizedOps HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluidframework.