PhonologicalCorpusTools / SLPAA

5 stars 0 forks source link

Location Module - visual interface #85

Closed kvesik closed 4 weeks ago

kvesik commented 1 year ago

Notes for when this is ready to be implemented:

kvesik commented 1 year ago

Once this is implemented, decide whether it should be available for handpart selection as well.

kchall commented 11 months ago

Just a reminder that we have several .ppt files with thoughts about how to progress through different levels. We also have a full set of locations in each of three colours (yellow, violet, and green), if that helps us visually represent things.

kvesik commented 9 months ago

Just a reminder that we have several .ppt files with thoughts about how to progress through different levels. We also have a full set of locations in each of three colours (yellow, violet, and green), if that helps us visually represent things.

From 20231016 meeting...

kvesik commented 5 months ago

@kchall I have some questions about formatting of location option text, as well as some misalignments between which text vs images are available.

I've made a list of my specific questions below, but if you're curious there's detailed info in this spreadsheet.

Currently the way that the images are named doesn't precisely line up with the text options, so once we've got this sorted out I'm just going to batch-rename the images so that they're easier to link up with the text options as the user specifies the location module.

  1. In general, all of the locations that are not specified for contra/ipsi are identified in the text as singular (whether they're contiguous or discrete). Eg, "Jaw" refers to both (contiguous) sides of the jaw and "Ear" refers to both (discrete) ears. And when they are specified for contra/ipsi, they remain singular; eg "Jaw - contra" or "Ear - ipsi". My assumption is that this is all ok and as intended, but just wanted to confirm.

  2. (1) above means that even if there are two separate sides of a location shown in the image (eg, both ears are highlighted) the text alongside would still show singular (eg, "Ear"). Right?

  3. Here is a list of images that I have from Sophie, that do not currently have corresponding text options in the location tree. Please confirm whether I should add a text option for each of these into the location tree, and if so whether or not you like my proposed wording. I have the feeling that the sub-hand locations don't need separate entries in the location tree, but wanted to confirm just in case.

    • [x] Eyelids [both upper and lower] of the contra/ipsi eye. I propose "Eyelid - contra" and "Eyelid - ipsi"
    • [x] Corners [both contra and ipsi] of the mouth. I propose "Corner of mouth"
    • [x] Contra/ipsi whole hands. I propose "Whole hand - contra" and also ipsi
    • [x] Contra/ipsi hand minus fingers. I propose "Hand minus fingers - contra" and also ipsi
    • [x] Contra/ipsi heel of hand. I propose "Heel of hand - contra" and also ipsi
    • [x] Contra/ipsi fingers and thumb. I propose "Fingers and thumb - contra" and also ipsi
    • [x] Contra/ipsi thumb. I propose "Thumb - contra" and also ipsi
    • [x] Contra/ipsi fingers. I propose "Fingers - contra" and also ipsi
    • [x] Contra/ipsi fingers 1, 2, 3, 4. I propose "Finger 1 - contra" and also ipsi, plus fingers 2, 3, 4 as well
    • [x] Contra/ipsi between fingers. I propose "Between fingers - contra" and also ipsi
    • [x] Contra/ipsi between thumb and Finger 1. I propose "Between thumb and Finger 1 - contra" and also ipsi
    • [x] Same as above but for all the other combinations too (fingers 1+2, 2+3, 3+4).
  4. Here is a list of text options in the location tree, that currently do not have corresponding images from Sophie. Please confirm whether we need images of these locations. Some of them will be easy for me to do (eg buttocks), but the others will need a more skilled artist.

    a. Upper teeth b. Lower teeth c. Tongue d. Buttocks - contra & ipsi e. Selected fingers and thumb (is this something we'd eventually hope to do progammatically? ie, highlight the specific fingers that have been marked as "selected" elsewhere in the software) f. Selected fingers (same question as for (e))

Thanks!

kvesik commented 5 months ago

Notes from 20240311 meeting:

kchall commented 5 months ago

Right...and:

kvesik commented 4 months ago

Notes from 20240318 meeting:

Notes from 20240212 meeting:

From 20240205 meeting:

kvesik commented 3 months ago

@kchall at last week's meeting I asked you how we should deal with multiple sub-trees when single-left-through the regions on the location diagram. The decision we came to was that no matter whether the user has the cycle order set to "small to large" or "large to small", we should cycle through each subtree in that order. However, I'm realizing that although this makes intuitive sense for large to small, it's absolutely terrible for small to large.

For example, consider the click location below (on the left hand). The region options available here are shown in the R-click menu: image

For "large to small", we would simply cycle through from top to bottom. But for "small to large", the order would be (each subtree from top to bottom, from smallest to largest within each subtree):

This seems completely unintuitive to me. Just clicking through and testing it, it doesn't feel like there's any logic to the order at all (even though there is, of course).

I propose that we either: (a) only allow the large-to-small cycle, or (b) have the small-to-large cycle go up from the bottom of the entire menu to the top, rather than bottom to top of each submenu (where the submenus are traversed from top to bottom). This is much more intuitive than the way we originally discussed.

What do you think?

kchall commented 3 months ago

@kvesik Ah, good point. Let's go with (b), which is basically the 'same' as we originally planned, but also flipping the order of the sub-menus, right? i.e., bottom to top of each sub-menu, with sub-menus also being traversed from bottom to top?

kvesik commented 2 months ago

@kchall If a user selects a location from the list for which there is no image (eg mouth-interior locations, or anything involving selected fingers), the location dialog just shows the default non-highlighted image (whereas normally a selection from the list would show a corresponding highlighted image), and throws an error in the background because it's looking for an image with a particular name and there isn't one.

Would you like me to:

kvesik commented 2 months ago

Note for documentation - methods for interacting with Location images.

Right-click

Left-click

Keyboard input

When focus is on the location image...

kchall commented 2 months ago

@kchall If a user selects a location from the list for which there is no image (eg mouth-interior locations, or anything involving selected fingers), the location dialog just shows the default non-highlighted image (whereas normally a selection from the list would show a corresponding highlighted image), and throws an error in the background because it's looking for an image with a particular name and there isn't one.

Would you like me to:

  • (a) leave it as is (so, no highlighted region shown) and just make sure to catch the error in the background? or
  • (b) show some sort of more appropriate default image (eg, "mouth" for any mouth-interior locations, or "hand" for any selected finger locations)?

Good question! I'm thinking that maybe this is a good place to use one of our different-coloured highlighted versions. So e.g. do (b) but with the purple version of the mouth / hand picture to suggest that this is not quite the right image?

kvesik commented 2 months ago

@kchall Here's a summary of the non-code changes I made (or am about to make) as part of the Location images implementation. Some may be more relevant for you, others for a future RA who is working on the outstanding drawing-related tasks (see eg issue #337).

Changes to Location text descriptions

Changes to Location image .svg filenames

Renamed/reformatted to ensure that there is an unambiguous relation between the region names in the .svg files, the descriptive region names (eg that the user interacts with), and the .svg filenames themselves (this relation is explained/exemplified below).

Changes inside Location image .svg files

Sophie originally created a large collection of drawings, each showing an individual region of the body highlighted in yellow, violet, or green. I made two changes to the way that the regions were labeled in these .svg files:

Naming relation

In order to have an efficient way to convert back and forth between the region names in the .svg files, the descriptive region names (eg that the user interacts with), and the .svg filenames, there needs to be an unambiguous relation between each pair of these elements. The updated naming/formatting convention I implemented involves the following:

Some examples:

    • descriptive name: Septum / nostril area
    • filename: Septum_-slash-_nostril_area-yellow.svg or Septum_-slash-_nostril_area_with_Divisions-yellow.svg
    • region label (ID tag) inside .svg file: Septum_-slash-_nostril_area
    • descriptive name: Corner of mouth - contra
    • filename: Left_Corner_of_mouth-yellow.svg
    • region label (ID tag) inside .svg file: Corner_of_Mouth0 and Left_Corner_of_Mouth
    • descriptive name: Thumb - ipsi
    • filename: Right_Thumb-yellow.svg
    • region label (ID tag) inside .svg file: Thumb and Right_Thumb

Placeholder images

There are a five Location options for which we don't have images. The first three because we don't have an inside-of-mouth view, and the last two because we don't have any behaviour or related logic implemented at all for "selected fingers."

There are a few things to note about these five Locations:

  1. They have placeholder images:
    • "Mouth" stands in for "Tongue"
    • "Teeth" stands in for "Upper Teeth"
    • "Teeth" stands in for "Lower Teeth"
    • "Fingers" stands in for "Selected fingers" (note only the both-handed version is available, no contra/ipsi options)
    • "Fingers and thumb" stands in for "Selected fingers and thumb" (note only the both-handed version is available, no contra/ipsi options)
  2. The placeholder images have regions highlighted in violet instead of yellow, so it's clear to the user that there's something different about these ones.
  3. In order for the placeholder images/locations to come up in the image right-click menu and the left-click cycle, all (front-view) .svg files had to have internal region name labels (that is, the id attribute of the g element: <g id="..."> as discussed above) added for these Locations. However, since they don't have their own highlighted region drawings yet, the region specifications were just copied directly from the placeholder regions.
  4. In the "yellow_20240703version" folder, there is a .txt file (named similarly to the corresponding .svg) for each of these regions, flagging that it's a placeholder.

Re-organization of Location images in Google drive

In SLP-AA/Drawings/Updated Locations Sophie originally created folders called:

  1. "Highlighted Locations", which contained subfolders for yellow, green, and violet version .svg files for all Location regions.
  2. "Views", which contained just a front, a side, and a back view file without any region highlighting.
kchall commented 2 months ago

@kvesik Awesome, thanks for keeping track of these changes and documenting them so clearly -- all looks good to me so far!