Rename the task-modal Documents tab to Artifacts and include task-scoped media outputs alongside task documents. - Add shared artifact media rendering for global and task-local artifact cards. - Surface image, video, audio, document, and generic artifacts in the task Artifacts tab. - Update tab labels, empty states, counts, translations, tests, docs, and release notes for the Artifacts wording. Files changed: .changeset/fn-6907-task-artifacts-tab.md | 5 + docs/dashboard-guide.md | 5 +- .../dashboard/app/components/ArtifactMedia.tsx | 55 +++++++ .../dashboard/app/components/DocumentsView.tsx | 47 +----- .../dashboard/app/components/TaskDetailModal.tsx | 3 +- .../dashboard/app/components/TaskDocumentsTab.css | 33 +++++ .../dashboard/app/components/TaskDocumentsTab.tsx | 109 ++++++++++++-- .../TaskDetailModal.attachments-and-tabs.test.tsx | 4 +- .../TaskDetailModal.definition-actions.test.tsx | 20 +-- .../components/__tests__/TaskDocumentsTab.test.tsx | 160 ++++++++++++++++++++- packages/i18n/locales/en/app.json | 16 ++- packages/i18n/locales/es/app.json | 16 ++- packages/i18n/locales/fr/app.json | 16 ++- packages/i18n/locales/ko/app.json | 16 ++- packages/i18n/locales/zh-CN/app.json | 16 ++- packages/i18n/locales/zh-TW/app.json | 16 ++- 16 files changed, 436 insertions(+), 101 deletions(-) Fusion-Task-Id: FN-6907 Fusion-Task-Lineage: a1318ed5-4d47-42f8-8b6c-fe91506e11fb
274 lines
4.9 KiB
CSS
274 lines
4.9 KiB
CSS
/* === Task Documents === */
|
|
.task-artifacts-section,
|
|
.task-documents-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
margin-top: var(--space-lg);
|
|
}
|
|
|
|
.task-artifacts-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.task-artifacts-section-header h5 {
|
|
margin: 0;
|
|
}
|
|
|
|
.task-artifacts-section-count {
|
|
color: var(--text-muted);
|
|
font-size: 0.75rem;
|
|
}
|
|
|
|
.task-artifacts-gallery {
|
|
width: 100%;
|
|
}
|
|
|
|
.task-documents-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
.task-document-card {
|
|
border: 1px solid var(--border);
|
|
border-radius: 6px;
|
|
padding: var(--space-md);
|
|
background: var(--bg-secondary);
|
|
transition: border-color 0.15s ease;
|
|
}
|
|
|
|
.task-document-card:hover {
|
|
border-color: color-mix(in srgb, var(--border) 70%, var(--text) 30%);
|
|
}
|
|
|
|
.task-document-card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: var(--space-md);
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.task-document-card-title {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
}
|
|
|
|
.task-document-key {
|
|
font-weight: 600;
|
|
font-size: 0.9375rem;
|
|
}
|
|
|
|
.task-document-revision-badge {
|
|
font-size: 0.75rem;
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.task-document-meta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 2px;
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.task-document-author {
|
|
font-weight: 500;
|
|
}
|
|
|
|
.task-document-content {
|
|
margin: var(--space-md) 0;
|
|
padding: var(--space-md);
|
|
background: var(--bg);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border);
|
|
max-height: 400px;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.task-document-content-text {
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
margin: 0;
|
|
font-family: inherit;
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.task-document-content-header {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.task-document-content-markdown {
|
|
/* Container chrome only; markdown styles delegated to .markdown-body */
|
|
}
|
|
|
|
.task-document-edit-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
margin: var(--space-md) 0;
|
|
}
|
|
|
|
.task-document-edit-form textarea {
|
|
min-height: 200px;
|
|
font-family: inherit;
|
|
font-size: 0.875rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.task-document-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
}
|
|
|
|
.task-document-revisions {
|
|
margin: var(--space-md) 0;
|
|
padding: var(--space-md);
|
|
background: var(--bg);
|
|
border-radius: 4px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.task-document-revisions h5 {
|
|
margin: 0 0 var(--space-sm) 0;
|
|
font-size: 0.875rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.task-document-revision-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.task-document-revision-item {
|
|
padding: var(--space-sm);
|
|
background: var(--bg-secondary);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: background 0.15s ease;
|
|
}
|
|
|
|
.task-document-revision-item:hover {
|
|
background: var(--surface-hover);
|
|
}
|
|
|
|
.revision-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.revision-badge {
|
|
font-size: 0.75rem;
|
|
padding: 1px 4px;
|
|
border-radius: 3px;
|
|
background: var(--bg-tertiary);
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
.revision-author {
|
|
font-size: 0.8125rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.revision-timestamp {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.revision-preview {
|
|
font-size: 0.8125rem;
|
|
color: var(--text-muted);
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.task-document-create-form {
|
|
margin: var(--space-md) 0;
|
|
padding: var(--space-md);
|
|
background: var(--bg-secondary);
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.task-document-create-form h5 {
|
|
margin: 0 0 var(--space-md) 0;
|
|
}
|
|
|
|
.task-document-create-form .form-group {
|
|
margin-bottom: var(--space-md);
|
|
}
|
|
|
|
.task-document-create-form .form-group:last-of-type {
|
|
margin-bottom: var(--space-sm);
|
|
}
|
|
|
|
.task-document-key-input {
|
|
width: 100%;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.form-hint {
|
|
display: block;
|
|
margin-top: 4px;
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.form-actions {
|
|
display: flex;
|
|
gap: var(--space-sm);
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
.task-document-new-btn {
|
|
margin-top: var(--space-md);
|
|
}
|
|
|
|
.confirm-delete-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: 0.875rem;
|
|
color: var(--color-error);
|
|
}
|
|
|
|
@media (max-width: 768px) {
|
|
.task-artifacts-section-header {
|
|
align-items: flex-start;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.task-document-card-header {
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
}
|
|
|
|
.task-document-meta {
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.task-document-content {
|
|
max-height: 300px;
|
|
}
|
|
}
|