Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 4 additions & 1 deletion src/components/app/ViewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ import {
useInlineCommentPanelOptional,
} from '@/components/inline-comment/InlineCommentContext';
import { useCurrentUser } from '@/components/main/app.hooks';
import { PRESENTATION_ENTRY_ENABLED } from '@/components/presentation/feature-flags';
import PresentEntry from '@/components/presentation/PresentEntry';
import { cn } from '@/lib/utils';

Expand Down Expand Up @@ -379,7 +380,9 @@ function ViewModal({ viewId, open, onClose }: { viewId?: string; open: boolean;

<div className={'flex items-center gap-4'}>
<Users viewId={effectiveViewId} />
{resolvedView?.layout === ViewLayout.Document && <PresentEntry viewId={effectiveViewId} />}
{PRESENTATION_ENTRY_ENABLED && resolvedView?.layout === ViewLayout.Document && (
<PresentEntry viewId={effectiveViewId} />
)}
<ShareButton viewId={effectiveViewId} />
{ref.current && (
<MoreActions
Expand Down
18 changes: 10 additions & 8 deletions src/components/app/header/RightMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { useAppOutline, useAppView, useAppViewId, useCurrentWorkspaceId } from '
import { DATABASE_TAB_VIEW_ID_QUERY_PARAM } from '@/components/app/hooks/resolveSidebarSelectedViewId';
import { useContainerVisibleViewIds } from '@/components/database/hooks/visibleViewIds/useContainerVisibleViewIds';
import { InlineCommentToggleButton } from '@/components/inline-comment/InlineCommentToggleButton';
import { PRESENTATION_ENTRY_ENABLED } from '@/components/presentation/feature-flags';
import PresentEntry from '@/components/presentation/PresentEntry';
import { openOrDownload } from '@/utils/open_schema';

Expand Down Expand Up @@ -86,14 +87,15 @@ function RightMenu() {
return (
<div className={'flex items-center gap-2'}>
<Users viewId={routeViewId} />
{(hasRowPageRoute ? rowPage?.documentId : routeView?.layout === ViewLayout.Document) && (
<PresentEntry
viewId={rowPage?.documentId || routeViewId!}
permissionViewId={actionViewId}
title={rowPage?.title}
isRow={hasRowPageRoute}
/>
)}
{PRESENTATION_ENTRY_ENABLED &&
(hasRowPageRoute ? rowPage?.documentId : routeView?.layout === ViewLayout.Document) && (
<PresentEntry
viewId={rowPage?.documentId || routeViewId!}
permissionViewId={actionViewId}
title={rowPage?.title}
isRow={hasRowPageRoute}
/>
)}
{/* Access control belongs to the database container, but Desktop publishes the active child view. */}
{actionViewId ? (
<ShareButton
Expand Down
2 changes: 2 additions & 0 deletions src/components/presentation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This feature provides **Present document**, **Present AI mind map**, and **AI Slides** in the signed-in app. Document presentation uses a read-only editor snapshot; AI operations use authenticated AppFlowy Cloud presentation APIs.

The **Present** button is temporarily hidden in page and modal headers. Keep `PRESENTATION_ENTRY_ENABLED` in [`feature-flags.ts`](./feature-flags.ts) set to `false` until explicitly asked to enable it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚪ Low · README points to hidden button

When a reader follows the presentation README while the flag is false, feature-flags.ts sets the flag to false, but the README still says “Present beside Share opens” the presentation options. Readers following that instruction cannot find the entry point in page or modal headers.

Qualify or remove the README bullet that says Present is available beside Share while the entry point is disabled.

Prompt for AI agents
In `src/components/presentation/README.md` at line 5:

**README points to hidden button**

When a reader follows the presentation README while the flag is false, `feature-flags.ts` sets the flag to `false`, but the README still says “Present beside Share opens” the presentation options. Readers following that instruction cannot find the entry point in page or modal headers.

Qualify or remove the README bullet that says Present is available beside Share while the entry point is disabled.


## Run locally

```sh
Expand Down
2 changes: 2 additions & 0 deletions src/components/presentation/feature-flags.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Keep the Present button hidden until explicitly asked to enable it.
export const PRESENTATION_ENTRY_ENABLED = false;
Loading