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

Implementation of isPageAccessible getter for refactor #299

Merged
merged 5 commits into from
Jan 6, 2023

Conversation

jarmoza
Copy link
Contributor

@jarmoza jarmoza commented Jan 5, 2023

This PR addresses #261.

The implementation of this boolean getter is a bit more complex than most in our store. isPageAccessible is a tweaked version of pageAccessible from the previous store. It checks the conditions necessary for access to the given page passed to it.

The tweaks from pageAccessible reflect the current state of the implementation of the categorization page (where assessment tools and tool groups are to be reimplemented soon). Currently one should only need at least one category-linked column and for the 'Subject ID' category to be used at least once to progress to the annotation page. Secondly, since we do not yet have a good conditional metric for moving to the download page, a value annotationCount is used. (To move to the categorization page, a non-empty dataTable must be present.)

The unit tests implement check for moving to the categorization page, annotation page, and download page in two ways. First, with the sufficient input and then secondly without the sufficient input.

@jarmoza jarmoza requested a review from surchs January 5, 2023 22:19
Copy link
Contributor

@surchs surchs left a comment

Choose a reason for hiding this comment

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

Looks great @jarmoza, thanks! I left two suggestions in the actual getter that I think might be more readable, take a look and see if you agree. But everything works well, so good to go.

store/index-refactor.js Outdated Show resolved Hide resolved
store/index-refactor.js Outdated Show resolved Hide resolved
@jarmoza jarmoza merged commit ab7ad1d into dev_components_talk_to_store_directly Jan 6, 2023
@jarmoza jarmoza deleted the jarmoza-261 branch January 6, 2023 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants