project-lux / lux-frontend

Web front end of LUX
Apache License 2.0
3 stars 0 forks source link

Remove the use of data constants and their configuration and replace with AAT config #196

Open kamerynB opened 2 months ago

kamerynB commented 2 months ago

Problem Description: Data constants are being removed as there is too much variability when deploying new datasets.

Expected Behavior/Solution: Remove the data constants config in the frontend. Replace all configuration and uses within the code with AAT config.

Requirements:

Functions that use data constants:

Components that use data constants:

Needed for promotion: If an item on the list is not needed, it should be crossed off but not removed.

UAT/LUX Examples:

Dependencies/Blocks:

Related Github Issues: N/A

Related links: N/A

Wireframe/Mockup: This does not require a wireframe as the frontend should appear the exact same as it did before this change.

roamye commented 2 weeks ago

This is no longer blocked since ML #54 is closed. Moving to backlog.

@kamerynB

clarkepeterf commented 2 weeks ago

List of frontend data constants and their AATs:

[
    {
        "name": "accessStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300133046"
        ]
    },
    {
        "name": "active",
        "equivalent": [
            "http://vocab.getty.edu/aat/300393177"
        ]
    },
    {
        "name": "alternateName",
        "equivalent": [
            "http://vocab.getty.edu/aat/300264273"
        ]
    },
    {
        "name": "animalSpecimens",
        "equivalent": [
            "http://vocab.getty.edu/aat/300420186"
        ]
    },
    {
        "name": "archive",
        "equivalent": [
            "http://vocab.getty.edu/aat/300312242",
            "http://vocab.getty.edu/aat/300375748",
            "http://vocab.getty.edu/aat/300124822",
            "http://vocab.getty.edu/aat/300004482"
        ]
    },
    {
        "name": "biologicalSpecimens",
        "equivalent": [
            "http://vocab.getty.edu/aat/300421897"
        ]
    },
    {
        "name": "collection",
        "equivalent": [
            "http://vocab.getty.edu/aat/300025976"
        ]
    },
    {
        "name": "collectionItem",
        "equivalent": [
            "http://vocab.getty.edu/aat/300404024"
        ]
    },
    {
        "name": "copyrightLicensingStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300435434"
        ]
    },
    {
        "name": "descriptionStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300435416"
        ]
    },
    {
        "name": "dimensionStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300435430"
        ]
    },
    {
        "name": "displayName",
        "equivalent": [
            "http://vocab.getty.edu/aat/300404669"
        ]
    },
    {
        "name": "exhibition",
        "equivalent": [
            "http://vocab.getty.edu/aat/300054766"
        ]
    },
    {
        "name": "first",
        "equivalent": [
            "http://vocab.getty.edu/aat/300404050"
        ]
    },
    {
        "name": "fossil",
        "equivalent": [
            "http://vocab.getty.edu/aat/300247919"
        ]
    },
    {
        "name": "gender",
        "equivalent": [
            "http://vocab.getty.edu/aat/300055147"
        ]
    },
    {
        "name": "imprintStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300202362"
        ]
    },
    {
        "name": "langdut",
        "equivalent": [
            "http://vocab.getty.edu/aat/300388256"
        ]
    },
    {
        "name": "langen",
        "equivalent": [
            "http://vocab.getty.edu/aat/300388277"
        ]
    },
    {
        "name": "langfr",
        "equivalent": [
            "http://vocab.getty.edu/aat/300388306"
        ]
    },
    {
        "name": "langfre",
        "equivalent": []
    },
    {
        "name": "langger",
        "equivalent": []
    },
    {
        "name": "langspa",
        "equivalent": []
    },
    {
        "name": "languageStatement",
        "equivalent": [
            "http://vocab.getty.edu/aat/300435433",
            "http://vocab.getty.edu/aat/300055193"
        ]
    },
    {
        "name": "nationality",
        "equivalent": [
            "http://vocab.getty.edu/aat/300379842"
        ]
    },
    {
        "name": "occupation",
        "equivalent": [
            "http://vocab.getty.edu/aat/300263369",
            "http://vocab.getty.edu/aat/300263340"
        ]
    },
    {
        "name": "plantSpecimens",
        "equivalent": [
            "http://vocab.getty.edu/aat/300430421"
        ]
    },
    {
        "name": "primaryName",
        "equivalent": [
            "http://vocab.getty.edu/aat/300404670"
        ]
    },
    {
        "name": "sortName",
        "equivalent": [
            "http://vocab.getty.edu/aat/300404672"
        ]
    },
    {
        "name": "sortValue",
        "equivalent": [
            "http://vocab.getty.edu/aat/300451544"
        ]
    },
    {
        "name": "typeOfPart",
        "equivalent": [
            "http://vocab.getty.edu/aat/300241583"
        ]
    },
    {
        "name": "visitors",
        "equivalent": [
            "http://vocab.getty.edu/aat/300025883"
        ]
    },
    {
        "name": "webPage",
        "equivalent": [
            "http://vocab.getty.edu/aat/300264578"
        ]
    }
]
clarkepeterf commented 2 weeks ago

@azaroth42 @kkdavis14 from above - the following constants have multiple AATs - how should the frontend handle these?

There are a few constants for languages which don't have AATs, but they are not actually used in the frontend. For some reason they are used in tests, though @kamerynB - if they are not used should they be removed from tests?

kkdavis14 commented 1 week ago

@clarkepeterf The correct AATs for the above, if it helps: archive: http://vocab.getty.edu/aat/300375748 languageStatement: http://vocab.getty.edu/page/aat/300435433 occupation:http://vocab.getty.edu/page/aat/300263369

kamerynB commented 2 days ago

Note from 6/26/24 meeting: There shouldn't be an issue when filtering an entity from a list via its /equivalent IDs/AATs. AATs should not be repeated in multiple entities.