mirror of
https://github.com/mattermost/mattermost-mobile.git
synced 2026-11-12 06:00:14 +00:00
Mobile had no support for the `collapsible` dialog element: a dialog using one rendered none of its fields, because the container itself carries no value and every lookup walked only the top level. Conversion gains `flattenCollapsible` / `flattenDialogElements` / `flattenAppFields`, named to match the webapp's helpers. Every path that resolves a value by field name — submission, `collectFileIds`, `mergeFileFieldValues`, refresh-source detection, dynamic-select lookup in the dialog router, and `initValues` — now walks the flattened list, so a nested field behaves exactly like a top-level one. `CollapsibleSection` renders the chevron and title. Children unmount while collapsed; their values live in the form's reducer, so nothing typed is lost by closing a section, and a value typed into a section that is then collapsed still submits. Tested with 199 unit tests. The most complete of them, dialog_router_collapsible.test.tsx, drives the real payload from the demo plugin's `/dialog collapsible` sample through the real adapter, conversion, form and input components, mocking only the network, and asserts what the server receives on submit. E2E coverage is added to the existing demo-plugin suite, against the `/dialog collapsible` sample already present in the pinned demo plugin release: each section's initial expanded state, opening a nested section, a value surviving its section being collapsed, and a nested value surviving a collapse round trip. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| api | ||
| components | ||
| credentials | ||
| crt | ||
| database | ||
| global | ||
| launch | ||
| modules | ||
| screens | ||
| security_manager | ||
| utils | ||
| vendor | ||