CONP-PCNO / CONP-PCNO/EEGNet-roadmap
[HED Tags] Address Feedback: Expanding Definitions
- Dominant language
- No language data
- Stars
- 2
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Based on Feedback from May 15 Technical Meeting -
When viewing HED Tags, we should be able to expand definitions. This is different than toggling between short / long form.
EX (A): (Def/Face-image/Onset)

There is already an option in the HED web services [`events_assemble`](https://hed-examples.readthedocs.io/en/latest/HedToolsOnline.html#hed-restful-services) for expanding definitions (`expand_defs`).
EX (B) Results when `expand_defs === off`:

EX (C) Results when `expand_defs === on`:

The option for expanding definitions has been turned `on` in [PR #769](https://github.com/aces/Loris-MRI/pull/769/files#diff-b3df3727f903e0f1bf536cfdbc0c9ce2f45ded5d9b4fad9c2491316cb222f4b3R288) on the LORIS-MRI repo when importing BIDS datasets. However, a distinction should be made in the database between the expanded and non-expanded definitions and only displayed conditionally based on user input.
___
The following tasks will need to be addressed in order to be able to toggle the expansion of HED definitions in the EEG Browser:
_**1. Incorporate support for toggling expanded HED tag definitions**_
* Add `ExpandedHED` column to the `physiological_task_event table` in the database.
* Amend [utilities](https://github.com/aces/Loris-MRI/blob/main/python/lib/utilities.py#L258-L302) to make two requests to the `events_assemble` HED services:
(i) request with `expand_defs = off` with result saved to `AssembledHED` column,
(ii) request with `expand_defs = on` with result saved to the new `ExpandedHED` column.
[Update statement to database](https://github.com/aces/Loris-MRI/blob/main/python/lib/physiological.py#L696-L700) should be amended as well.
* In the EventManager, once an event's HED tag is toggled open as shown in (A) - the user should be able to click a Expand / Collapse button to toggle the definitions. Display either the `AssembledHED` or `ExpandedHED` from the database depending on whether the user has clicked expand or collapse.
**_2. Incorporate support for toggling individual definitions_**
* There is a new feature in the HED services which returns a dictionary of definitions in the response JSON object. These can be saved to the database (news tables will need to be created) and information for individual definitions can be toggled on hover as a tooltip.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.