Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAIR & CARE Scoring Widgets #90

Merged
merged 4 commits into from
Aug 8, 2023
Merged

FAIR & CARE Scoring Widgets #90

merged 4 commits into from
Aug 8, 2023

Conversation

jamiefeiss
Copy link
Collaborator

@jamiefeiss jamiefeiss commented Aug 7, 2023

FAIR & CARE scores can now be displayed in the UI as circular progress widgets on the right side underneath the Alternate Profiles. These widgets can be enabled/disabled with the environment variable VITE_ENABLE_SCORES. Clicking on the info button to the right of the score title opens a modal which displays extra information about the score and each score value. This would also be where more granular score information (e.g. F1.1, etc.) would be displayed in the near future.

The score data is picked up in the PropTableView.vue component with the following structure:

<iri> scores:hasScore [ a qb:ObservationGroup,
            scores:FairScore ;
        qb:observation [ a qb:Observation ;
                scores:fairFScore 17 ],
            [ a qb:Observation ;
                scores:fairAScore 9 ],
            [ a qb:Observation ;
                scores:fairIScore 5 ],
            [ a qb:Observation ;
                scores:fairRScore 2 ] ;
    ],
    [ a qb:ObservationGroup,
            scores:CareScore ;
        qb:observation [ a qb:Observation ;
                scores:careCScore 6 ],
            [ a qb:Observation ;
                scores:careAScore 4 ],
            [ a qb:Observation ;
                scores:careRScore 1 ]
            [ a qb:Observation ;
                scores:careEScore 0 ] ;
    ];

As of now only FAIR & CARE scores are supported, but other scoring types can be included later on provided they follow a similar data structure.

Here are some screenshots previewing the score widgets (note that the scores are not the true values for this resource for demo purposes)

Screenshot 2023-08-07 at 2 53 06 pm

Clicking on the info button next to the scores opens the modal:
Screenshot 2023-08-07 at 2 53 21 pm

Extra divs in the RightSideBar.vue component have been added for more convenient teleports, which are used for the score widgets. These will also be used in the near future for the search bar.

Resolves #86.

@jamiefeiss jamiefeiss requested review from hjohns and edmondchuc August 7, 2023 05:23
Copy link
Collaborator

@edmondchuc edmondchuc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested it locally since I don't have data for it, but otherwise code looks good to me.

@jamiefeiss jamiefeiss merged commit 908006d into main Aug 8, 2023
@jamiefeiss jamiefeiss deleted the feature/scoring branch August 8, 2023 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create FAIR & CARE widgets in PrezUI
2 participants