Skip to content
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

refactor(client-presence): Rename ExperimentalPresenceManager to PresenceManager + remove all experimental naming from package #23103

Closed
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ import {
import { createDevtoolsLogger, initializeDevtools } from "@fluidframework/devtools/internal";
// eslint-disable-next-line import/no-internal-modules
import { ISharedMap, IValueChanged, SharedMap } from "@fluidframework/map/internal";
import {
acquirePresenceViaDataObject,
ExperimentalPresenceManager,
} from "@fluidframework/presence/alpha";
import { acquirePresenceViaDataObject, PresenceManager } from "@fluidframework/presence/alpha";
// eslint-disable-next-line import/no-internal-modules
import { createChildLogger } from "@fluidframework/telemetry-utils/internal";
// eslint-disable-next-line import/no-internal-modules
Expand Down Expand Up @@ -81,7 +78,7 @@ const containerSchema = {
map2: SharedMap,
// A Presence Manager object temporarily needs to be placed within container schema
// https://github.com/microsoft/FluidFramework/blob/main/packages/framework/presence/README.md#onboarding
presence: ExperimentalPresenceManager,
presence: PresenceManager,
},
} satisfies ContainerSchema;
type DiceRollerContainerSchema = typeof containerSchema;
Expand Down
4 changes: 2 additions & 2 deletions packages/framework/presence/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,11 @@ Notifications value managers are special case where no data is retained during a
While this package is developing as experimental and other Fluid Framework internals are being updated to accommodate it, a temporary Shared Object must be added within container to gain access.

```typescript
import { acquirePresenceViaDataObject, ExperimentalPresenceManager } from "@fluidframework/presence/alpha";
import { acquirePresenceViaDataObject, PresenceManager } from "@fluidframework/presence/alpha";

const containerSchema = {
initialObjects: {
presence: ExperimentalPresenceManager
presence: PresenceManager
}
} satisfies ContainerSchema;

Expand Down
6 changes: 3 additions & 3 deletions packages/framework/presence/api-report/presence.alpha.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ export type ClientSessionId = SessionId & {
export class ExperimentalPresenceDO {
}

// @alpha
export const ExperimentalPresenceManager: SharedObjectKind<IFluidLoadable & ExperimentalPresenceDO>;

// @alpha @sealed
export interface IPresence {
readonly events: ISubscribable<PresenceEvents>;
Expand Down Expand Up @@ -177,6 +174,9 @@ export interface PresenceEvents {
workspaceActivated: (workspaceAddress: PresenceWorkspaceAddress, type: "States" | "Notifications" | "Unknown") => void;
}

// @alpha
export const PresenceManager: SharedObjectKind<IFluidLoadable & ExperimentalPresenceDO>;

// @alpha @sealed
export type PresenceNotifications<TSchema extends PresenceNotificationsSchema> = PresenceStates<TSchema, NotificationsManager<any>>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,9 @@ export declare class ExperimentalPresenceDO {
*
* @alpha
*/
export const ExperimentalPresenceManager =
new PresenceManagerFactory() as unknown as SharedObjectKind<
IFluidLoadable & ExperimentalPresenceDO
>;
export const PresenceManager = new PresenceManagerFactory() as unknown as SharedObjectKind<
IFluidLoadable & ExperimentalPresenceDO
>;

/**
* Acquire IPresence from a DataStore based Presence Manager
Expand Down Expand Up @@ -114,5 +113,5 @@ export function acquirePresenceViaDataObject(
return fluidLoadable.presenceManager();
}

throw new Error("Incompatible loadable; make sure to use ExperimentalPresenceManager");
throw new Error("Incompatible loadable; make sure to use PresenceManager");
}
2 changes: 1 addition & 1 deletion packages/framework/presence/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export { acquirePresence } from "./experimentalAccess.js";
export {
acquirePresenceViaDataObject,
type ExperimentalPresenceDO,
ExperimentalPresenceManager,
PresenceManager,
} from "./datastorePresenceManagerFactory.js";

export type { LatestValueControls } from "./latestValueControls.js";
Expand Down
Loading