Commit 2f23aea
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>1 parent 352eb64 commit 2f23aea
6 files changed
Lines changed: 132 additions & 136 deletions
File tree
- .changeset
- content/docs/guide
- packages
- app-shell/src/utils/__tests__
- components/src/renderers/layout
- plugin-detail/src/synth
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
7 | | - | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
16 | 17 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
24 | 28 | | |
25 | 29 | | |
26 | 30 | | |
27 | 31 | | |
28 | 32 | | |
29 | 33 | | |
30 | | - | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
36 | 40 | | |
37 | 41 | | |
38 | 42 | | |
| |||
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
149 | 148 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
155 | 153 | | |
156 | 154 | | |
| 155 | + | |
157 | 156 | | |
158 | 157 | | |
159 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
311 | 332 | | |
312 | 333 | | |
313 | 334 | | |
| |||
377 | 398 | | |
378 | 399 | | |
379 | 400 | | |
| 401 | + | |
380 | 402 | | |
381 | | - | |
| 403 | + | |
382 | 404 | | |
383 | 405 | | |
384 | 406 | | |
385 | | - | |
| 407 | + | |
386 | 408 | | |
387 | 409 | | |
388 | 410 | | |
389 | 411 | | |
390 | 412 | | |
391 | 413 | | |
392 | 414 | | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
393 | 423 | | |
394 | 424 | | |
395 | 425 | | |
396 | | - | |
| 426 | + | |
397 | 427 | | |
398 | 428 | | |
399 | 429 | | |
| |||
403 | 433 | | |
404 | 434 | | |
405 | 435 | | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
406 | 447 | | |
407 | | - | |
| 448 | + | |
408 | 449 | | |
409 | 450 | | |
410 | 451 | | |
| |||
Lines changed: 32 additions & 49 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
728 | 728 | | |
729 | 729 | | |
730 | 730 | | |
731 | | - | |
732 | | - | |
733 | | - | |
734 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
735 | 735 | | |
736 | 736 | | |
737 | 737 | | |
738 | 738 | | |
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
742 | | - | |
| 742 | + | |
743 | 743 | | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
744 | 751 | | |
745 | | - | |
746 | | - | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
| 752 | + | |
757 | 753 | | |
758 | 754 | | |
759 | | - | |
760 | | - | |
761 | | - | |
762 | | - | |
763 | | - | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
764 | 768 | | |
765 | 769 | | |
766 | | - | |
| 770 | + | |
767 | 771 | | |
768 | | - | |
769 | | - | |
770 | 772 | | |
771 | 773 | | |
772 | 774 | | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
782 | | - | |
783 | | - | |
| 775 | + | |
784 | 776 | | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
| 777 | + | |
791 | 778 | | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
799 | 782 | | |
800 | 783 | | |
801 | 784 | | |
| |||
0 commit comments