Skip to content

Replace document properties drawer with inline details card#1044

Merged
SachaProbo merged 1 commit intomainfrom
SachaProbo/doc-details-no-drawer
Apr 15, 2026
Merged

Replace document properties drawer with inline details card#1044
SachaProbo merged 1 commit intomainfrom
SachaProbo/doc-details-no-drawer

Conversation

@SachaProbo
Copy link
Copy Markdown
Contributor

@SachaProbo SachaProbo commented Apr 14, 2026

  • Remove the right-side drawer and display document properties in a 3-column Card below the page header
  • Move status badge to the PageHeader (right-aligned, matching compliance page style)
Capture d’écran 2026-04-14 à 17 12 00

Summary by cubic

Replaced the right-side properties drawer with an inline 3‑column details card under the header and moved the status badge into PageHeader. Editing (title, description, type, classification, approvers) is allowed only on the latest version that isn’t pending approval; switching/opening versions keeps the current tab and avoids remounts.

  • New Features

    • Inline details card shows Approvers, Type, Classification, Version, Last modified, Published date, and Archived on.
    • Approvers, Type, and Classification are editable inline with save/cancel and toasts; edits are gated to the latest non‑pending version.
    • Status badge rendered in PageHeader (right‑aligned).
  • Refactors

    • Removed DocumentLayoutDrawer; added DocumentDetailsCard; query uses lastVersion via @connection to compute editability.
    • Versions dropdown preserves the current tab and fetches menu data with network‑only; description page loader uses network‑only to avoid stale content.
    • Updated Outlet context and forms to use isEditable and onDocumentUpdated; metadata/content updates refresh layout without remounting; editor key uses version/document ID to avoid unnecessary remounts; layout loader refetches on param changes with store‑and‑network; Suspense keyed by document ID.

Written for commit 7a5d4c8. Summary will update on new commits.

@SachaProbo SachaProbo force-pushed the SachaProbo/doc-details-no-drawer branch from 8260654 to 48285c5 Compare April 14, 2026 15:14
@SachaProbo SachaProbo requested a review from a team April 14, 2026 15:17
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 3 files

@SachaProbo SachaProbo force-pushed the SachaProbo/doc-details-no-drawer branch 27 times, most recently from 5ae3d8b to 63be166 Compare April 14, 2026 19:29
@SachaProbo SachaProbo force-pushed the SachaProbo/doc-details-no-drawer branch 2 times, most recently from 7538197 to bd4a0b1 Compare April 14, 2026 19:40
@SachaProbo
Copy link
Copy Markdown
Contributor Author

@cubic-dev-ai review please

@cubic-dev-ai
Copy link
Copy Markdown
Contributor

cubic-dev-ai bot commented Apr 14, 2026

@cubic-dev-ai review please

@SachaProbo I have started the AI code review. It will take a few minutes to complete.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 10 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/console/src/pages/organizations/documents/_components/DocumentDetailsCard.tsx">

<violation number="1" location="apps/console/src/pages/organizations/documents/_components/DocumentDetailsCard.tsx:148">
P1: These form defaults are only set on first mount, so switching to another version/document can leave edit mode bound to stale values.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

@SachaProbo SachaProbo force-pushed the SachaProbo/doc-details-no-drawer branch 2 times, most recently from 4d64527 to 1f2135f Compare April 15, 2026 08:05
- Remove the right-side drawer and display document properties in a
  3-column Card below the page header
- Move status badge to the PageHeader (right-aligned, matching
  compliance page style)

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
@SachaProbo SachaProbo force-pushed the SachaProbo/doc-details-no-drawer branch from 1f2135f to 7a5d4c8 Compare April 15, 2026 08:56
@SachaProbo SachaProbo merged commit 7a5d4c8 into main Apr 15, 2026
17 checks passed
@SachaProbo SachaProbo deleted the SachaProbo/doc-details-no-drawer branch April 15, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant