m2ms / fragalysis-frontend

The React, Redux frontend built by webpack
Other
1 stars 1 forks source link

LHS tag editing UI redesign #1389

Open mwinokan opened 6 months ago

mwinokan commented 6 months ago

To accommodate more tag editing and hiding functionality a new modal seemed sensible:

Screenshot 2024-03-15 at 10 02 29

I am confirming with data curators if this will fix their issues.

mwinokan commented 6 months ago

@kaliif Backend work needed to add the "hidden" property, it will be a flag in the existing endpoint.

@boriskovar-m2ms @matej-vavrek the frontend work is more involved:

@mwinokan to sanity check the desired position for the new modal

matej-vavrek commented 6 months ago

@mwinokan , about mapping field values. Currently, tag comes with this info:

            "id": 11,
            "site_observations": [
                68,
                74,
                11,
                46,
                15,
                49,
                94,
                95
            ],
            "tag": "A201",
            "tag_prefix": "11",
            "upload_name": "11 - A201",
            "create_date": "2024-03-12T09:15:20.928318Z",
            "colour": null,
            "discourse_url": null,
            "help_text": null,
            "additional_info": null,
            "category": 2,
            "target": 1,
            "user": null,
            "mol_group": 11

These are pretty much straightforward:

"Type" => category,
"Display name" => tag,
"Colour" => colour,
"Hidden" => (future) hidden,
"#Observations" => site_observations count

However, these are less:

"Site number" => tag_prefix / mol_group
"Site name" => ? where to reference ?
"#Compounds" => ? go through all site observations and get from them unique compounds count ?
mwinokan commented 6 months ago

Please change the field names so there's not such a difference between the backend and what the user sees: so rename Site Name to Upload Name, etc

boriskovar-m2ms commented 6 months ago

compounds should be unique compounds extracted from observations BUT per canonical site. So if same compound id appears in two canonical sites it should count as a two and not one. This is at least how it works now.

mwinokan commented 6 months ago

@boriskovar-m2ms will wait for @matej-vavrek to be back on the project (next week) to finish up this ticket

mwinokan commented 5 months ago

@matej-vavrek can complete most of this except the 'hidden' attribute which needs backend work from @kaliif

mwinokan commented 5 months ago

@matej-vavrek has a working version on his stack (except the creation of new tags is broken, likely a stack issue)

@mwinokan to spec out what should be done with the 'hidden' property of tags in the F/E

mwinokan commented 5 months ago

Thanks for your work @matej-vavrek. I have spoken to some data curators and Warren and we have agreed on the following behaviour for the 'hidden' tags in the frontend. @phraenquex, please do have a look as well:

Please let me know if you see any issues with this logic. Thanks