-
Notifications
You must be signed in to change notification settings - Fork 558
feat(odsp-client): Add OdspContainerServices readonly and sensitivity label event emitters #25800
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
base: main
Are you sure you want to change the base?
Changes from 5 commits
db1d16a
1010d8e
df9b2a4
c0ad929
becd168
db96d73
3bb1e16
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,9 @@ | |
|
|
||
| import type { | ||
| IConfigProviderBase, | ||
| IDisposable, | ||
| IEvent, | ||
| IEventProvider, | ||
| ITelemetryBaseLogger, | ||
| } from "@fluidframework/core-interfaces"; | ||
| import type { | ||
|
|
@@ -79,6 +82,22 @@ export interface OdspContainerAttachProps { | |
| fileName: string | undefined; | ||
| } | ||
|
|
||
| /** | ||
| * Events emitted by the ODSP container service to notify consumers of select | ||
| * container changes. | ||
| * @beta | ||
| */ | ||
| export interface IOdspContainerServicesEvents extends IEvent { | ||
| /** | ||
| * Emitted when the read-only state of the container changes. | ||
| */ | ||
| (event: "readOnlyStateChanged", listener: (readonly: boolean) => void): void; | ||
| /** | ||
| * Emitted when the sensitivity label of the container changes. | ||
| */ | ||
| (event: "sensitivityLabelChanged", listener: (sensitivityLabelsInfo: string) => void): void; | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
| * ODSP version of the IFluidContainer interface. | ||
| * @beta | ||
|
|
@@ -107,11 +126,19 @@ export interface IOdspFluidContainer< | |
| * use, will not be included here but rather on the FluidContainer class itself. | ||
| * @beta | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| */ | ||
| export interface OdspContainerServices { | ||
| export interface OdspContainerServices | ||
| extends IEventProvider<IOdspContainerServicesEvents>, | ||
| IDisposable { | ||
| /** | ||
| * Provides an object that facilitates obtaining information about users present in the Fluid session, as well as listeners for roster changes triggered by users joining or leaving the session. | ||
| */ | ||
| audience: IOdspAudience; | ||
|
|
||
| /** | ||
| * Gets the read-only state of the container, if available. | ||
znewton marked this conversation as resolved.
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the thorough docs! These are great! |
||
| * @returns The read-only state (true when readonly, false when editable), or undefined if not available. | ||
| */ | ||
| getReadOnlyState(): boolean | undefined; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In general readonly state is not service-specific, so I'd probably expect to find it on IFluidContainer rather than a container services interface.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a handy way of exposing functionality via ODSP's
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe let's leave a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, ya know what, looking at this again, I can get the same effect by doing what I did in other PRs via OdspFluidContainer
znewton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| /** | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.