You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(detail): Attachments become a peer tab with a live count badge, and their copy is translated (objectstack#4358) (#3123)
* fix(detail,i18n): Attachments panel renders beside the discussion feed, and its copy is finally translated (objectstack#4358)
Two defects on enable.files record detail pages:
1. Buried placement — RecordDetailView appended RecordAttachmentsPanel
AFTER the schema-rendered page tree, whose synthesized default embeds
record:discussion as the last main component, so the panel always sat
below an ever-growing feed timeline with no metadata knob to move it.
buildDefaultPageSchema now emits a footer grid row placing a new
record:attachments node to the LEFT of the feed (1/3–2/3 on lg+,
stacked attachments-first below). The node is a new app-shell
registration wrapping the existing panel via RecordContext; an
`attachments` slot + `hideAttachments` option cover slotted pages, and
the legacy bottom append survives only as the fallback for authored
pages without the node (hasExplicitAttachments).
2. Untranslated copy — the panel's eleven detail.* keys existed only as
inline-English defaultValues; no locale bundle carried them. All ten
locales now define them.
Verified in the browser against a showcase backend: zh console renders
「附件 / 上传 / 暂无附件…」 in the left column with the discussion feed
to its right on lg+, and stacks the panel above the feed on mobile.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* fix(detail): Attachments move from footer widget to a peer tab with a live count badge (objectstack#4358)
Rework of the previous commit's side-by-side footer after design review:
the narrow attachments card next to a tall feed read as a broken layout.
- buildDefaultTabs emits an Attachments tab (record:attachments) between
Related and Activity/History for enable.files objects; hideAttachments
suppresses it. The footer grid, the attachments slot and toFooterCell
are gone — the discussion footer is back to its original shape.
- PageTabsRenderer derives the tab badge from a sys_attachment probe
scoped to (parent_object, parent_id): the probe wrapper injects the
two-key filter the RelatedCountStore shape can't express, while the
synthetic relationshipField keeps the cache key unique and the store's
existing sys_attachment invalidation (MutationEvent bridge) updates the
badge on upload/delete.
- Tab label rides the existing KNOWN_LABEL_DICT (→ 附件).
Verified in the browser against a showcase backend (authored page
assignment temporarily detached, since showcase's demo project page
overrides the tabs slot): tab strip renders 详情 / 相关 1 / 附件 1, the
panel fills the tab, and the badge reflects a created+deleted
sys_attachment row.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
0 commit comments