-
Notifications
You must be signed in to change notification settings - Fork 6
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
Refactor of category-select-table component #229
Refactor of category-select-table component #229
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jarmoza: really cool PR 🎉 and a very good size of changes and unit of work! This is great!
I checked it out, confirmed it works. I do have two comments:
- A minor one about state keeping -> I think whoever holds state for
currentCategory
, it should only be in one place (see detailed comments inline) - More important: the tests should be as simple as we can, and only concerned with the component. So I'd say: let's get rid of the store methods and unused state variables and just write explicitly what the getters will give to the component at runtime (again, more detail in comments).
@surchs I believe with these last two commits, we are good to rebase this PR with https://github.com/neurobagel/annotation_tool/tree/dev_components_talk_to_store_directly |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, @jarmoza. Yes, fully agreed. This is ready to be squashed into the dev branch! 🎉
Newly refactored category select table on the categorization page...
categories
,categoryClasses
) directly from the storeinstructions
andtitle
props have also been removed, relegated to the new refactored categorization page that will act more like a layout.selectedCategory
is still emitted to the categorization page (which maintains acurrentCategory
field to share between thecategory-select-table
and thecolumn-linking-table
)The component test...