mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-12 14:16:12 +00:00
Settings → Gesundheitsakte mounts the one scope picker twice: the export panel at the top, the share-link create form under `#sharing`. Sharing the component is deliberate, but it also meant every test id inside it resolved to two elements on that page, so nothing in the picker could be addressed without guessing which one you got. The picker now takes a required `surface` and every id under it ends with that surface — `report-group-row-vitals-export` and `report-group-row-vitals-share` are two controls and read as two controls. The summary line beside each picker follows the same rule. A third mount picks a value and stays addressable by construction.
17 lines
777 B
TypeScript
17 lines
777 B
TypeScript
/**
|
|
* Which surface a scope picker is mounted on.
|
|
*
|
|
* Settings → Gesundheitsakte carries BOTH mounts on one page: the export panel
|
|
* at the top and the share-link create form under `#sharing`. They are the same
|
|
* component by design — two selection UIs must not drift apart — but that made
|
|
* every test id inside the picker resolve twice on that page, so nothing in it
|
|
* was addressable.
|
|
*
|
|
* The surface is therefore required, not optional, and every test id under the
|
|
* picker ends with it: `report-group-row-vitals-export` and
|
|
* `report-group-row-vitals-share` are two different controls and read as two
|
|
* different controls. A third mount adds a value here and stays addressable by
|
|
* construction.
|
|
*/
|
|
export type ReportScopeSurface = "export" | "share";
|