Update frontend components and styles - #206
Conversation
|
Ready for review. |
- Revert template-model upload endpoint from /documents back to /upload.
The /documents route (addDocumentToTemplateModel) expects
AddDocumentDto { labelingDocumentId } and attaches an existing labeling
document; it rejects the file-upload payload (400) and returns
labeling_document (snake_case) rather than the labelingDocument the
handler reads, breaking model-detail document uploads.
- Remove the remote Figma html-to-design capture <script> from index.html;
it shipped to all environments as uncontrolled third-party JS.
- Fix CSS specificity so selected rows highlight their sticky checkbox/
actions cells: the nth-of-type(odd) striped rule (0,4,0) was overriding
the selected rule (0,3,0); raise it via .rows-tab-row.rows-tab-row--selected.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Pushed 1. Reverted template-model upload endpoint 2. Removed the remote Figma 3. Fixed sticky-cell highlight specificity ( Validation: 🤖 Reviewed and fixed with Claude Code |
Summary
This PR applies BC Design System layout conventions in the upload/documents flow and standardizes action semantics/hover behavior across tables, groups, classify, and template models.
Part 1: Layout & Spacing (existing PR 206 scope)
Layout & Spacing tokens
gap={4},mb={4},mt={7}) with BCDS token equivalents (gap="xs",mb="xs",mt="xs") inDocumentUploadPanel.UploadPageStackgap from"lg"tovar(--layout-margin-large)for token-consistent spacing.PageHeadercomponentbcds-page-header__title-blockclass to the title stack; drive gap viavar(--layout-margin-xsmall).mt={0} mb={0}onTitleandTextto suppress Mantine defaults and keep vertical rhythm under BCDS control.bcds-page-header__metaclass to the actionsGroupfor CSS targeting.DocumentsPageTitle + Text + Groupheader pattern with sharedPageHeaderfor cross-page consistency.App-level CSS fixes
display: flex,align-items: center,margin-right: auto).flex-wrap: nowrap)..bcds-page-header__title-blockrule to zero heading/text default margins..bcds-page-header__metawithmin-height: 3remto avoid layout shift when actions are absent.Upload panel CSS
Headingdefault bottom margin inside the intro block.Tooling
index.htmlfor HTML-to-design workflow.Part 2: Action Button Consistency
What Changed
Additional UI consistency updates (latest commits)
Why
Out of Scope (Intentional)
ActionIcon-> shared UI wrapper).Validation
npm -w apps/frontend run type-checknpm -w apps/frontend run lintapps/frontend/src/App.cssapps/frontend/src/ui/bcds-upload-panel.cssQA Guide
Risk
Low. Changes are UI-only and localized to styling/layout/button props/icons; no API contracts or data models changed.
Latest follow-up
Post-merge update (develop sync)
origin/developinto this branch to clear out-of-date status.npm -w apps/frontend run type-checkpassed.npm -w apps/frontend run lintpassed with only the same pre-existing warnings inapps/frontend/src/App.cssandapps/frontend/src/ui/bcds-upload-panel.css.Latest update (detail-page header hierarchy)
apps/frontend/src/features/annotation/template-models/pages/ModelDetailPage.tsxapps/frontend/src/features/benchmarking/pages/DatasetDetailPage.tsxapps/frontend/src/features/benchmarking/pages/ProjectDetailPage.tsxapps/frontend/src/features/benchmarking/pages/RunDetailPage.tsxdocs-md/BC_DS_SCREEN_MIGRATION_STATUS.mdnpm -w apps/frontend run type-checkpassed.npm -w apps/frontend run lintpassed with only the same pre-existing warnings inapps/frontend/src/App.cssandapps/frontend/src/ui/bcds-upload-panel.css.Latest update (upload CTA icon consistency)
apps/frontend/src/components/upload/DocumentUploadPanel.tsx(main Upload tab disabled/enabled Upload button)apps/frontend/src/features/annotation/template-models/pages/ModelDetailPage.tsx(Upload documents CTA + upload modal submit)apps/frontend/src/features/benchmarking/components/FileUploadDialog.tsx(dataset upload dialog submit)npm -w apps/frontend run type-checkpassed.npm -w apps/frontend run lintpassed with only the same pre-existing warnings inapps/frontend/src/App.cssandapps/frontend/src/ui/bcds-upload-panel.css.