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

create a column component for columns about "Assessment tool" #566

Closed
8 tasks done
Tracked by #285
surchs opened this issue Oct 12, 2023 · 2 comments · Fixed by #574
Closed
8 tasks done
Tracked by #285

create a column component for columns about "Assessment tool" #566

surchs opened this issue Oct 12, 2023 · 2 comments · Fixed by #574
Assignees

Comments

@surchs
Copy link
Contributor

surchs commented Oct 12, 2023

I want to be able to

  • See all the columns that are "about" Assessment tool in one place
  • Create a new assessment tool by picking from a list of options, but only one per term (no duplicates)
  • Assign columns from the "about" Assessment list to my new tool, tool - column = 1 - many
  • see visually which columns are part of which tool, and which columns remain unassigned

It should also:

  • store the mapping of column-tool somewhere in the store
  • not let me proceed beyond the categorization page unless I have assigned every column "about" assessment to a tool

We will now make this as a single component

  • it should write to a new place in the state for column to tool mapping
  • there should be some UI workflow to group columns and assign them to tools

And it will look like this:
Image

https://miro.com/app/board/uXjVNcaXNn8=/?share_link_id=641819350722

@surchs surchs moved this to Specify - Active in Neurobagel Oct 12, 2023
@surchs surchs moved this from Specify - Active to Specify - Done in Neurobagel Oct 12, 2023
@surchs surchs moved this from Specify - Done to Implement - Active in Neurobagel Oct 12, 2023
@surchs
Copy link
Contributor Author

surchs commented Oct 16, 2023

I think this guy already did what we had in mind:

getMappedColumns: (p_state) => (p_category) => {
const mappedColumns = [];
for ( const column in p_state.columnToCategoryMap ) {
if ( p_category === p_state.columnToCategoryMap[column] ) {
mappedColumns.push(column);
}
}
return mappedColumns;
},

I still think it makes a lot of sense to reuse this logic in the unique values getter. But we can only keep one columnGetter

@surchs
Copy link
Contributor Author

surchs commented Oct 16, 2023

Another thing I noticed:

  • what tools are "selected" / ready to annotate with has to be in the global state / in the store
  • that means in our tests we cannot directly assert that the select action results in a UI state (otherwise we start mocking the entire store logic out again, and that's bad)
  • therefore: we have to split our test for "user selects new tool from dropdown" into two steps:
    • test 1: when user selects tool from dropdown, mutation is fired to update store object (no assert on UI)
    • test 2: when store object for selected Tools is altered, UI updates (no assert on user action)

@surchs surchs moved this from Implement - Active to Implement - Done in Neurobagel Oct 18, 2023
@surchs surchs self-assigned this Oct 18, 2023
@rmanaem rmanaem moved this from Implement - Done to Review - Active in Neurobagel Oct 20, 2023
@github-project-automation github-project-automation bot moved this from Review - Active to Review - Done in Neurobagel Oct 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants