mirror of
https://github.com/microsoft/microsoft-ui-xaml.git
synced 2026-10-28 16:35:19 +08:00
Reorganizes the IDL files added for the TableView effort so they match
the layout and ordering of established controls (ItemsView, ScrollView,
SelectorBar, InfoBar, TeachingTip, Repeater,
`controls/idl/Microsoft.UI.Xaml.Controls.idl`). It also moves the IDL
comment notes into the TableView dev spec and rewrites that spec to be
accurate and concise. No API is added, removed or renamed.
### Files
- `controls/dev/TableView/TableView.idl`
- `controls/dev/TableView/TableViewSource.idl`
- `controls/dev/dll-tabular/Microsoft.UI.Xaml.Controls.Tabular.idl`
- `controls/dev/ResizeGripper/ResizeGripper.idl`
- `controls/dev/ResizeGripper/ResizeGripperAutomationPeer.idl`
- `controls/dev/TabularShaping/SortDirection.idl`
- `docs/design-notes/TabularControls/TableView-dev-spec.md`
### IDL changes
- **Type order:** enums, interfaces, column classes, event args (in the
same order as the events), helper classes, the control, then automation
peers (in the same order as the helpers).
- **Member order:** constructor, properties, methods, events, then
statics. Dependency-property statics follow the order of their
properties.
- **Formatting:** matches the reference IDLs.
- **Comments:** documentation and rationale comments moved into the dev
spec. A coverage check confirms all 111 comment blocks are captured.
Only one-line "do not ..." guard comments stay in the IDLs
(SortDirection namespace, Tabular IDL ordering and namespace,
ResizeGripper private namespace, frozen overload metadata on
`TableViewSource`), and each points to the dev spec.
### Dev spec changes
- **Size and structure:** rewritten to be accurate, concise and
consistent with the other dev specs in the repo (TitleBar, SelectorBar).
It went from about 14,200 to about 4,900 words and follows the repo
template order: Description, Design considerations, Architectural
overview, Performance, Debugging, Implementation details, Appendix.
- **Content:** IDL notes are folded into the feature sections.
Duplicated and stale text is removed.
- **Accuracy:** every claim was cross-checked against the code, and
about 30 incorrect or outdated statements were fixed. Examples:
- the "Key public components" list now matches the IDLs (removed
`TableViewEditingUnit`, `TableViewEditAction.Discard` and the public
editing hooks)
- no edit deferral in this release
- row template parts and states
- the body repeater's `ItemTemplate` is `TableViewRowTemplateSelector`
- header scroller mode and row cache length
- the cell wrapper is a `Grid`
- cell UIA control type, and `ITransformProvider` on the column-header
peer
- keyboard map and density resource keys
- why `TableView` is unsealed
- **Cited wording kept:** headings and phrases cited by code comments
("Keyboard", "Re-shape while focused", "Sticky headers", etc.) are
unchanged.
### ABI note
Member reordering changes the vtable order and IIDs of `ITableView`,
`ITableViewColumn`, `ITableViewColumnStatics`, `ITableViewSource` and
the private `IResizeGripper`.
- All TableView types are `[MUX_PREVIEW]` (Feature_Experimental), and
ResizeGripper is `[MUX_INTERNAL]` in the private namespace.
- Preview consumers, including C# `TableViewColumn` subclasses, need to
rebuild.
- `ITableViewColumnOverrides`, `ITableViewStatics` and
`ITableViewSourceStatics` are unchanged.
### Follow-ups (not in this PR)
- The API spec (`docs/api-specs/TableView/TableView-spec.md`) still
calls column resize "planned" and says duplicate row identity always
fails fast. Update it, and move the dev spec's "API notes not yet in the
API spec" appendix into it.
- About 100 code and test comments cite `TableView.idl:<line>` or
`dev-spec:NNN` line numbers. Rewrite them to section names.
- A few code comments in `TableView.h` and `TableView_Editing.cpp` still
mention a "deferral" that doesn't exist.
### Validation
- **IDL equivalence:** a script that strips comments and whitespace and
compares types, attributes and members confirms the six IDLs differ only
in order and comments.
- **Build:** the Tabular idl and dll projects build with 0 warnings and
0 errors, and checked-in generated files are unchanged.
- **WinMD comparison** (Tabular, Private.Controls, XamlTypeInfo) against
main: identical types, members, signatures and attributes. The only
differences are the 5 IIDs above.
- **Tests:** the TableView suite (882 tests) ran on a test VM. 876
passed and 3 are `[Ignore]`. The remaining 3 failed or hung in the full
run but passed when rerun alone on this branch and on the baseline. The
grouped automation-peer chunk hangs intermittently on both this branch
and baseline. Later commits change only type order, comments and docs.
- **Dev spec:** independent fact-check and readability reviews were run,
and all findings are addressed. A final review of the last fixes found
two issues, both corrected.
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 7e074e0a-bef2-4f87-ae83-4ebdf5da11b2
43 lines
1.4 KiB
Plaintext
43 lines
1.4 KiB
Plaintext
namespace MU_XC_NAMESPACE
|
|
{
|
|
|
|
[MUX_PREVIEW]
|
|
[webhosthidden]
|
|
delegate Boolean TableViewPredicate(Object item);
|
|
|
|
[MUX_PREVIEW]
|
|
[webhosthidden]
|
|
delegate Object TableViewKeySelector(Object item);
|
|
|
|
[MUX_PREVIEW]
|
|
[webhosthidden]
|
|
delegate String TableViewIdentitySelector(Object item);
|
|
|
|
[MUX_PREVIEW]
|
|
[webhosthidden]
|
|
runtimeclass TableViewSource
|
|
{
|
|
Boolean IsLiveShaping { get; set; };
|
|
|
|
TableViewSource Filter(TableViewPredicate predicate);
|
|
// Do not remove the [default_overload]/[method_name] metadata on GroupBy/Sort: it is frozen ABI, and
|
|
// without it MIDL renames the overloads (GroupBy2/Sort2).
|
|
[default_overload] [method_name("GroupBy")]
|
|
TableViewSource GroupBy(TableViewKeySelector keySelector);
|
|
[method_name("GroupByWithIdentity")]
|
|
TableViewSource GroupBy(TableViewKeySelector keySelector, TableViewIdentitySelector groupIdentitySelector);
|
|
[method_name("SortByPath")]
|
|
TableViewSource Sort(String sortMemberPath, SortDirection direction);
|
|
[default_overload] [method_name("Sort")]
|
|
TableViewSource Sort(TableViewKeySelector keySelector, SortDirection direction);
|
|
TableViewSource ParentBy(TableViewKeySelector keySelector, TableViewKeySelector parentKeySelector);
|
|
TableViewSource ClearFilter();
|
|
TableViewSource ClearGroupBy();
|
|
TableViewSource ClearSort();
|
|
TableViewSource ClearParentBy();
|
|
|
|
static TableViewSource From(Object items);
|
|
}
|
|
|
|
}
|