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> |
||
|---|---|---|
| .. | ||
| apps.d.ts | ||
| bots.d.ts | ||
| category.d.ts | ||
| channels.d.ts | ||
| client.d.ts | ||
| commands.d.ts | ||
| config.d.ts | ||
| custom_profile_attributes.d.ts | ||
| emojis.d.ts | ||
| error.d.ts | ||
| files.d.ts | ||
| groups.d.ts | ||
| integrations.d.ts | ||
| license.d.ts | ||
| mm_blocks.d.ts | ||
| plugins.d.ts | ||
| posts.d.ts | ||
| preferences.d.ts | ||
| properties.d.ts | ||
| reactions.d.ts | ||
| roles.d.ts | ||
| scheduled_post.d.ts | ||
| search.d.ts | ||
| session_attributes.d.ts | ||
| session.d.ts | ||
| slash_command.d.ts | ||
| teams.d.ts | ||
| terms_of_service.d.ts | ||
| threads.d.ts | ||
| users.d.ts | ||
| websocket.d.ts | ||