Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
16 commits
Select commit Hold shift + click to select a range
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ You can also override per-load via URL query params: `?contentId=do_123&lang=hi&
| **Review workflow** | Send for review, reviewer request-changes (with reasons checklist), publish. |
| **Locking** | Creates a content lock on upload / edit-open; retires it on close and on send-for-review. |
| **Session guard** | 30-minute inactivity prompt (Continue / Close). |
| **Enrichments** | Ticking "Generate transcripts" when uploading a video saves `enrichmentTypes` on the content; the platform generates transcripts after publish. A published video's transcripts show in a read-only drawer and as preview captions, read via `POST /object/enrichment/v4/list` (served under `config.portalSlug`, default `/portal`). |
| **Telemetry** | Emits Sunbird 3.0 telemetry (impression / interact / error / end) via `onTelemetryEvent`. |
| **Preview** | Renders through the ekstep content renderer for every supported mimeType. |

Expand Down
33 changes: 21 additions & 12 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@project-sunbird/generic-editor-v2",
"version": "2.0.7",
"version": "2.0.8",
"description": "Sunbird Generic Editor — React content upload/generic editor (theme-reactive, multilingual). Fork of @sunbird/content-editor that previews via the legacy ekstep content renderer.",
"main": "dist/sunbird-generic-editor.umd.js",
"module": "dist/sunbird-generic-editor.es.js",
Expand Down Expand Up @@ -49,4 +49,4 @@
"vite-plugin-dts": "^4.5.4",
"vitest": "^3.2.6"
}
}
}
4 changes: 2 additions & 2 deletions src/ContentEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import MetadataDrawer from './components/MetadataDrawer';
import CollaboratorDrawer from './components/CollaboratorDrawer';
import ReviewDrawer from './components/ReviewDrawer';
import ReviewCommentsDrawer from './components/ReviewCommentsDrawer';
import TranscriptsDrawer from './components/TranscriptsDrawer';
import EnrichmentsDrawer from './components/enrichment/EnrichmentsDrawer';
import AssetPickerModal from './components/AssetPickerModal';
import Toast from './components/Toast';
import { t } from './i18n/i18n';
Expand Down Expand Up @@ -69,7 +69,7 @@ const ContentEditor: React.FC<ContentEditorProps> = (props) => {
<CollaboratorDrawer ed={ed} />
<ReviewDrawer ed={ed} />
<ReviewCommentsDrawer ed={ed} />
<TranscriptsDrawer ed={ed} />
<EnrichmentsDrawer ed={ed} />
<AssetPickerModal ed={ed} />

<Toast toast={ed.toast} />
Expand Down
13 changes: 9 additions & 4 deletions src/components/Drawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,24 @@ interface DrawerProps {
closeLabel?: string;
/** Extra class on the root, e.g. for a drawer-specific scoped theme override. */
className?: string;
/** Optional control shown in the header, left of the close button. */
headerAction?: React.ReactNode;
}

/** Slide-in drawer (right in LTR, left in RTL). Always mounted so the transform transition runs. */
const Drawer: React.FC<DrawerProps> = ({ open, onClose, titleIcon, title, footer, children, closeLabel = 'Close', className }) => (
const Drawer: React.FC<DrawerProps> = ({ open, onClose, titleIcon, title, footer, children, closeLabel = 'Close', className, headerAction }) => (
<div className={`ce-drawer${className ? ` ${className}` : ''}`} data-open={open} aria-hidden={!open}>
<div className="ce-drawer-head">
<div className="ce-drawer-title-row">
<span className="ce-drawer-title-ic">{titleIcon}</span>
<h3 className="ce-drawer-title">{title}</h3>
</div>
<button type="button" className="ce-icon-btn" onClick={onClose} aria-label={closeLabel}>
<CloseIcon size={12} />
</button>
<div className="ce-drawer-head-actions">
{headerAction}
<button type="button" className="ce-icon-btn" onClick={onClose} aria-label={closeLabel}>
<CloseIcon size={12} />
</button>
</div>
</div>
<div className="ce-drawer-body">{children}</div>
{footer && <div className="ce-drawer-foot">{footer}</div>}
Expand Down
Loading
Loading