-
-
Notifications
You must be signed in to change notification settings - Fork 591
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
Unstable implementation of MSC3089: File Trees #1732
Conversation
MSC: matrix-org/matrix-spec-proposals#3089 Includes part of MSC3088 (room subtyping): matrix-org/matrix-spec-proposals#3088 The NamespacedValue stuff is borrowed from the Extensible Events implementation PR in the react-sdk as a useful thing to put here. When/if the MSCs become stable, we'd convert the values to enums and drop the constants (or keep them for migration purposes, but switch to stable). This flags the whole thing as unstable because it's highly subject to change.
@t3chguy ptal. I've punted a proper conversion of the utils test out to element-hq/element-web#17630 in the interest of speed. |
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
spec/unit/utils.spec.ts
Outdated
expect(baseToString(BigInt(53), "abcdefghijklmnopqrstuvwxyz")).toEqual('cb'); | ||
// Verify the whole alphabet | ||
for (let i = BigInt(1); i <= DEFAULT_ALPHABET.length; i++) { | ||
console.log({i}); // for debugging |
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.
this can probably go away now, or be added to the message on the expect itself
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.
keeping it around for the debugging side, like the other test which does this. Can't have expect messages without a library, so out of scope for this PR.
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.
I hate everything about lexicographic ordering
This is a heavily opinionated set of classes to help downstream projects implement file trees. There is no UI component to this (for now). As an unstable implementation, this has known gaps that will be filled (eventually, probably).
This has a very specific usecase (managed file trees) and is not entirely ready for usecases like Element or bridges yet - its opinions are formed out of this usecase.
Such opinionated code is a bit of a first in the js-sdk stack, but for this sort of downstream project it helps with development. The downstream project using this is even more opinionated, and it is expected that the before dropping the unstable flag that this implementation would be refactored to match whatever structure the js-sdk has at that time. Please ping me on Matrix for more information/reference material (if appropriate).
There is no expectation or guarantee that this API surface be maintained as such. Breaking changes are encouraged and expected.
The NamespacedValue stuff is borrowed from the Extensible Events implementation PR in the react-sdk as a useful thing to put here. When/if the MSCs become stable, we'd convert the values to enums and drop the constants (or keep them for migration purposes, but switch to stable).
MSC: matrix-org/matrix-spec-proposals#3089
Includes part of MSC3088 (room subtyping): matrix-org/matrix-spec-proposals#3088
Note for diligent community members: This does not count as an MSC implementation due to the lack of UI component.